
:root {
    --primary-color: #11455b;
    --accent-color: #11455b;
    --accent-light: #1f6185;
    --pink: #e75b85;
    --text-color: #333;
    --light-text: #777;
    --white: #fff;
    --light-gray: #f5f5f5;
    --border-color: #ddd;
    --button:#eb5851;
    --button-hover:#da4740;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

 html {
    scroll-behavior: smooth;
}

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

body {
    font-family: "Libre Caslon Text", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    font-weight: 400;
    font-style: normal;
    background-image: url('img/element.png');
    background-position: 0;
    background-size: contain;
}

a{
    color:var(--button);
}


h1, h2, h3, h4, select,
.button, .legal-menu{
  font-family: "Manrope", sans-serif;
  font-optical-sizing: auto;
  font-weight: 800;
  font-style: normal;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background-color: var(--white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.logo img{
    width: 198px;
}


.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    flex-wrap: wrap;
}


.button {
    display: inline-block;
    background-color: var(--button);
    color: var(--white);
    padding: 12px 48px;
    border-radius: 4px;
    text-decoration: none;
    text-transform: uppercase;
}

.button:hover {
    background-color: var(--button-hover);
}

.button-disabled, .button-disabled:hover{
  background-color: gray;
  cursor: not-allowed;
}

#country-select{
  padding: 12px 48px 12px 12px;
  border-radius: 4px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  position: relative;
  color: var(--text-color);
  border-color: var(--text-color);

}

.hero {
    padding: 60px 0;
}

.hero-container {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 40px;
    align-items: center;
}

.book-cover {
    grid-column: 1;
}

.hero-content {
    grid-column: 2;
}

.book-cover img {
    width: 100%;
    height: auto;
    display: block;
}

.buynow{
    display: flex;
    justify-items: start;
    align-items: center;
    justify-content: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
}

.buynow .button{
    margin-right: 24px;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.subheading {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--light-text);
}

.sales-pitch {
    text-align: center;
    padding: 48px 0;
    margin: 30px 0;
    font-size: 2rem;
    color: var(--accent-color);
    line-height: 1.6;
}

.learn-section {
    padding: 60px 0;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    text-align: center;
}

.feature-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
}

.feature-icon {
    flex: 0 0 40px;
    margin-right: 1rem;
    background-color: var(--light-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.feature-icon .icon{
    color: var(--accent-light);
}

    /*--primary-color: #11455b;
    --accent-color: #11455b;
    --accent-light: #1f6185;*/

.feature-content h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.feature-content p {
    color: var(--light-text);
}

.authors-section {
    padding: 60px 0;
    background-color: var(--light-gray);
}

.authors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.author-card {
    display: flex;
    flex-direction: column;
}

.author-image {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
}

.author-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.author-title {
    font-size: 0.9rem;
    color: var(--light-text);
    margin-bottom: 10px;
}

.chapters-section {
    padding: 60px 0;
}

.chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.chapter-details{
    margin:2rem 0 0 0;
    text-align: center;
}

.chapter-details .button{
    cursor: pointer;
}

.chapter-details .button:before{
    content: 'View more ';
}

.chapter-details[open] .button:before{
    content: 'View less ';
}

.chapter-card {
    text-align: left;
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    position: relative;
    background: white;
    box-shadow: 
    3px 3px 0 -1px white, 
    3px 3px 1px rgba(0,0,0,0.1),
    6px 6px 0 -1px white, 
    6px 6px 1px rgba(0,0,0,0.1),
    9px 9px 0 -1px white, 
    9px 9px 1px rgba(0,0,0,0.1);
}

.chapter-card::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 20px 20px; /* This creates the triangle */
    border-color: transparent transparent #f5f5f5 transparent; /* Light gray for the folded corner */
    box-shadow: -2px -2px 3px rgba(0,0,0,0.1); /* Subtle shadow for depth */
    border-radius: 0 0 4px 0; /* Match the parent's border-radius */
}


.chapter-number {
    font-size: 0.9rem;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.chapter-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-weight: bold;
}



.plus-more {
    text-align: center;
    margin-top: 30px;
}

.why-i-wrote {
    padding: 60px 0;
    background-color: var(--light-gray);
}

.why-i-wrote-title {
    text-align: left;
    margin-bottom: 30px;
}

.why-i-wrote-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.why-text-column{
    font-size: 2rem;
    border-right:1px solid var(--border-color);
    padding-right: 2rem;
}

.author-photo {
    width: 100px;
    height: 100px;
    border-radius: 99px;
    object-fit: cover;
    clear: both;
}

.author-photo-column {
    margin-bottom: 15px;
    font-size: 80%;
    line-height: 2;
}

.readers-section {
    padding: 60px 0;
}

.link-list{
    list-style: none;
    margin: 1rem 0;
    min-height: 1.5rem;
}

.link-list li{
    float: left;
    display: inline-block;
    margin-right: .5rem;
}

.reader-quote-container {
    margin-bottom: 40px;
}

.reader-quote {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 20px;
    align-items: flex-start;
}

.reader-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    grid-column: 1;
}

