/* ============================================================
   JURIELA — "Blue Hour"
   Palette pulled from the Montreal dusk asset:
   warm paper · twilight ink · amber window-light accent
   ============================================================ */
:root {
  /* color — derived from the hero image, not a swatch tool */
  --paper:      #F4EFE6;   /* warm off-white base */
  --paper-2:    #EBE4D7;   /* slightly deeper paper */
  --ink:        #15181F;   /* twilight near-black */
  --ink-soft:   #4A4F5B;   /* muted body on light */
  --twilight:   #121724;   /* deep blue-black (dark sections) */
  --twilight-2: #0C101A;
  --accent:     #8A8F99;   /* neutral grey accent (was amber) */
  --accent-lit: #C3C7CE;   /* lighter grey highlight */
  --line:       #D9D4CB;   /* hairlines on paper */
  --line-dark:  rgba(255,255,255,.14);

  /* type */
  --serif: "Fraunces", Georgia, serif;
  --sans:  "Hanken Grotesk", system-ui, sans-serif;

  /* scale / rhythm */
  --pad: clamp(1.25rem, 5vw, 6rem);
  --maxw: 1280px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, .55vw + .85rem, 1.18rem);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* atmosphere — fine grain over everything */
.grain {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  opacity: .5; mix-blend-mode: multiply;
  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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.05'/%3E%3C/svg%3E");
}

/* ---------- buttons — glassy / transparent, monochrome ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--sans); font-weight: 600; font-size: .98rem;
  letter-spacing: .005em; padding: .8em 1.4em; border-radius: 10px;
  border: 1px solid transparent;
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  backdrop-filter: blur(14px) saturate(120%);
  transition: transform .4s var(--ease), background .35s var(--ease),
              border-color .35s var(--ease), color .35s var(--ease);
  white-space: nowrap; cursor: pointer;
}
/* glass on dark contexts (hero / CTA / nav over image) */
.btn--glass {
  background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.38); color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.55),      /* bright top edge */
    inset 0 -1px 0 rgba(255,255,255,.08),
    0 10px 26px -16px rgba(0,0,0,.65);          /* soft lift */
}
.btn--glass:hover {
  background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.55);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.7),
    inset 0 -1px 0 rgba(255,255,255,.10),
    0 16px 34px -16px rgba(0,0,0,.7);
}
.btn--glass-ghost {
  background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.26); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}
.btn--glass-ghost:hover {
  background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.42);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}
/* text-only link button */
.btn--ghost {
  color: #fff; padding-left: .4em; background: transparent; border: none;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.btn--ghost:hover { color: rgba(255,255,255,.65); }
.btn--lg { padding: 1.05em 1.9em; font-size: 1.05rem; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.4rem var(--pad);
  transition: background .5s var(--ease), backdrop-filter .5s var(--ease), padding .5s var(--ease);
}
.nav__brand {
  font-family: var(--sans); font-weight: 700; font-size: 1.4rem;
  letter-spacing: .28em; color: #fff;
  transition: color .5s var(--ease);
}
.nav__actions { display: flex; align-items: center; gap: .7rem; }
.nav__links { display: flex; gap: 2.2rem; }
.nav__links a {
  font-weight: 500; font-size: .95rem; color: rgba(255,255,255,.85);
  position: relative; transition: color .4s var(--ease);
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 1px; width: 0;
  background: currentColor; transition: width .4s var(--ease);
}
.nav__links a:hover { color: #fff; } .nav__links a:hover::after { width: 100%; }

/* scrolled state — nav lands on paper */
.nav.is-scrolled {
  background: rgba(244,239,230,.82);
  backdrop-filter: saturate(140%) blur(14px);
  padding-top: .9rem; padding-bottom: .9rem;
  border-bottom: 1px solid var(--line);
}
.nav.is-scrolled .nav__brand { color: var(--ink); }
.nav.is-scrolled .nav__links a { color: var(--ink-soft); }
.nav.is-scrolled .nav__links a:hover { color: var(--ink); }
/* glass buttons flip to dark-on-light once the nav is on paper */
.nav.is-scrolled .btn--glass {
  background: rgba(21,24,31,.05); border-color: rgba(21,24,31,.22); color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 8px 20px -14px rgba(21,24,31,.45);
}
.nav.is-scrolled .btn--glass:hover {
  background: rgba(21,24,31,.10); border-color: rgba(21,24,31,.32);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 12px 26px -14px rgba(21,24,31,.5);
}
.nav.is-scrolled .btn--glass-ghost {
  background: transparent; border-color: rgba(21,24,31,.18); color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}
.nav.is-scrolled .btn--glass-ghost:hover { background: rgba(21,24,31,.05); border-color: rgba(21,24,31,.28); }

/* ---------- HERO ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 var(--pad) clamp(2.5rem, 6vh, 5rem);
  overflow: hidden; color: #fff;
}
.hero__media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero__img {
  width: 100%; height: 125%; object-fit: cover; object-position: center 38%;
  transform-origin: 60% 50%;
}
/* subtle neutral light-lift that breathes (monochrome) */
.hero__lights {
  position: absolute; inset: 0;
  background:
    radial-gradient(40% 32% at 60% 56%, rgba(255,255,255,.10), transparent 72%);
  mix-blend-mode: screen; animation: bloom 7s var(--ease) infinite alternate;
}
@keyframes bloom { from { opacity:.4 } to { opacity:.85 } }
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10,14,24,.55) 0%, transparent 26%),
    linear-gradient(0deg, rgba(8,11,20,.86) 4%, rgba(10,14,24,.30) 42%, transparent 70%);
}
.hero__content { position: relative; width: min(100%, 60rem); }
.hero__title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.6rem, 6.4vw, 5.6rem);
  line-height: .98; letter-spacing: -.02em; max-width: 16ch;
  font-variation-settings: "SOFT" 0, "WONK" 0, "opsz" 144;
}
.hero__sub {
  margin-top: 1.6rem; max-width: 46ch; font-size: clamp(1.05rem, .5vw + .95rem, 1.3rem);
  color: rgba(255,255,255,.86); line-height: 1.5;
}
.hero__actions { margin-top: 2.2rem; display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }

