/* ============================================================
   OLINAVE — design system
   Palette + glass + type + motion primitives
   Derived from the brand orb: amber → cream → sage on warm white
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Schibsted+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* surfaces */
  --bg:        #f1eee7;
  --bg-2:      #e9e4da;
  --paper:     #faf8f3;

  /* ink */
  --ink:       #232019;
  --ink-soft:  #6a6258;
  --ink-faint: #9b9388;
  --line:      rgba(35,32,25,0.10);
  --line-2:    rgba(35,32,25,0.06);

  /* brand gradient stops */
  --amber:      #cc8a3b;
  --amber-deep: #a85a22;
  --cream:      #e4d3ac;
  --sage:       #9dc1a5;
  --sage-deep:  #6f9d7d;

  /* the signature gradient */
  --grad: linear-gradient(102deg, var(--amber-deep) 0%, var(--amber) 22%, var(--cream) 52%, var(--sage) 80%, var(--sage-deep) 100%);
  --grad-soft: linear-gradient(102deg, #d49a4d 0%, #e7d6b0 50%, #a8c8ae 100%);

  /* glass */
  --glass-bg:     rgba(255,253,248,0.55);
  --glass-bg-2:   rgba(255,253,248,0.38);
  --glass-border: rgba(255,255,255,0.65);
  --glass-shadow: 0 18px 50px -22px rgba(64,48,28,0.30), 0 2px 8px -3px rgba(64,48,28,0.12);
  --glass-blur:   blur(22px) saturate(150%);

  /* spacing rhythm */
  --gut: clamp(20px, 5vw, 64px);
  --maxw: 1240px;

  --r-sm: 12px;
  --r:    18px;
  --r-lg: 28px;
  --r-xl: 36px;

  /* tweakable hooks */
  --grad-angle: 100deg;
  --glass-alpha: 0.55;
  --orb-hue: 0deg;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Schibsted Grotesk', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1,h2,h3,h4 { margin: 0; font-weight: 600; letter-spacing: -0.025em; line-height: 1.04; }
p { margin: 0; }
::selection { background: rgba(204,138,59,0.25); }

/* ---------- ambient animated background ---------- */
.bg-field {
  position: fixed; inset: 0; z-index: -2; overflow: hidden;
  background: var(--bg);
}
.bg-field::after { /* grain */
  content: ""; position: absolute; inset: -50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%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.4'/%3E%3C/svg%3E");
  opacity: 0.035; mix-blend-mode: multiply; pointer-events: none;
}
.blob {
  position: absolute; border-radius: 50%;
  filter: blur(70px) saturate(125%);
  opacity: var(--blob-op, 0.55); will-change: transform;
}
.blob.amber { width: 60vw; height: 60vw; background: radial-gradient(circle at 35% 35%, rgba(204,138,59,0.85), rgba(168,90,34,0.0) 68%); top: -22vw; left: -16vw; animation: drift1 26s ease-in-out infinite; }
.blob.sage  { width: 58vw; height: 58vw; background: radial-gradient(circle at 60% 40%, rgba(157,193,165,0.85), rgba(111,157,125,0.0) 68%); top: -8vw; right: -20vw; animation: drift2 32s ease-in-out infinite; }
.blob.cream { width: 50vw; height: 50vw; background: radial-gradient(circle at 50% 50%, rgba(228,211,172,0.9), rgba(228,211,172,0.0) 70%); bottom: -24vw; left: 28vw; animation: drift3 38s ease-in-out infinite; }
@keyframes drift1 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(8vw,6vw) scale(1.12)} }
@keyframes drift2 { 0%,100%{transform:translate(0,0) scale(1.05)} 50%{transform:translate(-7vw,9vw) scale(0.92)} }
@keyframes drift3 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(-6vw,-7vw) scale(1.1)} }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gut); }
section { position: relative; }
.section-pad { padding-block: clamp(72px, 11vw, 150px); }

/* ---------- type utilities ---------- */
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 500; white-space: normal;
  display: inline-flex; align-items: baseline; gap: 0.6em;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--ink-faint); display: inline-block; }
.eyebrow.center::before { display: none; }

.display {
  font-size: clamp(2.7rem, 6.6vw, 5.6rem);
  line-height: 0.98; letter-spacing: -0.035em; font-weight: 600;
}
.h-sec { font-size: clamp(2rem, 4.2vw, 3.3rem); letter-spacing: -0.04em; font-weight: 600; }
.lead { font-size: clamp(1.12rem, 1.7vw, 1.42rem); line-height: 1.5; color: var(--ink-soft); letter-spacing: -0.01em; }
.measure { max-width: 60ch; }
.measure-sm { max-width: 44ch; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* ---------- glass ---------- */
.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--r-lg);
  position: relative;
  overflow: hidden;
}
.glass::before { /* top sheen */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(160deg, rgba(255,255,255,0.55), rgba(255,255,255,0) 40%);
  opacity: 0.8;
}
.glass-faint { background: var(--glass-bg-2); }

