/* ═══════════════════════════════════════════════════════════
   THEME COLORS: Mirror the Tailwind config colors here.
   When changing themes, update BOTH the Tailwind config in
   index.html AND these CSS variables to match.
   ═══════════════════════════════════════════════════════════ */

:root {
  --theme-primary:      #154145;
  --theme-primary-dark:  #0e2d30;
  --theme-primary-mid:   #1f5c5f;
  --theme-accent:        #5e9787;
  --theme-accent-warm:   #5e9787;
  --theme-light:         #EBEBEB;
  --theme-light-alt:     #f8f8f8;
  --theme-ink:           #154145;
  --theme-ink-soft:      #033E3E;

  /* Typography scale */
  --fs-display:  clamp(3rem, 6vw, 5.5rem);
  --fs-h1:       clamp(2.2rem, 4.5vw, 4rem);
  --fs-h2:       clamp(1.8rem, 3.5vw, 3rem);
  --fs-h3:       clamp(1.1rem, 2vw, 1.4rem);
  --fs-body:     clamp(0.95rem, 1.2vw, 1.1rem);
  --fs-small:    clamp(0.8rem, 1vw, 0.9rem);
  --fs-caption:  0.75rem;

  /* Spacing */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  6rem;
  --space-2xl: 10rem;

  /* Transitions */
  --ease-out-quart: cubic-bezier(0.165, 0.84, 0.44, 1);
  --ease-out-expo:  cubic-bezier(0.19, 1, 0.22, 1);
  --t-fast:   0.25s;
  --t-medium: 0.5s;
  --t-slow:   0.8s;

  /* Shadows */
  --shadow-card: 0 4px 24px -4px rgba(21, 65, 69, 0.10),
                 0 1px 4px rgba(21, 65, 69, 0.06);
  --shadow-card-hover: 0 20px 50px -12px rgba(21, 65, 69, 0.22),
                       0 4px 12px rgba(21, 65, 69, 0.08);
  --shadow-elevated: 0 32px 64px -16px rgba(21, 65, 69, 0.18);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Outfit', sans-serif;
  font-weight: 400;
  color: var(--theme-ink);
  background-color: var(--theme-light);
  line-height: 1.7;
  font-size: var(--fs-body);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  border-top: env(safe-area-inset-top) solid transparent;
}

#header {
  padding-top: env(safe-area-inset-top);
}

#intro {
  padding-top: env(safe-area-inset-top);
}

h1, h2, h3, h4,
.magazine-title,
.intro-logo,
#headerLogo {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

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

/* --- Grain Overlay --- */
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 180px;
  z-index: 1;
  mix-blend-mode: multiply;
}

/* ═══════════════════════════════════════
   THEME GRADIENT UTILITIES
   All gradients reference CSS variables so
   they automatically follow the theme.
   ═══════════════════════════════════════ */
.bg-gradient-hero {
  background: linear-gradient(170deg, var(--theme-light) 0%, var(--theme-light-alt) 40%, rgba(21,65,69,0.06) 100%);
}
.bg-gradient-dark {
  background: linear-gradient(160deg, var(--theme-primary-dark) 0%, var(--theme-primary) 50%, var(--theme-primary-mid) 100%);
}
.bg-gradient-nav {
  background: linear-gradient(180deg, var(--theme-primary-dark) 0%, var(--theme-primary) 100%);
}
.bg-gradient-shop {
  background: linear-gradient(170deg, var(--theme-light) 0%, var(--theme-light-alt) 60%, rgba(21,65,69,0.05) 100%);
}

.border-theme-accent {
  border: 1px solid rgba(94, 151, 135, 0.2);
}

.border-theme-accent-top {
  border-bottom: 1px solid rgba(94, 151, 135, 0.15);
}

.border-theme-accent-bottom {
  border-top: 1px solid rgba(94, 151, 135, 0.15);
}

.pattern-diagonal {
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 20px,
    var(--theme-accent) 20px,
    var(--theme-accent) 21px
  );
}

