/* ============================================================
   TEA PORT — Design Tokens & Component Styles
   Bold modern / dark navy + crimson red
   ============================================================ */

/* --- Type Scale ------------------------------------------- */
:root {
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);
  --text-hero: clamp(3rem,     0.5rem  + 7vw,    8rem);
}

/* --- Spacing ---------------------------------------------- */
:root {
  --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;
  --space-32: 8rem;
}

/* --- Fonts ------------------------------------------------ */
:root {
  --font-display: 'Clash Display', 'Arial Black', sans-serif;
  --font-body: 'Satoshi', 'Helvetica Neue', sans-serif;
}

/* --- Color — Dark Navy + Crimson Red ---------------------- */
:root, [data-theme="dark"] {
  /* Surfaces — deep navy */
  --color-bg:               #0a0e1a;
  --color-surface:          #0f1424;
  --color-surface-2:        #151b30;
  --color-surface-offset:   #1a2140;
  --color-surface-offset-2: #1f2850;
  --color-surface-dynamic:  #252f5a;
  --color-divider:          #1e2848;
  --color-border:           #2a3560;

  /* Text */
  --color-text:             #e8e6e1;
  --color-text-muted:       #8b8fa0;
  --color-text-faint:       #505672;
  --color-text-inverse:     #0a0e1a;

  /* Primary Accent — Crimson Red */
  --color-primary:          #c8303e;
  --color-primary-hover:    #e03848;
  --color-primary-active:   #a02530;
  --color-primary-highlight: #2a1520;

  /* Warm Amber (secondary accent) */
  --color-amber:            #d4983d;
  --color-amber-hover:      #e0a84d;

  /* Success */
  --color-success:          #4a9b5a;
  --color-error:            #c8303e;

  /* Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows */
  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.4);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.5);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;
}

/* Light mode */
[data-theme="light"] {
  --color-bg:               #f5f3ee;
  --color-surface:          #ffffff;
  --color-surface-2:        #faf9f7;
  --color-surface-offset:   #eae7e0;
  --color-surface-offset-2: #e0ddd5;
  --color-surface-dynamic:  #d5d1c8;
  --color-divider:          #d0ccc3;
  --color-border:           #c5c0b5;

  --color-text:             #1a1820;
  --color-text-muted:       #6b6860;
  --color-text-faint:       #a09b90;
  --color-text-inverse:     #f5f3ee;

  --color-primary:          #a82535;
  --color-primary-hover:    #c8303e;
  --color-primary-active:   #8a1d2a;
  --color-primary-highlight: #f5dce0;

  --color-amber:            #b07828;
  --color-amber-hover:      #c88830;

  --color-success:          #3a7a48;
  --color-error:            #a82535;

  --shadow-sm: 0 1px 2px oklch(0.2 0.01 80 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.2 0.01 80 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.2 0.01 80 / 0.12);
}

/* ============================================================
   COMPONENTS
   ============================================================ */

/* --- Skip Link -------------------------------------------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  z-index: 100;
  font-size: var(--text-sm);
}
.skip-link:focus { top: var(--space-2); }

/* --- Header ----------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(from var(--color-bg) l c h / 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.08);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.header--scrolled { box-shadow: var(--shadow-sm); }
.header__inner {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding: var(--space-4) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo { display: flex; align-items: center; gap: var(--space-3); text-decoration: none; color: var(--color-text); }
.logo__icon { width: 36px; height: 36px; flex-shrink: 0; }
.logo__text {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.logo__text span { color: var(--color-primary); }

/* Nav */
.nav { display: flex; align-items: center; gap: var(--space-6); }
.nav__link {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  position: relative;
  padding: var(--space-1) 0;
}
.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--color-primary);
  transition: width 0.25s var(--ease-out);
}
.nav__link:hover { color: var(--color-text); }
.nav__link:hover::after { width: 100%; }

/* Theme toggle */
.theme-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  color: var(--color-text-muted);
  border-radius: var(--radius-md);
}
.theme-toggle:hover { color: var(--color-text); background: var(--color-surface-offset); }

/* Mobile menu */
.mobile-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  color: var(--color-text);
}
.mobile-toggle svg { width: 24px; height: 24px; }

@media (max-width: 767px) {
  .nav { display: none; }
  .nav--open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-4);
    gap: var(--space-4);
  }
  .mobile-toggle { display: flex; }
}

/* --- Hero ------------------------------------------------- */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, oklch(0.08 0.03 260 / 0.92) 0%, oklch(0.08 0.03 260 / 0.6) 50%, oklch(0.08 0.03 260 / 0.4) 100%);
}
.hero__content {
  position: relative;
  z-index: 1;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding: var(--space-16) var(--space-4);
}
.hero__eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--space-6);
  max-width: 14ch;
  line-height: 1.05;
}
.hero__sub {
  font-size: var(--text-base);
  color: rgba(255,255,255,0.75);
  max-width: 48ch;
  margin-bottom: var(--space-8);
  line-height: 1.7;
}
.hero__actions { display: flex; gap: var(--space-4); flex-wrap: wrap; }

/* --- Buttons ---------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background var(--transition-interactive),
              color var(--transition-interactive),
              transform var(--transition-interactive),
              box-shadow var(--transition-interactive);
  min-height: 44px;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--color-primary);
  color: #fff;
}
.btn--primary:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 4px 20px oklch(from var(--color-primary) l c h / 0.35);
}

.btn--outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
}
.btn--outline:hover {
  border-color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.06);
}

/* --- Section containers ----------------------------------- */
.section {
  padding: clamp(var(--space-12), 8vw, var(--space-24)) var(--space-4);
}
.section__inner {
  max-width: var(--content-wide);
  margin-inline: auto;
}
.section__header {
  margin-bottom: clamp(var(--space-8), 4vw, var(--space-16));
}
.section__eyebrow {
  font-size: var(--text-sm);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}
