/* Thimdrine stylesheet */


/* GLOBAL */

/* colours + fonts, change them here and it updates everywhere */
:root {

  /* main brand colours */
  --rif-color: #264653;
  --honey-color: #D99A2B;
  --fig-color: #7A2946;
  --clay-color: #B85C38;

  /* backgrounds */
  --linen-color: #F7F0E3;
  --sand-color: #E8D8BF;
  --white-color: #FFFFFF;

  /* text */
  --earth-color: #241E1A;
  --earth-soft-color: #5A4F46;

  /* fonts */
  --heading-font: 'Lora', Georgia, serif;
  --body-font: 'Source Sans 3', Arial, sans-serif;
}


/* basic reset + defaults */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--body-font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--earth-color);
  background-color: var(--linen-color);
}

h1,
h2,
h3 {
  margin: 0 0 16px;
  font-family: var(--heading-font);
  line-height: 1.2;
  color: var(--rif-color);
}

h1 {
  font-size: 34px;
}

h2 {
  font-size: 28px;
}

h3 {
  margin-bottom: 8px;
  font-size: 20px;
}

p {
  margin: 0 0 16px;
}

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

img {
  display: block;
  max-width: 100%;
  height: auto;
}


/* keeps the content centered */
.container {
  max-width: 1152px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}


/* HEADER */

.header {
  background-color: var(--rif-color);
  border-bottom: 1px solid var(--sand-color);
}

.header-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--heading-font);
  font-size: 20px;
  font-weight: 700;
  color: var(--linen-color);
  text-decoration: none;
}

.logo img {
  width: 44px;
}

.nav-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.nav-menu a {
  padding: 8px 12px;
  border-radius: 30px;
  font-size: 15px;
  font-weight: 600;
  color: var(--linen-color);
  text-decoration: none;
}

.nav-menu a:hover {
  background-color: rgba(247, 240, 227, 0.12);
}

/* highlights the page you're currently on */
.nav-menu a.active {
  background-color: var(--honey-color);
  color: var(--earth-color);
}


/* HOME PAGE */

/* hero banner at the top */
.hero {
  position: relative;
  min-height: 700px;
  padding: 80px 0;
  background-image: url("../images/cover.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--rif-color);
}

/* dark layer on top of the photo so the text is readable */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(36, 30, 26, 0.50);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-text {
  max-width: 600px;
}

/* small uppercase line above the titles */
.eyebrow {
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--clay-color);
}

.hero .eyebrow {
  color: var(--honey-color);
}

.hero h1 {
  font-size: 52px;
  color: var(--linen-color);
}

.tagline {
  margin-bottom: 24px;
  font-size: 20px;
  color: var(--linen-color);
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.button {
  display: inline-block;
  padding: 12px 24px;
  border: 2px solid var(--rif-color);
  border-radius: 30px;
  background-color: var(--rif-color);
  color: var(--linen-color);
  font-family: var(--body-font);
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

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

/* second button style, just an outline */
.button-outline {
  background-color: transparent;
  color: var(--rif-color);
}

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

/* on the hero the outline button needs to be light so it shows up on the photo */
.hero .button-outline {
  border-color: var(--linen-color);
  background-color: transparent;
  color: var(--linen-color);
}

.hero .button-outline:hover {
  background-color: var(--linen-color);
  color: var(--earth-color);
}


/* "who are we" section */

.section {
  padding: 64px 0;
}

.presentation {
  max-width: 768px;
}

.link {
  display: flex;
  margin-top: 8px;
  font-weight: 600;
}


/* signature products */

.section-sand {
  background-color: var(--sand-color);
}

.intro {
  margin-bottom: 40px;
  color: var(--earth-soft-color);
}

.product-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}

/* three cards per row on desktop, the 48px is the two gaps */
.product-card {
  flex: 1 1 calc((100% - 48px) / 3);
  min-width: 260px;
  overflow: hidden;
  border-radius: 12px;
  background-color: var(--linen-color);
  box-shadow: 0 2px 15px rgb(0 0 0 / 10%);
  transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
  transform: translateY(-10px);
    box-shadow: 0 2px 15px rgb(0 0 0 / 20%);
}

.product-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover img {
  transform: scale(1.1);
}

.card-text {
  padding: 24px;
  display: flex;
  flex-direction: column;
}


.price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.price p {
  margin: 0;
}

.price-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--clay-color);
}

.price-weight {
  font-size: 14px;
  font-weight: 400;
  color: var(--honey-color);
}

.card-text .add  {
  text-decoration: none;
  width: 100px;
  padding: 2px 5px;
  margin: 0 auto;
  background-color: var(--honey-color);
  color: white;
  border-radius: 6px;
  text-align: center;
}

.card-text .add:hover {
  background-color: var(--clay-color);
}