/* ═══════════════════════════════════════
   INTRO SPLASH
   ═══════════════════════════════════════ */
.intro-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--theme-primary);
  white-space: nowrap;
  opacity: 0;
  transform: scale(0.85);
  animation: introZoom 0.6s var(--ease-out-expo) forwards;
  position: absolute;
}

.intro-logo::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  color: var(--theme-accent);
  overflow: hidden;
  white-space: nowrap;
  animation: wipeReveal 2.2s ease forwards 0.9s;
}

@keyframes introZoom {
  0%   { opacity: 0; transform: scale(0.85) translateY(10px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes wipeReveal {
  0%   { width: 0; }
  50%  { width: 100%; }
  100% { width: 0; }
}

/* ═══════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════ */
nav a,
nav button {
  position: relative;
  display: inline-block;
  padding-bottom: 3px;
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
  font-size: var(--fs-small);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: inherit;
  transition: color var(--t-fast) ease;
}

nav a::after,
nav button::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--theme-accent);
  transition: width var(--t-medium) var(--ease-out-expo);
}

nav a:hover::after,
nav button:hover::after {
  width: 100%;
}

nav a:hover,
nav button:hover {
  color: var(--theme-accent);
}

/* Dropdown hover */
.dropdown:hover .dropdown-menu {
  display: block;
}

/* ═══════════════════════════════════════
   HERO / HOME BANNER
   ═══════════════════════════════════════ */
.home-banner {
  position: relative;
  overflow: hidden;
  width: 100%;
  isolation: isolate;
}

.home-banner-image {
  display: block;
  width: 100%;
  height: 14rem;
  object-fit: cover;
  object-position: center top;
}

@media (min-width: 768px) {
  .home-banner-image { height: 18rem; }
}

@media (min-width: 1024px) {
  .home-banner-image { height: 22rem; }
}

/* Gradient overlay on top of the image */
.home-banner-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  background: linear-gradient(
    to top,
    rgba(14, 45, 48, 0.85) 0%,
    rgba(21, 65, 69, 0.55) 40%,
    rgba(21, 65, 69, 0.25) 70%,
    rgba(21, 65, 69, 0.15) 100%
  );
}

.home-banner-overlay h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.8rem);
  color: var(--theme-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
  margin-bottom: 0.5rem;
  line-height: 1.15;
}

.home-banner-overlay p {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(0.85rem, 1.5vw, 1.1rem);
  color: var(--theme-light);
  opacity: 0.85;
  max-width: 520px;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.btn-learn-more {
  display: inline-block;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--theme-primary-dark);
  background: var(--theme-accent);
  padding: 0.75rem 2.2rem;
  border: none;
  text-decoration: none;
  transition: transform var(--t-medium) var(--ease-out-quart),
    background-color var(--t-fast) ease,
    color var(--t-fast) ease,
    box-shadow var(--t-fast) ease;
}

.btn-learn-more:hover {
  background: var(--theme-light);
  color: var(--theme-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

/* Gradient text utility */
.gradient-text {
  background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-accent-warm) 50%, var(--theme-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Decorative editorial line */
.editorial-line {
  width: 60px;
  height: 2px;
  background: var(--theme-accent);
  border: none;
  margin: var(--space-md) auto;
}

/* Magazine cover hover */
.magazine-cover {
  transition: transform var(--t-slow) var(--ease-out-expo),
              box-shadow var(--t-medium) ease;
}

.magazine-cover:hover {
  transform: rotate(0deg) scale(1.05) !important;
  box-shadow: var(--shadow-elevated);
}

/* ═══════════════════════════════════════
   ARTICLE CARDS
   ═══════════════════════════════════════ */
.glass-card {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(94, 151, 135, 0.15);
  padding: var(--space-md);
  border-radius: 0;
  box-shadow: var(--shadow-card);
  transition: transform var(--t-medium) var(--ease-out-quart),
              box-shadow var(--t-medium) ease,
              border-color var(--t-fast) ease;
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--theme-accent), var(--theme-accent-warm), var(--theme-accent));
  opacity: 0;
  transition: opacity var(--t-fast) ease;
}

.article-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(94, 151, 135, 0.35);
}