/* hover-refraction card */
.card-hover { transition: transform .5s cubic-bezier(.16,1,.3,1), box-shadow .5s cubic-bezier(.16,1,.3,1); }
.card-hover:hover { transform: translateY(-5px); box-shadow: 0 28px 70px -28px rgba(64,48,28,0.42), 0 3px 10px -3px rgba(64,48,28,0.14); }
/* moving specular highlight (disabled — felt strange on hover) */
.refract::after { content: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.55em;
  font-weight: 500; font-size: 0.98rem; letter-spacing: -0.01em;
  padding: 0.92em 1.5em; border-radius: 100px; border: 1px solid transparent;
  transition: transform .25s cubic-bezier(.16,1,.3,1), box-shadow .25s ease, background .25s ease, color .25s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--ink); color: var(--paper);
  box-shadow: 0 10px 26px -12px rgba(35,32,25,0.6);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -12px rgba(35,32,25,0.55); }
.btn-primary .arr { transition: transform .3s ease; }
.btn-primary:hover .arr { transform: translateX(4px); }
.btn-glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border-color: var(--glass-border); color: var(--ink);
  box-shadow: var(--glass-shadow);
}
.btn-glass:hover { transform: translateY(-2px); background: rgba(255,253,248,0.72); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: rgba(255,255,255,0.4); border-color: rgba(35,32,25,0.2); }
.btn-light { background: var(--paper); color: var(--ink); box-shadow: 0 10px 26px -12px rgba(0,0,0,0.5); }
.btn-light:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -12px rgba(0,0,0,0.45); }

/* ---------- brand mark ---------- */
.mark { display: inline-flex; align-items: center; gap: 0.62em; font-weight: 600; letter-spacing: -0.02em; font-size: 1.12rem; }
.mark img { width: 30px; height: 30px; border-radius: 50%; box-shadow: 0 2px 8px -2px rgba(64,48,28,0.4); }
.mark .name { line-height: 1; }

/* ---------- header ---------- */
.site-head {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: padding .4s ease;
}
.site-head .bar {
  margin: 14px auto; max-width: var(--maxw); width: calc(100% - 2*var(--gut));
  display: flex; align-items: center; gap: clamp(22px, 4vw, 44px);
  padding: 12px 20px;
  border-radius: 100px;
  border: 1px solid transparent;
  transition: background .4s ease, border-color .4s ease, box-shadow .4s ease, backdrop-filter .4s ease;
}
.site-head.scrolled .bar {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border-color: var(--glass-border);
  box-shadow: var(--glass-shadow);
}
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a.lnk { font-size: 0.95rem; color: var(--ink-soft); transition: color .2s ease; position: relative; }
.nav-links a.lnk:hover { color: var(--ink); }
.nav-links a.lnk::after { content:""; position:absolute; left:0; bottom:-4px; height:1px; width:0; background:var(--ink); transition:width .3s ease; }
.nav-links a.lnk:hover::after { width:100%; }
.nav-links a.lnk.is-active { color: var(--ink); }
.nav-links a.lnk.is-active::after { width: 100%; background: var(--amber-deep); }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.burger { display: none; background: none; border: none; padding: 8px; margin-left: auto; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding-block: clamp(48px,7vw,84px) 40px; position: relative; }

/* ---------- reveal animation ---------- */
/* Hiding is OFF by default — content is visible for no-JS, print, and any
   frame-frozen capture context. JS adds .anim-on only after confirming the
   animation-frame clock is actually ticking, which enables the entrance hide. */
[data-reveal] { transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1); }
.anim-on [data-reveal]:not(.in) { opacity: 0; transform: translateY(24px); }
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal-delay="1"] { transition-delay: .08s; }
[data-reveal-delay="2"] { transition-delay: .16s; }
[data-reveal-delay="3"] { transition-delay: .24s; }
[data-reveal-delay="4"] { transition-delay: .32s; }
[data-reveal-delay="5"] { transition-delay: .40s; }