/* line-mask reveal mechanism (hero + section displays) */
.line { display: block; overflow: hidden; }
.line__inner { display: block; transform: translateY(110%); }

/* ---------- generic section ---------- */
.section { padding: clamp(5rem, 12vh, 9rem) var(--pad); max-width: var(--maxw); margin: 0 auto; }
.section__head { max-width: 54rem; }
.display {
  font-family: var(--serif); font-weight: 400; letter-spacing: -.02em;
  font-size: clamp(2.2rem, 5.2vw, 4.2rem); line-height: 1.0;
  font-variation-settings: "opsz" 144;
}
.display--light { color: var(--paper); }
.lede {
  margin-top: 1.6rem; max-width: 42ch; color: var(--ink-soft);
  font-size: clamp(1.05rem, .4vw + .95rem, 1.25rem);
}
.lede--light { color: rgba(244,239,230,.82); }

/* ---------- FILES + product mock ---------- */
.section--files { padding-bottom: clamp(4rem, 10vh, 7rem); }
.frame {
  margin-top: clamp(2.5rem, 6vh, 4.5rem);
  border-radius: 6px; padding: clamp(1rem, 3vw, 2.5rem);
  background:
    radial-gradient(120% 120% at 80% 0%, rgba(255,255,255,.6), transparent 55%),
    var(--paper-2);
  border: 1px solid var(--line);
  box-shadow: 0 40px 80px -50px rgba(21,24,31,.5);
}
.mock {
  background: #fff; border-radius: 4px; overflow: hidden;
  border: 1px solid var(--line); box-shadow: 0 20px 50px -30px rgba(21,24,31,.4);
}
.mock__bar {
  display: flex; align-items: center; gap: .5rem; padding: .8rem 1.1rem;
  border-bottom: 1px solid var(--line); background: var(--paper);
}
.mock__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.mock__path { margin-left: .8rem; font-size: .82rem; color: var(--ink-soft); }
.mock__body { display: grid; grid-template-columns: 220px 1fr; min-height: 320px; }
.mock__side { border-right: 1px solid var(--line); padding: 1.3rem; }
.mock__label, .mock__k {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--ink-soft); margin-bottom: .9rem;
}
.mock__side ul { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.mock__side li { font-size: .9rem; color: var(--ink-soft); padding: .45rem .6rem; border-radius: 3px; }
.mock__side li.is-active { background: rgba(21,24,31,.07); color: var(--ink); font-weight: 600; }
.mock__main { padding: 1.4rem; display: flex; flex-direction: column; gap: 1.1rem; }
.mock__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.mock__card { border: 1px solid var(--line); border-radius: 4px; padding: 1rem; }
.mock__v { margin-top: .3rem; font-size: .95rem; }
.mock__files { display: flex; flex-direction: column; gap: .55rem; }
.mock__file {
  display: flex; justify-content: space-between; align-items: center;
  padding: .75rem .9rem; border: 1px solid var(--line); border-radius: 4px; font-size: .9rem;
}
.mock__file em { font-style: normal; font-size: .72rem; padding: .15rem .55rem; border-radius: 999px; color: var(--ink-soft); background: var(--paper-2); }
.mock__file em:nth-of-type(1) {}

/* ---------- SAFE AI (dark twilight section) ---------- */
.section--ai {
  max-width: none; background:
    radial-gradient(80% 60% at 75% 10%, rgba(255,255,255,.06), transparent 60%),
    linear-gradient(180deg, var(--twilight), var(--twilight-2));
  color: var(--paper);
}
.ai__grid {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.ai__panel {
  border: 1px solid var(--line-dark); border-radius: 6px; padding: clamp(1.2rem, 3vw, 2rem);
  background: rgba(255,255,255,.03); backdrop-filter: blur(6px);
  box-shadow: 0 50px 90px -60px rgba(0,0,0,.8);
}
.chat { display: flex; flex-direction: column; gap: 1rem; }
.chat__q {
  align-self: flex-end; max-width: 85%;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22);
  color: #fff; font-weight: 500;
  padding: .8rem 1.1rem; border-radius: 12px 12px 2px 12px; font-size: .95rem;
}
.chat__a {
  align-self: flex-start; max-width: 95%;
  background: rgba(255,255,255,.06); border: 1px solid var(--line-dark);
  padding: 1rem 1.2rem; border-radius: 12px 12px 12px 2px; font-size: .95rem; line-height: 1.6;
}
.chat__a ol { margin: .6rem 0 .4rem 1.1rem; display: flex; flex-direction: column; gap: .4rem; }
.cite {
  color: rgba(244,239,230,.92); font-weight: 600; font-size: .82rem;
  border-bottom: 1px dotted rgba(244,239,230,.5); cursor: default;
}
.chat__src { margin-top: .7rem; font-size: .78rem; color: rgba(244,239,230,.5); }

/* ---------- TRUST ---------- */
.section--trust { padding-top: clamp(5rem, 12vh, 8rem); }
.trust__rows { margin-top: 2.5rem; border-top: 1px solid var(--line); }
.trust__row {
  display: grid; grid-template-columns: minmax(0,22rem) 1fr; gap: clamp(1rem,4vw,4rem);
  padding: 2.2rem 0; border-bottom: 1px solid var(--line);
}
.trust__row h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.4rem, 2.2vw, 1.9rem); letter-spacing: -.01em; }
.trust__row p { color: var(--ink-soft); max-width: 48ch; }

