/* ============================================================
   Love in a Note — Main Stylesheet
   Mobile-first, responsive
   ============================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400&display=swap');

/* ============================================================
   Design Tokens
   ============================================================ */
:root {
  /* Colors */
  --green-primary:  #1A3929;
  --green-accent:   #2D5A3D;
  --green-light:    #4A7C5F;
  --cream:          #F5EDE0;
  --cream-light:    #FAF5EE;
  --cream-dark:     #EDE3D4;
  --white:          #FFFFFF;
  --text-dark:      #1A1A1A;
  --text-body:      #2C2C2C;
  --text-muted:     #5A5A5A;
  --text-on-green:  #FFFFFF;
  --heart:          #2D5A3D;

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Poppins', system-ui, -apple-system, sans-serif;

  /* Type scale */
  --text-xs:   0.75rem;   /* 12px */
  --text-sm:   0.875rem;  /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-md:   1.125rem;  /* 18px */
  --text-lg:   1.25rem;   /* 20px */
  --text-xl:   1.5rem;    /* 24px */
  --text-2xl:  2rem;      /* 32px */
  --text-3xl:  2.5rem;    /* 40px */
  --text-4xl:  3rem;      /* 48px */

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Border radius */
  --radius-sm:   0.5rem;
  --radius-md:   0.875rem;
  --radius-lg:   1.25rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-card: 0 1px 3px rgba(26, 57, 41, 0.08), 0 1px 2px rgba(26, 57, 41, 0.06);
  --shadow-hover: 0 4px 12px rgba(26, 57, 41, 0.12);

  /* Layout */
  --max-width:     1200px;
  --content-width: 700px;
  --nav-height:    105px;
}

/* ============================================================
   Reset & Base
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-body);
  background-color: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

/* ============================================================
   Typography
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-body);
  line-height: 1.2;
  font-weight: 500;
  text-wrap: balance;
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-md); }

/* Abril Fatface accent — single words only */
.word-accent {
  font-family: var(--font-heading);
  font-weight: 700;
}

p {
  line-height: 1.7;
}

/* ============================================================
   Layout Utilities
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

.container--narrow {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

.text-center { text-align: center; }

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--green-primary);
  height: var(--nav-height);
  display: flex;
  align-items: center;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav__logo-img {
  height: 80px;
  width: auto;
}

/* White logo for dark nav (index.html) */
.nav__logo-img--white {
  filter: brightness(0) invert(1);
}

/* Category page: clip any logo overflow as safety */
.nav--light .nav__logo {
  display: block;
  overflow: hidden;
}

/* Category page: colour logo dark green #183f34 */
.nav--light .nav__logo-img {
  filter: brightness(0) invert(17%) sepia(100%) saturate(244%) hue-rotate(123deg) brightness(0.9);
}

.nav--light {
  background-color: var(--cream);
}

.nav__back {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: #183f34;
  padding: var(--space-2) 0;
  min-height: 44px;
  transition: opacity 0.2s;
}

.nav__back:hover {
  opacity: 0.7;
}

.nav__back-arrow {
  font-size: var(--text-md);
  line-height: 1;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-body);
  letter-spacing: 0.01em;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn--primary {
  background-color: var(--white);
  color: var(--green-primary);
  border: 2px solid var(--white);
}

.btn--primary:hover {
  background-color: var(--cream);
  border-color: var(--cream);
}

.btn--outline {
  background-color: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.6);
}

.btn--outline:hover {
  border-color: var(--white);
  background-color: rgba(255, 255, 255, 0.08);
}

.btn--outline-green {
  background-color: transparent;
  color: var(--green-primary);
  border: 1.5px solid var(--green-primary);
}

.btn--outline-green:hover {
  background-color: var(--green-primary);
  color: var(--white);
}

.btn--amazon {
  background-color: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  font-size: var(--text-xs);
  padding: 0.5rem 1rem;
  transition: opacity 0.3s ease-out, transform 0.3s ease-out,
              background-color 0.2s ease, border-color 0.2s ease;
}

.btn--amazon:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.7);
}

