/* =========================================================
   SŌMA — Sensory Sommelier for Cannabis
   Gilded champagne-gold case study for the Rasveda Labs portfolio
   ========================================================= */

:root {
  --so-bg:        #141110;   /* espresso near-black */
  --so-bg-tint:   #1b1613;
  --so-ink:       #f4efe6;   /* cream text */
  --so-ink-soft:  #c3b8a4;
  --so-ink-dim:   #8f8471;

  --so-gold:      #c8a76a;   /* champagne gold */
  --so-shine:     #f6d88a;   /* accent shine  */
  --so-cream:     #f6f3ee;

  --so-card:      rgba(246, 243, 238, 0.055);  /* frosted cream */
  --so-line:      rgba(200, 167, 106, 0.28);
  --so-line-soft: rgba(200, 167, 106, 0.15);

  --so-radius:    18px;
  --so-maxw:      960px;

  --so-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --so-sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --so-ease:  cubic-bezier(0.22, 1, 0.36, 1);

  --so-gold-grad: linear-gradient(135deg, var(--so-shine), var(--so-gold) 55%, #a9854e);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  font-family: var(--so-sans);
  color: var(--so-ink);
  background: var(--so-bg);
  background-image:
    radial-gradient(140% 90% at 50% -20%, rgba(200, 167, 106, 0.16), transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.skip-link { position: absolute; left: -999px; top: 0; }
.skip-link:focus {
  position: fixed; left: 12px; top: 12px;
  background: var(--so-gold); color: #17130f;
  padding: 10px 16px; border-radius: 10px; z-index: 100; font-weight: 600;
}

.so-container {
  width: 100%; max-width: var(--so-maxw);
  margin-inline: auto; padding-inline: clamp(20px, 5vw, 40px);
}

/* gold gradient text helper */
.so-gold-text {
  background: var(--so-gold-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------- Topbar ---------- */
.so-topbar {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(20, 17, 16, 0.72);
  border-bottom: 1px solid var(--so-line-soft);
}
.so-topbar__inner {
  display: flex; align-items: center; justify-content: space-between; height: 60px;
}
.so-back {
  font-weight: 600; font-size: 0.95rem; color: var(--so-ink);
  display: inline-flex; align-items: center; gap: 0.45em;
  transition: color 0.2s var(--so-ease);
}
.so-back:hover { color: var(--so-shine); }
.so-topbar__tag {
  font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--so-ink-dim);
}

/* ---------- Hero ---------- */
.so-hero {
  position: relative; overflow: hidden;
  padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(2.5rem, 6vw, 4rem);
}
.so-hero__inner { position: relative; z-index: 2; text-align: center; }
.so-leaf {
  position: absolute; z-index: 1;
  top: 6%; left: 50%; transform: translateX(-50%);
  width: min(560px, 90vw); height: auto;
  opacity: 0.10; pointer-events: none;
}
.so-hero__logo {
  width: clamp(280px, 60vw, 560px); height: auto;
  margin: 0 auto clamp(1.25rem, 3vw, 2rem);
  border-radius: 14px;
}
.so-eyebrow {
  font-size: 0.78rem; letter-spacing: 0.24em; text-transform: uppercase;
  font-weight: 600; margin: 0 0 1.1rem;
}
.so-hero__title {
  font-family: var(--so-serif);
  font-weight: 500; font-size: clamp(2.1rem, 5.5vw, 3.6rem);
  line-height: 1.08; letter-spacing: -0.01em;
  margin: 0 auto 1.25rem; max-width: 18ch;
}
.so-hero__lead {
  font-size: clamp(1.08rem, 2.2vw, 1.3rem);
  color: var(--so-ink-soft); max-width: 56ch; margin: 0 auto;
}
.so-meta {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: clamp(1.5rem, 5vw, 3.5rem);
  margin: clamp(2.5rem, 5vw, 3.5rem) 0 0; padding-top: 2rem;
  border-top: 1px solid var(--so-line-soft);
}
.so-meta div { margin: 0; max-width: 26ch; }
.so-meta dt {
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--so-ink-dim); margin-bottom: 0.35rem;
}
.so-meta dd { margin: 0; font-weight: 500; color: var(--so-ink); }

/* ---------- Sections ---------- */
.so-section { padding: clamp(3rem, 8vw, 5.5rem) 0; }
.so-section--tint {
  background: var(--so-bg-tint);
  border-block: 1px solid var(--so-line-soft);
}
.so-prose { max-width: 680px; margin-inline: auto; }
.so-kicker {
  display: inline-block; font-size: 0.75rem; letter-spacing: 0.2em;
  text-transform: uppercase; font-weight: 600; margin-bottom: 0.9rem;
}
.so-h2 {
  font-family: var(--so-serif); font-weight: 500;
  font-size: clamp(1.8rem, 4.4vw, 2.7rem); line-height: 1.12;
  letter-spacing: -0.01em; margin: 0 0 1.25rem;
}
.so-prose p { color: var(--so-ink-soft); font-size: 1.08rem; margin: 0 0 1.1rem; }
.so-prose p em { color: var(--so-shine); font-style: italic; }
.so-prose code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.85em; background: rgba(200, 167, 106, 0.14);
  color: var(--so-shine); padding: 0.1em 0.4em; border-radius: 6px;
}

/* ---------- Feature cards ---------- */
.so-features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.1rem; margin-top: clamp(2rem, 4vw, 3rem);
}
.so-card {
  position: relative; padding: 1.7rem 1.6rem;
  background: var(--so-card);
  border: 1px solid var(--so-line);
  border-radius: var(--so-radius);
  backdrop-filter: blur(8px);
  overflow: hidden;
  transition: transform 0.35s var(--so-ease), border-color 0.35s var(--so-ease);
}
.so-card::before {   /* star-shine glint, corner accent */
  content: ""; position: absolute; top: -30px; right: -30px;
  width: 90px; height: 90px; border-radius: 50%;
  background: radial-gradient(circle, rgba(246, 216, 138, 0.28), transparent 70%);
}
.so-card:hover { transform: translateY(-4px); border-color: var(--so-gold); }
.so-card__idx {
  font-family: var(--so-serif); font-size: 0.9rem; color: var(--so-gold);
  letter-spacing: 0.08em;
}
.so-card h3 {
  font-family: var(--so-serif); font-weight: 500; font-size: 1.28rem;
  margin: 0.35rem 0 0.55rem;
}
.so-card p { margin: 0; color: var(--so-ink-soft); font-size: 0.98rem; line-height: 1.6; }

/* ---------- Sample match medallion ---------- */
.so-match {
  max-width: 420px; margin: clamp(2rem, 4vw, 3rem) auto 0;
  padding: 1.6rem 1.6rem 1.8rem;
  border: 1px solid var(--so-line); border-radius: var(--so-radius);
  background: var(--so-card); backdrop-filter: blur(8px);
  box-shadow: 0 0 0 1px rgba(246, 216, 138, 0.08) inset;
}
.so-match__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.1rem;
}
.so-match__name { font-family: var(--so-serif); font-size: 1.25rem; margin: 0; }
.so-match__score {
  font-family: var(--so-serif); font-size: 1.9rem; line-height: 1;
  font-weight: 600;
}
.so-bar { margin-bottom: 0.85rem; }
.so-bar:last-child { margin-bottom: 0; }
.so-bar__label {
  display: flex; justify-content: space-between;
  font-size: 0.82rem; color: var(--so-ink-soft); margin-bottom: 0.3rem;
  letter-spacing: 0.02em;
}
.so-bar__track {
  height: 6px; border-radius: 999px;
  background: rgba(246, 243, 238, 0.08); overflow: hidden;
}
.so-bar__fill {
  height: 100%; border-radius: 999px; background: var(--so-gold-grad);
  transform-origin: left; transform: scaleX(0);
  transition: transform 1s var(--so-ease);
}
.so-match.is-visible .so-bar__fill { transform: scaleX(var(--v, 0)); }
.so-match__verdict {
  margin: 1.2rem 0 0; padding-top: 1rem;
  border-top: 1px solid var(--so-line-soft);
  font-family: var(--so-serif); font-style: italic; font-size: 0.98rem;
  color: var(--so-ink-soft);
}

