/* ============================================
   Covet — Luxury Editorial Marketing Site
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600&family=Playfair+Display:wght@400;500;600&display=swap');

/* --- Custom Properties --- */
:root {
  --bg-ivory: #F8F5EF;
  --text-primary: #111111;
  --text-secondary: #5E5A55;
  --sage: #8A9A7B;
  --sage-soft: #D8DED0;
  --beige-warm: #DDD2C4;
  --white: #FFFFFF;

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --radius-full: 9999px;

  --shadow-soft: 0 4px 24px rgba(17, 17, 17, 0.06);
  --shadow-card: 0 8px 40px rgba(17, 17, 17, 0.08);

  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --max-width: 1120px;
}

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

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

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-primary);
  background-color: var(--bg-ivory);
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

a:hover {
  color: var(--sage);
}

ul, ol {
  list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
}

h2 {
  font-size: clamp(2rem, 4.5vw, 3rem);
}

h3 {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 500;
}

p {
  color: var(--text-secondary);
}

.text-primary {
  color: var(--text-primary);
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: clamp(4rem, 10vw, 7rem) 0;
}

/* --- Animations --- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes shimmer {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.7; }
}

.animate {
  animation: fadeUp 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  opacity: 0;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.35s; }
.animate-delay-4 { animation-delay: 0.5s; }
.animate-delay-5 { animation-delay: 0.65s; }

/* --- Header --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  background: rgba(248, 245, 239, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.site-header.scrolled {
  border-bottom-color: rgba(216, 222, 208, 0.6);
  box-shadow: var(--shadow-soft);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  flex-shrink: 0;
}

.logo:hover {
  opacity: 0.75;
}

.logo-img {
  height: 36px;
  width: auto;
  max-width: 100%;
  display: block;
  object-fit: contain;
}

.logo-img--footer {
  height: 28px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-primary);
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.btn-primary {
  background: var(--text-primary);
  color: var(--bg-ivory);
  box-shadow: 0 4px 20px rgba(17, 17, 17, 0.15);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(17, 17, 17, 0.2);
  color: var(--bg-ivory);
}

.btn-secondary {
  background: var(--sage-soft);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--beige-warm);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.btn-apple {
  background: var(--text-primary);
  color: var(--bg-ivory);
  padding: 1.125rem 2.25rem;
  font-size: 1rem;
}

.btn-apple svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 6rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  display: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--beige-warm), transparent);
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 3rem;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 560px;
}

.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 1.5rem;
}

.hero h1 {
  margin-bottom: 1.5rem;
}

.hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.7;
  max-width: 540px;
  margin-bottom: 2.5rem;
}

/* --- Hero Visual (Reference Mockup) --- */
.hero-visual {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 620px;
  margin-left: auto;
}

.hero-mockup-image {
  width: 100%;
  max-width: 600px;
  height: auto;
  display: block;
  object-fit: contain;
}

/* --- Section Headers --- */
.section-header {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 3.5rem;
}

.section-header h2 {
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.0625rem;
}

.section-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 0.75rem;
}

/* --- How It Works --- */
.how-it-works {
  background: var(--white);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  margin-top: -1px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.step-card {
  background: var(--bg-ivory);
  border-radius: var(--radius-md);
  padding: 2.25rem 2rem;
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid rgba(216, 222, 208, 0.5);
}

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

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--sage-soft);
  color: var(--sage);
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  margin-bottom: 1.5rem;
}

.step-card h3 {
  font-family: var(--font-display);
  font-weight: 500;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.step-card p {
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* --- Curated Category Cards --- */
#categories .container {
  max-width: 1240px;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

.category-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-ivory);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(216, 222, 208, 0.45);
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.category-card-media {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--bg-ivory);
}

.category-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.category-card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(221, 210, 196, 0.45) 0%,
    rgba(216, 222, 208, 0.18) 18%,
    transparent 42%
  );
  pointer-events: none;
}

/* --- Final CTA --- */
.final-cta {
  text-align: center;
  position: relative;
}

.final-cta-inner {
  background: linear-gradient(135deg, var(--sage-soft) 0%, var(--beige-warm) 100%);
  border-radius: var(--radius-lg);
  padding: clamp(3rem, 8vw, 5rem) 2rem;
  position: relative;
  overflow: hidden;
}