/* Scroll-reveal state — hidden while hero is in view */
.btn--amazon.is-nav-hidden {
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .btn--amazon.is-nav-hidden {
    transform: none;
  }
}

/* ============================================================
   Hero Section
   ============================================================ */
.hero {
  background-color: var(--green-primary);
  padding: var(--space-16) 0 30px;
  position: relative;
  overflow: hidden;
}

/* Mobile: stacked, centered */
.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-12);
  text-align: center;
}

.hero__title {
  font-size: var(--text-3xl);
  font-weight: 400;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: var(--space-5);
  letter-spacing: -0.02em;
}

.hero__subtitle {
  font-size: var(--text-md);
  color: rgba(255, 255, 255, 0.8);
  max-width: 400px;
  margin: -10px auto var(--space-8);
  line-height: 1.6;
}

.hero__actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

.hero__image {
  width: calc(100% + 2 * var(--space-5));
  margin-left: calc(-1 * var(--space-5));
  margin-right: calc(-1 * var(--space-5));
}

/* Carousel — sliding right-to-left */
.carousel {
  width: 100%;
  overflow: hidden;
}

.carousel__track {
  display: flex;
  width: 300%; /* 3 slides */
  transition: transform 0.5s cubic-bezier(0.25, 0, 0.1, 1);
  will-change: transform;
}

.carousel__slide {
  width: calc(100% / 3);
  flex-shrink: 0;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .carousel__track { transition: none; }
}

/* Dots sit BELOW the carousel, not overlaid */
.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 2px;
  margin-top: 1px;
  padding: var(--space-2) 0;
}

.carousel__dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.carousel__dot::after {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transition: background 0.3s ease, transform 0.3s ease;
}

.carousel__dot.is-active::after {
  background: var(--white);
  transform: scale(1.5);
}

/* Desktop: side-by-side split */
@media (min-width: 768px) {
  .hero {
    padding-top: 0;
    padding-bottom: 30px;
  }

  .hero__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    gap: var(--space-16);
    text-align: left;
  }

  .hero__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: var(--space-16);
    padding-bottom: var(--space-8);
  }

  .hero__title {
    font-size: clamp(var(--text-3xl), 4vw, var(--text-4xl));
  }

  .hero__subtitle {
    margin: -10px 0 var(--space-8);
  }

  .hero__actions {
    justify-content: flex-start;
  }

  .hero__image {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    align-self: start;
  }
}

/* ============================================================
   Product Brief Section
   ============================================================ */
.product-brief {
  background-color: var(--cream);
  padding: 0 0 var(--space-16);
  text-align: center;
}

.product-brief__photo {
  position: relative;
  margin-bottom: var(--space-10);
}

.product-brief__photo::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background-color: var(--white);
  z-index: 0;
}

.product-brief__photo img {
  position: relative;
  z-index: 1;
  width: calc(100% + 2 * var(--space-5));
  margin-left: calc(-1 * var(--space-5));
  border-radius: 0;
  display: block;
}

.product-brief__label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-primary);
  margin-bottom: var(--space-4);
}

.product-brief__title {
  font-size: var(--text-2xl);
  color: var(--green-primary);
  margin-bottom: var(--space-5);
}

.product-brief__text {
  font-size: var(--text-md);
  color: var(--green-primary);
  max-width: 480px;
  margin: 0 auto var(--space-8);
  line-height: 1.7;
}

/* Feature cards — Confidence / Dialogue */
.feature-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  max-width: 480px;
  margin: 0 auto;
  text-align: left;
}

.feature-card {
  background-color: var(--cream-dark);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}

.feature-card__icon {
  display: block;
  color: var(--green-accent);
  margin-bottom: var(--space-3);
}

.feature-card__title {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--green-primary);
  margin-bottom: var(--space-2);
}

.feature-card__text {
  font-size: var(--text-base);
  color: var(--green-primary);
  line-height: 1.5;
}

/* ============================================================
   Beautifully Crafted Section
   ============================================================ */
.crafted {
  background-color: var(--cream);
  padding: 0 0 var(--space-16);
  text-align: center;
}