.section__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.1;
}

/* --- Story / About ---------------------------------------- */
.story-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  align-items: center;
}
@media (min-width: 768px) {
  .story-grid { grid-template-columns: 1.1fr 1fr; gap: var(--space-12); }
}
.story__image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.story__image img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.story__content { }
.story__content p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  line-height: 1.7;
}
.story__content p:last-of-type { margin-bottom: 0; }
.story__stat-row {
  display: flex;
  gap: var(--space-8);
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-divider);
}
.stat__number {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}
.stat__label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: var(--space-1);
}

/* --- Featured teas ---------------------------------------- */
.tea-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}
@media (min-width: 600px) {
  .tea-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .tea-grid { grid-template-columns: repeat(4, 1fr); }
}

.tea-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid oklch(from var(--color-text) l c h / 0.06);
  transition: transform var(--transition-interactive), box-shadow var(--transition-interactive);
}
.tea-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.tea-card__image {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--color-surface-offset);
}
.tea-card__image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}
.tea-card:hover .tea-card__image img { transform: scale(1.05); }
.tea-card__body {
  padding: var(--space-4) var(--space-4) var(--space-5);
}
.tea-card__type {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: var(--space-1);
}
.tea-card__name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.tea-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* --- Origin regions (full-bleed) -------------------------- */
.origins {
  position: relative;
  overflow: hidden;
}
.origins__bg {
  position: absolute;
  inset: 0;
}
.origins__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.35;
}
.origins__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--color-bg) 0%, oklch(0.08 0.03 260 / 0.85) 20%, oklch(0.08 0.03 260 / 0.85) 80%, var(--color-bg) 100%);
}
[data-theme="light"] .origins__overlay {
  background: linear-gradient(180deg, var(--color-bg) 0%, oklch(0.96 0.01 80 / 0.9) 20%, oklch(0.96 0.01 80 / 0.9) 80%, var(--color-bg) 100%);
}
.origins__content {
  position: relative;
  z-index: 1;
}
.region-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (min-width: 600px) {
  .region-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .region-cards { grid-template-columns: repeat(3, 1fr); }
}
.region-card {
  background: oklch(from var(--color-surface) l c h / 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid oklch(from var(--color-text) l c h / 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: border-color var(--transition-interactive), transform var(--transition-interactive);
}
.region-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
}
.region-card__name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.region-card__teas {
  font-size: var(--text-sm);
  color: var(--color-primary);
  font-weight: 500;
  margin-bottom: var(--space-3);
}
.region-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* --- Newsletter ------------------------------------------- */
.newsletter {
  background: var(--color-surface);
  border-top: 1px solid var(--color-divider);
  border-bottom: 1px solid var(--color-divider);
}
.newsletter__inner {
  max-width: var(--content-narrow);
  margin-inline: auto;
  text-align: center;
}
.newsletter__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}
.newsletter__desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  margin-inline: auto;
}
.newsletter__form {
  display: flex;
  gap: var(--space-3);
  max-width: 440px;
  margin-inline: auto;
}
.newsletter__input {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--color-text);
  min-height: 44px;
}
.newsletter__input::placeholder { color: var(--color-text-faint); }
.newsletter__input:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 3px oklch(from var(--color-primary) l c h / 0.15);
}
@media (max-width: 480px) {
  .newsletter__form { flex-direction: column; }
}

/* --- Footer ----------------------------------------------- */
.footer {
  padding: var(--space-12) var(--space-4) var(--space-8);
  border-top: 1px solid var(--color-divider);
}
.footer__inner {
  max-width: var(--content-wide);
  margin-inline: auto;
}
.footer__top {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  padding-bottom: var(--space-8);
  border-bottom: 1px solid var(--color-divider);
}
@media (min-width: 768px) {
  .footer__top { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
.footer__brand p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-3);
  max-width: 32ch;
  line-height: 1.6;
}
.footer__col-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-3);
}
.footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.footer__links a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
}
.footer__links a:hover { color: var(--color-text); }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-6);
  flex-wrap: wrap;
  gap: var(--space-4);
}
.footer__copy {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* --- Scroll animations ------------------------------------ */
.fade-in { opacity: 1; }
@supports (animation-timeline: scroll()) {
  .fade-in {
    opacity: 0;
    animation: reveal-fade linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 80%;
  }
}
@keyframes reveal-fade { to { opacity: 1; } }

/* --- Horizontal rule divider ------------------------------ */
.divider {
  width: 48px;
  height: 2px;
  background: var(--color-primary);
  border: none;
  margin: var(--space-6) 0;
}

/* --- Light mode override for hero overlay ----------------- */
[data-theme="light"] .hero__overlay {
  background:
    linear-gradient(135deg, oklch(0.08 0.03 260 / 0.85) 0%, oklch(0.08 0.03 260 / 0.5) 50%, oklch(0.08 0.03 260 / 0.35) 100%);
}
[data-theme="light"] .hero h1 { color: #fff; }
[data-theme="light"] .hero__eyebrow { color: #e86070; }
[data-theme="light"] .hero__sub { color: rgba(255,255,255,0.75); }
[data-theme="light"] .btn--outline { color: #fff; border-color: rgba(255,255,255,0.3); }
[data-theme="light"] .btn--outline:hover { border-color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.06); }