.final-cta-inner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -25%;
  width: 60%;
  height: 150%;
  background: radial-gradient(circle, rgba(138, 154, 123, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.final-cta h2 {
  max-width: 640px;
  margin: 0 auto 1rem;
  position: relative;
}

.final-cta p {
  font-size: 1.0625rem;
  max-width: 480px;
  margin: 0 auto 2rem;
  position: relative;
}

.final-cta .btn {
  position: relative;
}

/* --- Footer --- */
.site-footer {
  padding: 3rem 0 2.5rem;
  border-top: 1px solid var(--sage-soft);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.footer-brand:hover {
  opacity: 0.75;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem 2.5rem;
}

.footer-links a {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  opacity: 0.7;
}

/* --- Legal / Support Pages --- */
.page-hero {
  padding-top: 8rem;
  padding-bottom: 3rem;
  text-align: center;
  border-bottom: 1px solid var(--sage-soft);
}

.page-hero h1 {
  margin-bottom: 0.75rem;
}

.page-hero p {
  font-size: 1.0625rem;
}

.legal-content,
.support-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

.legal-content h2,
.support-content h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p,
.legal-content li,
.support-content p {
  margin-bottom: 1rem;
  font-size: 0.9375rem;
  line-height: 1.75;
}

.legal-content ul,
.legal-content ol {
  margin-bottom: 1rem;
  padding-left: 1.25rem;
}

.legal-content ul {
  list-style: disc;
}

.legal-content ol {
  list-style: decimal;
}

.legal-content li {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.legal-content a {
  color: var(--sage);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-content h3 {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.legal-highlight {
  background: var(--white);
  border-left: 3px solid var(--sage);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.5rem 0;
}

.legal-highlight p {
  margin-bottom: 0;
  color: var(--text-primary);
}

.support-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 3rem 2.5rem;
  text-align: center;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(216, 222, 208, 0.5);
}

.support-card h2 {
  margin-top: 0;
  margin-bottom: 1rem;
}

.support-email {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text-primary);
  padding: 0.75rem 1.5rem;
  background: var(--sage-soft);
  border-radius: var(--radius-full);
  margin-top: 0.5rem;
  transition: background var(--transition), transform var(--transition);
}

.support-email:hover {
  background: var(--beige-warm);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.support-note {
  margin-top: 2rem;
  font-size: 0.875rem;
}

.legal-updated {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  opacity: 0.7;
  margin-bottom: 2rem;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .hero .container {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

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

  .hero-visual {
    margin: 0 auto;
    max-width: 500px;
  }

  .hero-mockup-image {
    max-width: 480px;
  }

  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 960px) and (min-width: 769px) {
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(248, 245, 239, 0.98);
    backdrop-filter: blur(16px);
    padding: 1.5rem;
    gap: 1.25rem;
    border-bottom: 1px solid var(--sage-soft);
    box-shadow: var(--shadow-soft);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .hero {
    min-height: auto;
    padding-top: 7rem;
    padding-bottom: 4rem;
  }

  .hero-visual {
    max-width: 380px;
    margin: 0 auto;
  }

  .hero-mockup-image {
    max-width: 360px;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  #categories .container {
    padding-right: 0;
  }

  .categories-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 0 1.5rem 0.5rem;
    margin: 0 -0.5rem;
  }

  .categories-scroll::-webkit-scrollbar {
    display: none;
  }

  .categories-grid {
    display: flex;
    gap: 0.875rem;
    width: max-content;
    padding-right: 1.5rem;
  }

  .category-card {
    flex: 0 0 68vw;
    max-width: 260px;
    scroll-snap-align: start;
  }

  .footer-inner {
    gap: 1.25rem;
  }

  .footer-links {
    flex-direction: column;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .btn {
    width: 100%;
  }

  .hero-sub {
    margin-bottom: 2rem;
  }

  .hero-mockup-image {
    max-width: 300px;
  }

  .final-cta-inner {
    padding: 2.5rem 1.5rem;
  }

  .support-card {
    padding: 2rem 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