.crafted__photo {
  margin-bottom: var(--space-8);
}

.crafted__photo img {
  width: calc(100% + 2 * var(--space-5));
  margin-left: calc(-1 * var(--space-5));
  border-radius: 0;
  display: block;
  transform: translateX(40px);
}

.crafted__photo-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background-color: var(--cream-dark);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.crafted__title {
  font-size: var(--text-2xl);
  color: var(--green-primary);
  margin-bottom: var(--space-5);
}

.crafted__text {
  font-size: var(--text-md);
  color: var(--green-primary);
  line-height: 1.7;
  margin-bottom: var(--space-6);
}

.crafted__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  text-align: left;
  width: fit-content;
  margin: 0 auto;
}

.crafted__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--green-primary);
}

.crafted__item-icon {
  color: var(--heart);
  font-size: var(--text-md);
  flex-shrink: 0;
  line-height: 1;
}

/* ============================================================
   Final CTA Section
   ============================================================ */
.final-cta {
  background-color: var(--green-primary);
  padding: 0 0 var(--space-16);
  margin-top: -11px;
  text-align: center;
}

.final-cta__title {
  font-size: var(--text-3xl);
  color: var(--white);
  margin-bottom: var(--space-5);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.final-cta__text {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.75);
  margin: 0 auto var(--space-8);
  max-width: 520px;
  line-height: 1.6;
}

.btn--mint {
  background-color: #c5ebd7;
  color: var(--green-primary);
  border: 2px solid transparent;
  font-weight: 600;
}

.btn--mint:hover {
  background-color: #aacfbb;
}

/* ============================================================
   How It Works
   ============================================================ */
.how-it-works {
  background-color: var(--green-primary);
  padding: var(--space-16) 0;
  text-align: center;
}

.how-it-works__title {
  font-size: var(--text-2xl);
  color: var(--white);
  margin-bottom: var(--space-12);
}

.how-it-works__steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
  max-width: 560px;
  margin: 0 auto;
}

.step__number {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: var(--space-2);
}

.step__label {
  font-size: var(--text-md);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

/* ============================================================
   Categories Section
   ============================================================ */
.categories {
  background-color: var(--green-primary);
  padding: var(--space-16) 0 var(--space-20);
  scroll-margin-top: var(--nav-height);
}

.categories__title {
  font-size: var(--text-2xl);
  color: var(--white);
  text-align: center;
  margin-bottom: calc(var(--space-8) + 10px);
  scroll-margin-top: calc(var(--nav-height) + var(--space-4));
}

.categories__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

.categories__more {
  text-align: center;
  margin-top: var(--space-8);
}

.btn--view-more {
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  color: var(--white);
  padding: 0.75rem 2rem;
  border-radius: 100px;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.btn--view-more:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--white);
}

/* ============================================================
   Category Card
   ============================================================ */
.category-card {
  background-color: var(--cream-light);
  border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-5);
  border: 1px solid var(--cream-dark);
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
  display: block;
  text-decoration: none;
  color: inherit;
}

.category-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.category-card__title {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--green-primary);
  margin-bottom: var(--space-2);
  line-height: 1.3;
}

.category-card__description {
  font-size: var(--text-base);
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  background-color: var(--cream);
  padding: var(--space-10) 0 var(--space-8);
}

.footer__main {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  margin-bottom: var(--space-10);
}

.footer__logo {
  flex-shrink: 0;
}

.footer__logo-img {
  height: 80px;
  width: auto;
  display: block;
  filter: brightness(0) saturate(100%) invert(15%) sepia(100%) saturate(300%) hue-rotate(120deg);
}

.footer__ig {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: #183f34;
  font-size: var(--text-base);
  font-weight: 500;
  transition: opacity 0.2s;
  min-height: 44px;
}

.footer__ig:hover {
  opacity: 0.7;
}

.footer__ig-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.footer__ig-text {
  line-height: 1.35;
  max-width: 130px;
}