/* call to action banner */

.cta {
  padding: 64px 0;
  background-color: var(--rif-color);
  color: var(--linen-color);
  text-align: center;
}

.cta h2 {
  color: var(--linen-color);
}

.cta p {
  max-width: 576px;
  margin: 0 auto 24px;
}

.button-honey {
  border-color: var(--honey-color);
  background-color: var(--honey-color);
  color: var(--earth-color);
}

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


/* PRODUCTS PAGE */

.page-intro {
  padding: 48px 0 24px;
}

.page-intro h1 {
  font-size: 40px;
}

.page-intro p:last-child {
  max-width: 640px;
  margin-bottom: 0;
  color: var(--earth-soft-color);
}

.products-section {
  padding: 24px 0 64px;
}

.products-section h2 {
    text-align: center;
    margin-bottom: 17px;
}


/* testimonials */

.testimonials {
  padding: 56px 0;
  background-color: var(--sand-color);
}

.testimonials-header {
  margin-bottom: 24px;
}

.testimonials-header h2 {
  margin-bottom: 8px;
}

.testimonials-header p {
  margin: 0;
  color: var(--earth-soft-color);
}

.testimonial-list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.testimonial-card {
  position: relative;
  flex: 1 1 220px;
  padding: 16px;
  border-radius: 8px;
  background-color: var(--white-color);
  box-shadow: 0 2px 8px rgba(36, 30, 26, 0.08);
}

.testimonial-person {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

/* round photo sticking out of the top corner of the card */
.avatar {
  position: absolute;
  right: -11px;
  top: -34px;
  width: 68px;
  height: 68px;
  border: 5px solid var(--sand-color);
  border-radius: 50%;
  background-color: var(--sand-color);
  transition: 1s;
}

.testimonial-card:hover .avatar {
  transform: rotate(360deg);
}

.testimonial-person h3 {
  margin: 0;
  font-family: var(--body-font);
  font-size: 16px;
  color: var(--earth-color);
}

.testimonial-person p {
  margin: 0;
  font-size: 14px;
  color: var(--earth-soft-color);
}

.stars {
  margin: 0 0 8px;
  letter-spacing: 2px;
  color: var(--honey-color);
}

.testimonial-card .review {
  margin-bottom: 12px;
  font-size: 15px;
  color: var(--earth-soft-color);
}


/* ABOUT PAGE */

.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 25px;
  margin-bottom: 25px;
}

/* the vertical line running down the middle */
.timeline::after {
  content: '';
  position: absolute;
  width: 3px;
  left: 50%;
  top: 0;
  bottom: 0;
  transform: translateX(-50%);
  background-color: var(--clay-color);
  z-index: 0;
}

/* each row = image on one side, text on the other */
.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
  z-index: 1;
}

.timeline-card,
.timeline-text {
  width: 100%;
  position: relative;
  border-radius: 16px;
}

.timeline-card img {
  width: 100%;
  display: block;
  border-radius: 16px;
}

.timeline-text {
  background-color: var(--white-color);
  padding: 30px;
  width: 100%;
  height: 298.27px;
  position: relative;
  border-radius: 16px;
}

/* the little circles on the line. odd rows have text on the left,
   even rows have the image on the left, so the dot goes on whichever one that is */
.timeline-item:nth-child(1) .timeline-text::before,
.timeline-item:nth-child(3) .timeline-text::before,
.timeline-item:nth-child(2) .timeline-card::before,
.timeline-item:nth-child(4) .timeline-card::before {
  content: '';
  position: absolute;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  border: 3px solid var(--clay-color);
  left: -44px;
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--linen-color);
  z-index: 2;
}


/* News Letter */

.newsletter {
  background-color: var(--sand-color);
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 30px 225px;
}

.newsletter .content h2 {
  margin-bottom: 5px;
}

.newsletter .content p {
  margin-bottom: 10px;
}

.newsletter img {
  width: 250px;
  height: 250px;
  border-radius: 18px;
}

.newsletter form span {
  color: red;
}

.newsletter input {
  border: none;
  padding: 10px;
  border-radius: 6px;
  width: 300px;
}

.newsletter input:focus {
  outline: none;
}

.newsletter button {
  padding: 10px;
  border: none;
  border-radius: 16px;
  margin-left: 10px;
  background-color: var(--honey-color);
}

