/* Svenex — black, white and nacre.
   The accent is mother-of-pearl: Bahrain's pearling heritage, and a sheen
   that reads as quiet luxury rather than gold. It appears as light, never
   as a flat fill. */

@font-face {
  font-family: "Bodoni Moda";
  src: url("/fonts/bodoni-moda.woff2") format("woff2-variations");
  font-weight: 400 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/fonts/hanken-grotesk.woff2") format("woff2-variations");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  --ink: #000000;
  --paper: #ffffff;
  --pearl: #f1ece6;
  --sheen-aqua: #cfd9dc;
  --sheen-rose: #e6d3dc;
  --sheen-gold: #efe3c8;
  --mute-dark: #8f8f93;
  --mute-light: #5d5d62;
  --line-dark: rgba(255, 255, 255, 0.11);
  --line-light: rgba(0, 0, 0, 0.12);
  --nacre: linear-gradient(115deg, var(--sheen-aqua), var(--sheen-rose) 45%, var(--sheen-gold) 80%, var(--pearl));

  --serif: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(20px, 5vw, 72px);
  --max: 1240px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--sheen-rose); outline-offset: 4px; border-radius: 4px; }

.skip { position: absolute; left: -9999px; top: 12px; z-index: 50; background: var(--paper); color: var(--ink); padding: 8px 14px; border-radius: 999px; }
.skip:focus { left: 12px; }

/* ---------- Header ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--gutter);
  transition: background-color .4s var(--ease), color .4s var(--ease), backdrop-filter .4s var(--ease), padding .4s var(--ease);
}
.top.on-light { color: var(--ink); }
.top.on-light.scrolled { background: rgba(255, 255, 255, 0.72); }
.top.on-light .button.ghost { border-color: var(--line-light); background: rgba(0, 0, 0, 0.03); }
.top.on-light .button.ghost:hover { background: var(--ink); color: var(--paper); }
.top.scrolled { background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); padding-block: 14px; }

.wordmark {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  font-variation-settings: "opsz" 96;
}
.wordmark.small { font-size: 22px; }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 22px;
  border-radius: 999px;
  font: 500 15px/1 var(--sans);
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: transform .35s var(--ease), background-color .35s var(--ease), color .35s var(--ease), box-shadow .35s var(--ease);
}
.button.ghost { border: 1px solid var(--line-dark); background: rgba(255, 255, 255, 0.04); }
.button.ghost:hover { background: var(--paper); color: var(--ink); }
.button.solid {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--paper); color: var(--ink);
  min-height: 52px; padding: 0 28px; font-size: 16px;
}
.button.solid::after {
  /* a sheen that sweeps across on hover */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--nacre);
  transform: translateX(-101%);
  transition: transform .6s var(--ease);
}
.button.solid:hover::after { transform: translateX(0); }
.button.solid:hover { box-shadow: 0 10px 40px -10px rgba(230, 211, 220, 0.45); }
.button:active { transform: scale(0.98); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  padding: 120px var(--gutter) 96px;
  overflow: hidden;
}
.nacre {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; transition: opacity 2.2s var(--ease);
}
.nacre.ready { opacity: 1; }
.hero::after {
  /* keeps the left column readable over the sheen */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0,0,0,.82) 0%, rgba(0,0,0,.55) 38%, rgba(0,0,0,0) 70%),
    linear-gradient(0deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 22%);
}
.hero-inner { position: relative; z-index: 2; width: 100%; max-width: var(--max); margin: 0 auto; }
/* header and footer share the content column */
.top, .foot { padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2)); }