.footer__nav {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.footer__link {
  font-size: var(--text-base);
  color: #183f34;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.2s;
  padding: 3px 0;
  display: block;
}

.footer__link:hover {
  opacity: 0.7;
}

.footer__legal {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.7;
}

@media (max-width: 767px) {
  .footer__ig { align-self: flex-start; }
  .notes-section .container--narrow { padding-left: var(--space-10); padding-right: calc(var(--space-5) + 10px); }
}

@media (min-width: 768px) {
  .footer__main {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
  }

  .footer__nav {
    align-items: flex-end;
  }

  .footer__legal {
    text-align: center;
  }

  .footer__ig {
    transform: translateX(-23px);
  }
}

/* ============================================================
   Category Page — Header
   ============================================================ */
.category-header {
  background-color: var(--cream);
  padding: var(--space-10) 0 var(--space-6);
  border-bottom: 1px solid var(--cream-dark);
}

.category-header__title {
  font-size: var(--text-3xl);
  color: #183f34;
  margin-bottom: var(--space-3);
  text-align: center;
}

.category-header__description {
  font-size: var(--text-md);
  color: #183f34;
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ============================================================
   Filter Pills
   ============================================================ */
.pills {
  background-color: var(--cream);
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--cream-dark);
  position: sticky;
  top: var(--nav-height);
  z-index: 50;
}

/* Fade hint on trailing edge tells users more pills are scrollable */
.pills__scroll-wrap {
  position: relative;
}

.pills__scroll-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 3rem;
  height: 100%;
  background: linear-gradient(to right, transparent, var(--cream));
  pointer-events: none;
}

.pills__inner {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding-bottom: var(--space-1);
  padding-right: var(--space-10);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.pills__inner::-webkit-scrollbar {
  display: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  min-height: 44px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.18s ease;
  background-color: var(--cream-light);
  color: #183f34;
  border: 1.5px solid var(--cream-dark);
  font-family: var(--font-body);
}

.pill:hover {
  border-color: var(--green-primary);
}

.pill.is-active {
  background-color: var(--green-primary);
  color: var(--white);
  border-color: var(--green-primary);
}

/* ============================================================
   Notes List
   ============================================================ */
.notes-section {
  background-color: var(--cream);
  padding: var(--space-12) 0 var(--space-20);
}

.notes-group {
  margin-bottom: var(--space-12);
}

.notes-group:last-child {
  margin-bottom: 0;
}

.notes-group__title {
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: 600;
  color: #183f34;
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 1.5px solid var(--cream-dark);
}

.notes-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.note-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}

.note-item__heart {
  color: var(--heart);
  flex-shrink: 0;
  margin-top: 0.3em;
}

.note-item__text {
  font-size: var(--text-base);
  color: #183f34;
  line-height: 1.6;
}

/* ============================================================
   Back to top / Explore more
   ============================================================ */
.explore-more {
  text-align: center;
  padding: var(--space-6) 0 var(--space-2);
}

.explore-more__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
  background: none;
  border: none;
}

.explore-more__link:hover {
  color: var(--green-primary);
}

/* ============================================================
   Responsive — Tablet (≥ 640px)
   ============================================================ */
@media (min-width: 640px) {
  h1 { font-size: var(--text-4xl); }

  .hero__title { font-size: var(--text-4xl); }

  .categories__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .how-it-works__steps {
    flex-direction: row;
    justify-content: center;
    gap: var(--space-12);
  }
}

/* ============================================================
   Responsive — Desktop (≥ 1024px)
   ============================================================ */
@media (min-width: 1024px) {
  :root {
    --nav-height: 105px;
  }

  .container {
    padding: 0 var(--space-8);
  }

  .hero {
    padding-top: 0;
    padding-bottom: 30px;
  }

  .hero__title {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
  }

  .categories__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
  }

  .category-card {
    padding: var(--space-6);
  }

  .category-card__title {
    font-size: var(--text-md);
  }

  .feature-card__title {
    font-size: var(--text-md);
  }

  .notes-section {
    padding: var(--space-16) 0 var(--space-24);
  }

  .notes-list {
    gap: var(--space-5);
  }

  .note-item__text {
    font-size: var(--text-md);
  }
}

/* ============================================================
   Accessibility
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--green-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}