/* ---------- decorative css orb — glass bead (echoes the brand mark) ---------- */
.css-orb {
  border-radius: 50%;
  position: relative; overflow: hidden; isolation: isolate;
  background:
    linear-gradient(var(--grad-angle, 100deg),
      var(--amber-deep) 2%, var(--amber) 20%, var(--cream) 50%, var(--sage) 80%, var(--sage-deep) 98%);
  box-shadow:
    inset 0 3px 4px rgba(255,255,255,0.70),
    inset 0 0 0 1px rgba(255,255,255,0.38),
    inset 11px 13px 28px -14px rgba(255,255,255,0.60),
    inset 0 -22px 42px -16px rgba(70,46,18,0.52),
    inset -16px -9px 32px -18px rgba(70,46,18,0.42),
    0 22px 48px -22px rgba(80,52,20,0.46);
}
/* specular reflection — the defining glass shine (upper-left) */
.css-orb::before {
  content: ""; position: absolute; left: 11%; top: 8%; width: 52%; height: 40%; border-radius: 50%;
  background: radial-gradient(60% 60% at 42% 38%, rgba(255,255,255,0.95), rgba(255,255,255,0) 72%);
  filter: blur(1px); mix-blend-mode: screen; pointer-events: none;
  animation: orbGlow 22s ease-in-out infinite;
}
/* slow band of light sweeping across the glass */
.css-orb::after {
  content: ""; position: absolute; inset: -2px; border-radius: 50%; pointer-events: none;
  background: linear-gradient(118deg, transparent 38%, rgba(255,255,255,0.42) 50%, transparent 62%);
  mix-blend-mode: screen; animation: orbSheen 26s ease-in-out infinite;
}
@keyframes orbSheen { 0%, 100% { transform: translateX(-30%); } 50% { transform: translateX(30%); } }
@keyframes orbGlow { 0%, 100% { opacity: 0.85; } 50% { opacity: 1; } }

/* ---------- chips / tags ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 0.5em; white-space: nowrap;
  font-family: 'JetBrains Mono', monospace; font-size: 0.74rem; letter-spacing: 0.02em;
  padding: 0.55em 0.95em; border-radius: 100px;
  background: rgba(255,255,255,0.5); border: 1px solid var(--line);
  color: var(--ink-soft);
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--grad); }

/* ---------- divider ---------- */
.rule { height: 1px; background: var(--line); border: 0; }
.grad-rule { height: 2px; border: 0; border-radius: 2px; background: var(--grad); opacity: .8; }

/* ---------- shared hero (About + Workshop) ---------- */
.home-hero { position: relative; overflow: hidden; padding-top: clamp(150px, 20vh, 236px); padding-bottom: clamp(72px, 11vw, 150px); }
.home-hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.hero-head { font-weight: 600; letter-spacing: -0.04em; line-height: 0.96; color: var(--ink); font-size: clamp(2.9rem, 7vw, 6.2rem); margin-top: 24px; max-width: 13ch; text-wrap: balance; }
.hero-sub { margin-top: 26px; max-width: 46ch; color: var(--ink-soft); font-size: clamp(1.08rem, 1.45vw, 1.3rem); line-height: 1.55; letter-spacing: -0.01em; }
.hero-sub + .hero-sub { margin-top: 16px; }
.hero-cta { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero-art { position: relative; display: grid; place-items: center; align-self: start; margin-top: 40px; }
.hero-art img { width: min(84%, 432px); aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 44px 64px rgba(86,58,28,0.30)); animation: heroFloat 9s ease-in-out infinite; }
@keyframes heroFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@media (max-width: 900px) {
  .home-hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-art { order: -1; justify-items: start; margin-top: 0; }
  .hero-art img { width: min(52%, 232px); }
  .hero-head { font-size: clamp(2.6rem, 11vw, 3.8rem); max-width: 17ch; }
  .hero-sub { max-width: none; }
}

/* ---------- tweak hooks ---------- */
.no-motion .blob { animation: none !important; }
.no-motion .css-orb::before, .no-motion .css-orb::after { animation: none !important; }
.radius-sharp { --r-sm: 4px; --r: 7px; --r-lg: 11px; --r-xl: 14px; }

/* ---------- mobile ---------- */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .burger { display: inline-flex; }
  .nav-cta .btn-ghost { display: none; }
}

/* mobile menu sheet */
.msheet {
  position: fixed; inset: 0; z-index: 99; display: none;
  background: rgba(241,238,231,0.85);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  padding: 96px var(--gut) 40px; flex-direction: column; gap: 6px;
}
.msheet.open { display: flex; }
.msheet a { font-size: 1.5rem; padding: 14px 0; border-bottom: 1px solid var(--line); letter-spacing: -0.02em; }
.msheet .btn { margin-top: 22px; justify-content: center; }