/* ---------- CTA ---------- */
.cta {
  position: relative; padding: clamp(6rem, 16vh, 11rem) var(--pad);
  background: linear-gradient(180deg, var(--twilight-2), #060810);
  color: var(--paper); text-align: center; overflow: hidden;
}
.cta::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(50% 60% at 50% 120%, rgba(255,255,255,.12), transparent 70%);
}
.cta__inner { position: relative; max-width: 40rem; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.cta .display { text-align: center; }
.cta .lede { text-align: center; margin-left: auto; margin-right: auto; }
.cta .btn { margin-top: 2.2rem; }

/* ---------- footer ---------- */
.foot {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
  padding: 2.2rem var(--pad); background: #060810; color: rgba(244,239,230,.6);
}
.foot__brand { font-family: var(--sans); font-weight: 700; letter-spacing: .28em; color: var(--paper); }
.foot__meta { font-size: .85rem; }

/* ---------- reveal initial states (JS adds .is-in) ---------- */
[data-reveal], [data-reveal-frame] { opacity: 0; transform: translateY(22px); }
[data-reveal-frame] { transform: translateY(40px) scale(.985); }
.is-in { opacity: 1 !important; transform: none !important; }
[data-reveal], [data-reveal-frame] { transition: opacity .9s var(--ease), transform .9s var(--ease); }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .nav__links { display: none; }
  .ai__grid { grid-template-columns: 1fr; }
  .mock__body { grid-template-columns: 1fr; }
  .mock__side { border-right: none; border-bottom: 1px solid var(--line); }
  .trust__row { grid-template-columns: 1fr; gap: .6rem; }
}
@media (max-width: 540px) {
  .hero__actions { gap: .8rem; }
  .mock__row { grid-template-columns: 1fr; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
  .line__inner { transform: none !important; }
  [data-reveal], [data-reveal-frame] { opacity: 1 !important; transform: none !important; }
  .hero__img { transform: scale(1.02) !important; }
  html { scroll-behavior: auto; }
}