@media (max-width: 768px) {

  * {
    box-sizing: border-box;
  }

  html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  img {
    max-width: 100%;
    height: auto;
  }

  .container {
    width: 100%;
    max-width: 100%;
    padding-left: 20px;
    padding-right: 20px;
  }

  /* Header */
  .header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .header-content .logo {
    align-self: center;
  }

  .nav-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }

  /* About intro */
  .about-intro h1 {
    font-size: 2rem;
  }

  /* Timeline */
  .timeline {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
  }

  .timeline::before,
  .timeline::after,
  .timeline-text::before,
  .timeline-text::before {
    display: none;
  }

  .timeline-card {
    display: none;
  }

  .timeline-item {
    display: block;
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0 0 24px 0;
    padding: 0;
    left: 0;
    right: 0;
    transform: none;
  }

  .timeline-text {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 24px 20px;
    left: 0;
    right: 0;
    transform: none;
    order: 0;
  }

  /* Newsletter */
  .newsletter {
    display: block;
    padding: 40px 20px;
  }

  .newsletter .content {
    width: 100%;
    max-width: 100%;
  }

  .newsletter .intro br {
    display: none;
  }

  .newsletter .form-row {
    flex-direction: column;
    gap: 12px;
  }

  .newsletter input,
  .newsletter button {
    width: 100%;
  }

  .newsletter > img {
    width: 100%;
    margin-top: 24px;
  }

  /* Footer */
  .footer-columns {
    flex-direction: column;
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* Contact Page */

.contact-section {
  padding: 24px 0 64px;
}

.contact-section .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}
 
.order-form {
  max-width: 640px;
  padding: 32px;
  margin: 0 auto;
  border-radius: 12px;
  background-color: var(--white-color);
  box-shadow: 0 4px 16px rgba(36, 30, 26, 0.10);
}
 
.form-group {
  margin-bottom: 20px;
}
 
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 600;
}
 
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--sand-color);
  border-radius: 8px;
  background-color: var(--white-color);
  font-family: var(--body-font);
  font-size: 16px;
  color: var(--earth-color);
}
 
.form-group textarea {
  resize: vertical;
}
 
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: 2px solid var(--honey-color);
  outline-offset: 2px;
}
 
.form-group input:user-invalid,
.form-group select:user-invalid {
  border-color: var(--clay-color);
}
 
.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 24px;
}
 
.form-consent input {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 3px;
  accent-color: var(--rif-color);
}
 
.form-consent label {
  font-size: 15px;
}


/* FOOTER */

.footer {
  padding-top: 40px;
  background-color: var(--earth-color);
  color: var(--linen-color);
}

.footer-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.footer-columns>div {
  flex: 1 1 220px;
}

.footer h2 {
  margin-bottom: 8px;
  font-size: 20px;
  color: var(--honey-color);
}

.footer a {
  color: var(--linen-color);
  text-decoration: none;
}

.footer-columns p,
.footer address {
  margin: 0;
  font-style: normal;
}

.footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer li {
  margin-bottom: 4px;
}

.copyright {
  margin: 40px 0 0;
  padding: 16px;
  border-top: 1px solid var(--rif-color);
  font-size: 15px;
  text-align: center;
}


/* MOBILE - home page only
   body:has(.hero) only matches the home page (the only page with a hero banner),
   so the other pages are left untouched */

@media (max-width: 767px) {
  body:has(.hero) {
    font-size: 16px;
  }

  body:has(.hero) h2 {
    font-size: 22px;
  }

  /* header: logo on top, menu underneath */
 .header-content {
  display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

 .logo {
    font-size: 18px;
  }

  .logo img {
    width: 36px;
  }

  .nav-menu {
    gap: 2px;
    margin-left: -8px;
    justify-content: center;
  }

 .nav-menu a {
    padding: 6px 10px;
    font-size: 13px;
  }

  /* hero */
  body:has(.hero) .hero {
    min-height: 0;
    padding: 40px 0;
  }

  body:has(.hero) .hero h1 {
    font-size: 28px;
  }

  body:has(.hero) .eyebrow {
    font-size: 12px;
  }

  body:has(.hero) .tagline {
    margin-bottom: 20px;
    font-size: 16px;
  }

  body:has(.hero) .buttons {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  body:has(.hero) .button {
    padding: 10px 20px;
    font-size: 15px;
  }

  /* sections */
  body:has(.hero) .section,
  body:has(.hero) .cta {
    padding: 36px 0;
  }

  body:has(.hero) .intro {
    margin-bottom: 24px;
  }

  /* product cards: one per row */
  .product-cards {
    gap: 20px;
  }

 .product-card {
    flex: 1 1 100%;
    min-width: 0;
  }

  body:has(.hero) .card-text {
    padding: 16px;
  }

  /* footer: columns stacked */
 .footer {
    padding-top: 32px;
  }
.footer-columns {
    flex-direction: column;
    gap: 24px;
  }

.footer-columns > div {
    flex: none;
  }

  .footer h2 {
    font-size: 18px;
  }

  .copyright {
    margin-top: 28px;
    font-size: 13px;
  }
}

@media (max-width: 768px) {
    .newsletter input, .newsletter button {
        width: 100%;
        margin: 5px auto;
    }
}