.article-card:hover::before {
  opacity: 1;
}

/* Image Container and Overlays */
.image-container {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  margin-bottom: var(--space-sm);
}

.article-image {
  width: 100%;
  height: 13rem;
  object-fit: cover;
  border-radius: 0;
  transition: transform var(--t-slow) var(--ease-out-expo),
              filter var(--t-medium) ease;
  filter: saturate(0.9);
}

.group:hover .article-image {
  transform: scale(1.08);
  filter: saturate(1.05);
}

.image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(14, 45, 48, 0.85) 0%, rgba(14, 45, 48, 0.2) 50%, transparent 100%);
  opacity: 0;
  transition: opacity var(--t-medium) ease;
  display: flex;
  align-items: flex-end;
  padding: var(--space-sm);
}

.group:hover .image-overlay {
  opacity: 1;
}

.category-tag {
  padding: 0.35rem 0.85rem;
  border-radius: 2px;
  font-size: var(--fs-caption);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--theme-accent) !important;
  color: var(--theme-primary-dark) !important;
}

/* ═══════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════ */
.ripple-button {
  position: relative;
  overflow: hidden;
  display: inline-block;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: var(--fs-small);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform var(--t-medium) var(--ease-out-quart),
    background-color var(--t-fast) ease,
    color var(--t-fast) ease,
    box-shadow var(--t-fast) ease;
  border: none;
  cursor: pointer;
}

.ripple-button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(94, 151, 135, 0.25);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.ripple-button:hover::before {
  width: 300px;
  height: 300px;
}

.ripple-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(25, 65, 66, 0.2);
}

/* Primary CTA Button */
.btn-primary {
  background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-primary-mid) 100%);
  color: var(--theme-light);
  padding: 1rem 2.5rem;
  border-radius: 0;
  border: 1px solid rgba(94, 151, 135, 0.3);
  font-size: var(--fs-small);
  transition: transform var(--t-medium) var(--ease-out-quart),
    background-color var(--t-fast) ease,
    color var(--t-fast) ease,
    border-color var(--t-fast) ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--theme-accent) 0%, var(--theme-accent) 100%);
  color: var(--theme-primary-dark);
  border-color: var(--theme-accent);
  transform: translateY(-2px);
}

/* ═══════════════════════════════════════
   SCROLL REVEAL ANIMATIONS
   ═══════════════════════════════════════ */
[data-reveal] {
  opacity: 0;
  transition: opacity var(--t-slow) var(--ease-out-expo),
              transform var(--t-slow) var(--ease-out-expo);
}

[data-reveal="up"]    { transform: translateY(40px); }
[data-reveal="left"]  { transform: translateX(-40px); }
[data-reveal="right"] { transform: translateX(40px); }
[data-reveal="scale"] { transform: scale(0.92); }
[data-reveal="fade"]  { transform: none; }

[data-reveal].revealed {
  opacity: 1;
  transform: none;
}

[data-reveal-stagger] > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-out-expo),
              transform 0.6s var(--ease-out-expo);
}

[data-reveal-stagger].revealed > *:nth-child(1) { transition-delay: 0.05s; }
[data-reveal-stagger].revealed > *:nth-child(2) { transition-delay: 0.12s; }
[data-reveal-stagger].revealed > *:nth-child(3) { transition-delay: 0.19s; }
[data-reveal-stagger].revealed > *:nth-child(4) { transition-delay: 0.26s; }
[data-reveal-stagger].revealed > *:nth-child(5) { transition-delay: 0.33s; }
[data-reveal-stagger].revealed > *:nth-child(6) { transition-delay: 0.40s; }

[data-reveal-stagger].revealed > * {
  opacity: 1;
  transform: none;
}