.reader-content {
    grid-column: 2;
}

.reader-name {
    font-weight: bold;
    margin-bottom: 10px;
}


.icon{
    width:48px;
    height: 48px;
}

.link-list .icon{
    width:24px;
    height: 24px;
    color:var(--button);
}

.link-list .icon:hover{
    color:var(--button-hover);
}

.order-section {
    padding: 60px 0;
    text-align: center;
}

.order-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

.order-option {
    flex: 0 0 280px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    background-color: var(--white);
}

.order-image {
    width: 180px;
    height: auto;
    margin: 0 auto 20px;
}

.order-title {
    font-weight: bold;
    margin-bottom: 10px;
}

.order-price {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.stores{
   margin-top: 1rem;
}

.faq-section {
    margin: 60px 0 0 0;
    padding: 60px 0;
    background-color: var(--light-gray);
}

.faq-item {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.faq-question {
    font-weight: bold;
    margin-bottom: 10px;
    cursor: pointer;
}

.faq-answer {
    color: var(--light-text);
    margin-left:1rem;
}

footer {
    background-color: #1D1D1D;
    color: var(--white);
    padding: 40px 0;
}

.footer-content {
    display: flex;
    justify-content: center;
    text-align: center;
}

.footer-column {
    max-width: 600px;
}

.footer-heading {
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.footer-bottom {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #444;
    text-align: center;
    color: #bbb;
    font-size: 0.7rem;
}

.footer-bottom p{
    margin-top:1rem;
    clear: both;
}

.legal .container{
    padding-top:6.5rem;
}

.legal h2{
    margin-top:2rem;
}

.legal h3{
    margin-top:1.5rem;   
}

.legal h4, .legal p{
    margin-top:1rem;   
}

.legal ul{
    margin-left: 1.5rem;
}

.legal-menu{
    display: flex;
    justify-content: space-between;
    flex-direction: row;
    list-style-type: none;
}

.legal-menu a{
    color: var(--white);
    text-decoration: underline;
    font-weight: normal;
}

.legal-menu a:hover{
    color: var(--light-gray);
}

.release-date{
  font-size: .75rem;
  display: block;
}

/* Accessibility styles */
  .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
  }
  
  .visually-hidden:focus {
    position: fixed;
    top: 10px;
    left: 10px;
    width: auto;
    height: auto;
    padding: 15px;
    background: #fff;
    color: #000;
    z-index: 1000;
    clip: auto;
    text-decoration: none;
    border: 2px solid #eb5851;
    border-radius: 4px;
  }
  
  /* Improve focus states */
  a:focus, button:focus, summary:focus, select:focus{
    outline: 3px solid #eb5851;
    outline-offset: 2px;
  }
  
  /* Improve contrast for better readability */
  .light-text, .author-title, .faq-answer {
    color: #555; /* Darker than original #777 for better contrast */
  }

  .distributers{
    display: flex;
    list-style-type: none;
    justify-content: space-evenly;
    gap: 2rem;
    flex-wrap: wrap;
    margin: 2rem 1rem;
  }

  .distributers img{
    height: 32px;
  }

  .shop-local{
    margin: 3rem 1rem;
    text-align: center;
  }



@media (max-width: 768px) {

    body{
        background: none;
    }

    .hero-container {
        grid-template-columns: 1fr;
    }
    
    .book-cover {
        grid-row: 1;
        grid-column: 1;
    }
    
    .hero-content {
        grid-row: 2;
        grid-column: 1;
        margin-top: 30px;
    }
    
    h1 {
        font-size: 2rem;
    }

    .feature-list {
        grid-template-columns: 1fr; /* Switch to single column on mobile */
    }
    
    
    .feature-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-bottom: 30px; /* Add margin back for mobile layout */
    }
    
    .feature-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .authors-grid, .chapters-grid {
        grid-template-columns: 1fr;
    }
    
    .why-i-wrote-grid {
        grid-template-columns: 1fr;
    }
    .why-text-column{
        border-right:0;
        padding-right:0;
    }

    .legal-menu{
        flex-direction: column;
    }

    .distributers{
      flex-direction: column;
      align-items: center;
      gap:20px;
    }
}



/*book stuff*/

    .book-container {
      width: 100%;
      max-width: 1200px;
      text-align: center;
    }

    .instructions {
      margin-bottom: 20px;
      color: #555;
    }

    .book-container {
      margin: 0 auto;
      width: 300px;
      height: 450px;
      position: relative;
      perspective: 1500px;
      cursor: ew-resize;
    }

    .book {
      position: absolute;
      width: 100%;
      height: 100%;
      transform-style: preserve-3d;
      transform: rotateX(10deg) rotateY(0deg);
      transition: transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
    }

    /* All faces */
    .face {
      position: absolute;
      box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    }

    /* Front cover */
    .front {
      width: 300px;
      height: 450px;
      background-image: url('img/3dbookcover.jpg');
      background-size: cover;
      background-position: center;
      transform: translateZ(15px);
      border-radius: 2px 10px 10px 2px;
    }

    /* Back cover */
    .back {
      width: 300px;
      height: 450px;
      background-image: url('img/3dbookback.jpg');
      background-size: cover;
      background-position: center;
      transform: translateZ(-15px) rotateY(180deg);
      border-radius: 10px 2px 2px 10px;
    }

    /* Spine */
    .spine {
      width: 30px;
      height: 450px;
      background-image: url('img/3dbookspine.jpg');
      background-size: cover;
      background-position: center;
      transform: rotateY(-90deg) translateZ(15px);
    }

    /* Pages edge (right side) */
    .pages {
      width: 30px;
      height: 450px;
      background: #fff;
      transform: rotateY(90deg) translateZ(285px);
      background-image: 
        repeating-linear-gradient(
          to right,
          #f0f0f0,
          #f0f0f0 1px,
          #fff 1px,
          #fff 2px
        );
      box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
    }

    /* Top edge */
    .top {
      width: 300px;
      height: 30px;
      background: #fff;
      transform: rotateX(90deg) translateZ(15px);
      background-image: 
        repeating-linear-gradient(
          to bottom,
          #f0f0f0,
          #f0f0f0 1px,
          #fff 1px,
          #fff 2px
        );
      box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
    }

    /* Bottom edge */
    .bottom {
      width: 300px;
      height: 30px;
      background: #fff;
      transform: rotateX(-90deg) translateZ(435px);
      background-image: 
        repeating-linear-gradient(
          to bottom,
          #f0f0f0,
          #f0f0f0 1px,
          #fff 1px,
          #fff 2px
        );
      box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
    }

    /* Shadow effect */
    .shadow {
      position: absolute;
      width: 280px;
      height: 30px;
      bottom: -40px;
      left: 10px;
      background: rgba(0,0,0,0.2);
      filter: blur(15px);
      opacity: 0.6;
      border-radius: 50%;
      transform-origin: center;
      transform: rotateX(90deg) scaleY(0.15);
    }