.hero h1 {
  font-family: var(--serif);
  font-size: clamp(44px, 7vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 96;
  max-width: 15ch;
}
.hero h1 .line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.hero h1 .line > span { display: block; transform: translateY(105%); transition: transform 1.3s var(--ease); }
.hero h1 .line:nth-child(2) > span { transition-delay: .14s; }
.loaded .hero h1 .line > span { transform: none; }

.lede {
  max-width: 34em;
  margin-top: 34px;
  font-size: clamp(17px, 1.45vw, 20px);
  color: #c9c9cd;
  opacity: 0; transform: translateY(14px);
  transition: opacity 1.2s var(--ease) .45s, transform 1.2s var(--ease) .45s;
}
.actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px 26px;
  margin-top: 44px;
  opacity: 0; transform: translateY(14px);
  transition: opacity 1.2s var(--ease) .6s, transform 1.2s var(--ease) .6s;
}
.loaded .lede, .loaded .actions { opacity: 1; transform: none; }
.note { font-size: 15px; color: #a9a9ae; max-width: 22em; }


/* ---------- Section heads ---------- */
.what, .who, .closing { padding: clamp(96px, 13vw, 168px) var(--gutter); }
.section-head { max-width: var(--max); margin: 0 auto clamp(48px, 6vw, 80px); display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px 64px; align-items: end; }
.section-head h2 {
  font-family: var(--serif);
  font-size: clamp(38px, 5.2vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 96;
}
.section-head p { font-size: 18px; max-width: 30em; }
.what .section-head p { color: #b9b9bd; }

/* ---------- Cards ---------- */
.bento {
  max-width: var(--max); margin: 0 auto;
  display: grid; gap: 18px;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(220px, auto);
  perspective: 1400px;
}
.card {
  --mx: 50%; --my: 50%; --rx: 0deg; --ry: 0deg; --glow: 0;
  position: relative; isolation: isolate;
  padding: 30px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.02));
  border: 1px solid var(--line-dark);
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform .5s var(--ease), border-color .5s var(--ease);
  display: flex; flex-direction: column; gap: 12px;
  overflow: hidden;
}
.card::before {
  /* pearl light that follows the cursor */
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(230, 211, 220, .16), rgba(207, 217, 220, .07) 35%, transparent 65%);
  opacity: var(--glow); transition: opacity .4s var(--ease);
}
.card::after {
  /* the same light, caught on the edge */
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: radial-gradient(260px circle at var(--mx) var(--my), rgba(239, 227, 200, .9), rgba(230, 211, 220, .5) 30%, transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: var(--glow); transition: opacity .4s var(--ease);
}
.card.active { transition: transform .15s linear, border-color .5s var(--ease); }
.card h3 { font-family: var(--serif); font-size: clamp(24px, 2.2vw, 30px); line-height: 1.15; letter-spacing: -0.005em; font-weight: 500; max-width: 20ch; }
.card p { color: #a9a9ae; font-size: 16px; max-width: 34em; }
.card > *, .card-copy > * { transform: translateZ(24px); }

.card-chat { grid-column: span 4; grid-row: span 2; display: grid; grid-template-columns: 1fr 1.05fr; gap: 28px; align-items: end; }
.card-chat .card-copy { display: flex; flex-direction: column; gap: 12px; align-self: start; }
.card-chat h3 { font-size: clamp(30px, 3.2vw, 44px); font-weight: 400; letter-spacing: -0.015em; }
.card-book { grid-column: span 2; grid-row: span 2; }
.card-learn, .card-crm, .card-hand { grid-column: span 2; }
.card-results { grid-column: span 6; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; }
.card-results .card-copy { display: flex; flex-direction: column; gap: 12px; }

/* chat mock */
.chat { display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 1.5; }
.msg { max-width: 88%; padding: 11px 15px; border-radius: 18px; }
.msg.in { align-self: flex-start; background: rgba(255,255,255,.08); color: #e7e7ea; border-bottom-left-radius: 6px; }
.msg.out { align-self: flex-end; background: var(--pearl); color: #161616; border-bottom-right-radius: 6px; }
.msg[dir="rtl"].in { align-self: flex-end; border-bottom-left-radius: 18px; border-bottom-right-radius: 6px; }
.msg[dir="rtl"].out { align-self: flex-start; border-bottom-right-radius: 18px; border-bottom-left-radius: 6px; }
.msg.booked { align-self: center; max-width: none; background: transparent; color: var(--sheen-gold); border: 1px solid rgba(239,227,200,.35); border-radius: 999px; font-size: 13px; padding: 7px 14px; }
.chat .msg { opacity: 0; transform: translateY(10px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.chat.play .msg { opacity: 1; transform: none; }
.chat.play .msg:nth-child(2) { transition-delay: .5s; }
.chat.play .msg:nth-child(3) { transition-delay: 1.1s; }
.chat.play .msg:nth-child(4) { transition-delay: 1.6s; }

/* slot picker mock */
.slots { margin-top: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-top: 18px; }
.slots span { text-align: center; padding: 10px 0; border-radius: 10px; border: 1px solid var(--line-dark); font-size: 14px; color: #cfcfd3; font-variant-numeric: tabular-nums; }
.slots .taken { color: #55555a; text-decoration: line-through; border-style: dashed; }
.slots .picked { background: var(--nacre); color: #111; border-color: transparent; font-weight: 600; }

.spark { width: 100%; height: 120px; overflow: visible; }
.spark path { stroke-dasharray: 400; stroke-dashoffset: 400; transition: stroke-dashoffset 2s var(--ease); }
.card-results.play .spark path { stroke-dashoffset: 0; }

/* ---------- Who (the white section) ---------- */
.who { background: var(--paper); color: var(--ink); }
.who .section-head p { color: var(--mute-light); }
.sectors { list-style: none; margin: 0 auto; padding: 0; max-width: var(--max); border-top: 1px solid var(--line-light); }
.sectors li {
  position: relative;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 8px 64px; align-items: baseline;
  padding: 26px 0;
  border-bottom: 1px solid var(--line-light);
  outline: none;
}
.sectors li::before {
  content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%;
  background: linear-gradient(90deg, #9fb4ba, #c9a3b4 50%, #c8ad78);
  transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease);
}
.sectors .name {
  font-family: var(--serif); font-size: clamp(28px, 3.6vw, 50px); line-height: 1.08; letter-spacing: -0.015em;
  font-variation-settings: "opsz" 72;
  transition: transform .6s var(--ease);
}
.sectors .desc { color: var(--mute-light); font-size: 17px; max-width: 28em; transition: opacity .5s var(--ease), transform .6s var(--ease); }
@media (hover: hover) {
  .sectors .desc { opacity: 0; transform: translateX(-10px); }
  .sectors li:hover .desc, .sectors li:focus-visible .desc { opacity: 1; transform: none; }
  .sectors li:hover .name, .sectors li:focus-visible .name { transform: translateX(14px); }
  .sectors li:hover::before, .sectors li:focus-visible::before { transform: scaleX(1); }
}

/* ---------- Closing ---------- */
.closing { position: relative; text-align: center; overflow: hidden; }
.closing::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: min(900px, 120vw); aspect-ratio: 1; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(230,211,220,.13), rgba(207,217,220,.05) 40%, transparent 68%);
  pointer-events: none;
}
.closing h2 { position: relative; font-family: var(--serif); font-size: clamp(44px, 7vw, 104px); line-height: 1; letter-spacing: -0.025em; font-variation-settings: "opsz" 96; }
.closing p { position: relative; max-width: 32em; margin: 26px auto 40px; color: #b9b9bd; font-size: 18px; }

/* ---------- Footer ---------- */
.foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px;
  padding: 34px var(--gutter);
  border-top: 1px solid var(--line-dark);
  font-size: 14px; color: var(--mute-dark);
}
.foot .wordmark { color: var(--paper); }
.foot nav { display: flex; gap: 26px; }
.foot nav a { text-decoration: none; transition: color .3s; }
.foot nav a:hover { color: var(--paper); }

/* ---------- Legal pages ---------- */
.legal { min-height: 100svh; display: flex; flex-direction: column; }
.legal main { flex: 1; padding: 160px var(--gutter) 120px; }
.legal article { max-width: 760px; margin: 0 auto; }
.legal h1 { font-family: var(--serif); font-size: clamp(44px, 7vw, 88px); line-height: 1.02; letter-spacing: -0.02em; font-variation-settings: "opsz" 96; }
.legal .rule { height: 1px; margin-top: 40px; background: linear-gradient(90deg, var(--sheen-aqua), var(--sheen-rose) 50%, var(--sheen-gold)); opacity: .6; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .section-head { grid-template-columns: 1fr; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .card-chat, .card-results { grid-column: span 2; }
  .card-book { grid-column: span 2; grid-row: auto; }
  .card-learn, .card-crm, .card-hand { grid-column: span 1; }
  .card-hand { grid-column: span 2; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .top .button.ghost { display: none; }
  .hero { padding-top: 110px; align-items: flex-end; padding-bottom: 110px; }
  .hero::after { background: linear-gradient(0deg, rgba(0,0,0,.9) 0%, rgba(0,0,0,.6) 55%, rgba(0,0,0,.25) 100%); }
  .bento { grid-template-columns: 1fr; }
  .card-chat, .card-results, .card-book, .card-learn, .card-crm, .card-hand { grid-column: auto; grid-row: auto; }
  .card-chat, .card-results { grid-template-columns: 1fr; }
  .card { padding: 24px; }
  .sectors li { grid-template-columns: 1fr; padding: 22px 0; }
  .foot { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .card { transform: none !important; }
}