/* ---------- Chips / stack ---------- */
.so-chips, .so-stack {
  list-style: none; padding: 0; margin: 1.75rem 0 0;
  display: flex; flex-wrap: wrap; gap: 0.6rem;
}
.so-chips li, .so-stack span {
  font-size: 0.85rem; font-weight: 500; padding: 0.45em 0.95em;
  border: 1px solid var(--so-line); border-radius: 999px;
  background: var(--so-card); color: var(--so-ink-soft);
}

/* ---------- Palette swatches ---------- */
.so-palette {
  display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.75rem;
}
.so-swatch { display: flex; align-items: center; gap: 0.6rem; font-size: 0.85rem; color: var(--so-ink-soft); }
.so-swatch__dot {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--so-line-soft); flex: none;
}

/* ---------- CTA ---------- */
.so-cta {
  text-align: center; padding: clamp(4rem, 9vw, 6.5rem) 0;
  background: radial-gradient(90% 130% at 50% 120%, rgba(200, 167, 106, 0.22), transparent 60%), var(--so-bg);
}
.so-cta__mark { font-size: 1.6rem; letter-spacing: 0.4em; margin: 0 0 0.75rem; }
.so-cta__title {
  font-family: var(--so-serif); font-weight: 500; font-style: italic;
  font-size: clamp(1.9rem, 5vw, 3rem); margin: 0 0 0.9rem;
}
.so-cta__lead { color: var(--so-ink-soft); margin: 0 0 2rem; }
.so-btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  padding: 0.85em 1.6em; border-radius: 999px; font-weight: 600;
  color: #17130f; background: var(--so-gold-grad);
  box-shadow: 0 10px 30px -12px rgba(200, 167, 106, 0.7);
  transition: transform 0.25s var(--so-ease), box-shadow 0.25s var(--so-ease);
}
.so-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(200, 167, 106, 0.85); }
.so-btn-ghost {
  display: inline-flex; align-items: center; gap: 0.5em;
  padding: 0.85em 1.6em; border-radius: 999px; font-weight: 600;
  color: var(--so-ink); border: 1px solid var(--so-line);
  transition: border-color 0.25s var(--so-ease), color 0.25s var(--so-ease);
}
.so-btn-ghost:hover { border-color: var(--so-gold); color: var(--so-shine); }
.so-hero__actions, .so-cta__actions {
  display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center;
}
.so-hero__actions { margin: 1.9rem 0 0; }

/* ---------- Footer ---------- */
.so-footer { border-top: 1px solid var(--so-line-soft); padding: 2.5rem 0; background: var(--so-bg); }
.so-footer__inner {
  display: flex; flex-wrap: wrap; gap: 0.75rem;
  justify-content: space-between; align-items: center;
  color: var(--so-ink-dim); font-size: 0.9rem;
}
.so-footer__inner p { margin: 0; }
.so-footer a { color: var(--so-gold); font-weight: 600; }
.so-footer a:hover { color: var(--so-shine); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s var(--so-ease), transform 0.7s var(--so-ease); }
.reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 560px) {
  .so-meta { gap: 1.5rem; }
  .so-meta div { max-width: none; }
}