/* ═══════════════════════════════════════
   SECTION DIVIDERS
   ═══════════════════════════════════════ */
.section-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--theme-accent), transparent);
  border: none;
  margin: 0;
}

/* ═══════════════════════════════════════
   IMAGE SLIDESHOW (Shop)
   ═══════════════════════════════════════ */
.image-slideshow img {
  transition: opacity 1.2s ease, transform 1.2s var(--ease-out-expo);
}

/* ═══════════════════════════════════════
   CONTACT CARDS
   ═══════════════════════════════════════ */
.contact-card {
  text-align: center;
  padding: var(--space-md);
  border: 1px solid rgba(94, 151, 135, 0.15);
  border-radius: 0;
  transition: border-color var(--t-fast) ease, transform var(--t-fast) ease;
  background: rgba(255, 255, 255, 0.03);
}

.contact-card:hover {
  border-color: var(--theme-accent);
  transform: translateY(-4px);
}

/* ═══════════════════════════════════════
   SHOP CARDS
   ═══════════════════════════════════════ */
.shop-card {
  background: rgba(255, 255, 255, 0.85);
  padding: 2rem;
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform var(--t-medium) ease-out, box-shadow var(--t-medium) ease-out, border-color var(--t-fast) ease;
  border: 1px solid rgba(94, 151, 135, 0.2);
}

.shop-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px -8px rgba(25, 65, 66, 0.15);
}

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */

/* --- Small phones (≤480px) --- */
@media (max-width: 480px) {
  .intro-logo {
    font-size: clamp(1.6rem, 10vw, 2.8rem) !important;
    letter-spacing: 0.12em;
  }

  .home-banner-image {
    height: 10rem;
  }

  .home-banner-overlay {
    padding: 0.75rem;
  }

  .home-banner-overlay h2 {
    font-size: 1.1rem;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
  }

  .home-banner-overlay p {
    font-size: 0.7rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
  }

  .btn-learn-more {
    font-size: 0.65rem;
    padding: 0.5rem 1.2rem;
    letter-spacing: 0.1em;
  }

  .btn-primary {
    padding: 0.75rem 1.5rem;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
  }

  .editorial-line {
    width: 40px;
    margin: 1rem auto;
  }
}

/* --- Tablets and below (≤768px) --- */
@media (max-width: 768px) {
  .intro-logo {
    font-size: clamp(2.4rem, 10vw, 3.8rem) !important;
    letter-spacing: 0.15em;
  }

  .home-banner-image {
    height: 12rem;
  }

  .home-banner-overlay {
    padding: 1rem;
  }

  .home-banner-overlay h2 {
    font-size: 1.4rem;
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
  }

  .home-banner-overlay p {
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
  }

  .btn-learn-more {
    font-size: 0.7rem;
    padding: 0.6rem 1.5rem;
  }

  .article-image {
    height: 11rem;
  }

  .magazine-cover {
    max-width: 10rem;
  }

  [data-reveal] {
    transform: translateY(20px) !important;
  }
}

/* ═══════════════════════════════════════
   UTILITY ANIMATIONS
   ═══════════════════════════════════════ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { width: 0; }
  to   { width: 100%; }
}

.animate-fade-in { animation: fadeInUp 0.8s var(--ease-out-expo) both; }
.animate-slide-in { animation: slideIn 1.2s var(--ease-out-expo) both; }

.article-content p {
  text-wrap: pretty;
}

.article-content h1,
.article-content h2,
.article-content h3 {
  text-wrap: balance;
}

.article-meta {
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .intro-logo::after,
  .image-slideshow img,
  [data-reveal],
  [data-reveal-stagger] > * {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

/* ═══════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--theme-light); }
::-webkit-scrollbar-thumb { background: var(--theme-accent); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--theme-primary-mid); }

/* ═══════════════════════════════════════
   SELECTION
   ═══════════════════════════════════════ */
::selection {
  background: var(--theme-accent);
  color: var(--theme-primary-dark);
}
