@font-face { font-family: "Outfit"; src: url("/fonts/outfit-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Outfit"; src: url("/fonts/outfit-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Outfit"; src: url("/fonts/outfit-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }

/* Brand: clay #B4532F (the symbol), indigo #1E1F3B (the name), cream #F5EFE4.
   One accent (clay), one radius family (pill for controls, 28px shells, 22px cores). */
:root {
  --bg: #F5EFE4;
  --bg-2: #EDE5D6;
  --shell: rgba(30, 31, 59, 0.045);
  --shell-line: rgba(30, 31, 59, 0.08);
  --core: #FBF8F2;
  --core-hi: rgba(255, 255, 255, 0.9);
  --ink: #1E1F3B;
  --ink-2: #4E4F68;
  --ink-3: #8A8697;
  --clay: #B4532F;
  --clay-text: #9C4424;
  --on-clay: #FFF8F0;
  --indigo: #1E1F3B;
  --on-indigo: #F5EFE4;
  --shadow: 30, 31, 59;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --spring: cubic-bezier(0.16, 1, 0.3, 1);
  --r-shell: 28px;
  --r-core: 22px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14152A;
    --bg-2: #191A33;
    --shell: rgba(245, 239, 228, 0.05);
    --shell-line: rgba(245, 239, 228, 0.09);
    --core: #1D1E3A;
    --core-hi: rgba(255, 255, 255, 0.06);
    --ink: #F5EFE4;
    --ink-2: #C3BFCF;
    --ink-3: #8C89A3;
    --clay: #D06A43;
    --clay-text: #E8916A;
    --on-clay: #14152A;
    --indigo: #262850;
    --shadow: 0, 0, 0;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 "Outfit", system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.025em; line-height: 1.05; }
p, figure, dl, dd, ul { margin: 0; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 40px; } }
.skip { position: absolute; left: -999px; top: 12px; z-index: 40; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; }
.skip:focus { left: 12px; }
:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; border-radius: 10px; }

/* Grain: fixed, never on a scrolling element */
body::after { content: ""; position: fixed; inset: 0; z-index: 30; pointer-events: none; opacity: .045; 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)'/%3E%3C/svg%3E"); }
@media (prefers-color-scheme: dark) { body::after { mix-blend-mode: screen; opacity: .03; } }

/* Eyebrow pill, used sparingly */
.tag { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--clay-text); padding: 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--clay) 9%, transparent); }

/* Double bezel: a machined tray holding a plate */
.bezel { padding: 6px; border-radius: var(--r-shell); background: var(--shell); box-shadow: inset 0 0 0 1px var(--shell-line); }
.bezel-core { height: 100%; border-radius: var(--r-core); background: var(--core); box-shadow: inset 0 1px 0 var(--core-hi), 0 24px 48px -28px rgba(var(--shadow), .25); }

/* Pills with the icon-in-a-button */
.pill { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; text-decoration: none; cursor: pointer; border: 0;
  font: 600 16px/1 "Outfit", sans-serif; padding: 8px 8px 8px 22px; border-radius: 999px; transition: transform .5s var(--spring), background .3s var(--ease), box-shadow .5s var(--spring); }
.pill:active { transform: scale(.98); }
.pill-primary { background: var(--clay); color: var(--on-clay); box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--clay) 70%, transparent); }
.pill-primary:hover { box-shadow: 0 16px 32px -14px color-mix(in srgb, var(--clay) 80%, transparent); }
.pill-ghost { padding: 15px 22px; color: var(--ink); background: transparent; box-shadow: inset 0 0 0 1px var(--shell-line); }
.pill-ghost:hover { background: var(--shell); }
.pill-ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--on-clay) 18%, transparent); transition: transform .5s var(--spring); }
.pill-ico svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pill:hover .pill-ico { transform: translate(3px, -1px) scale(1.06); }
.pill[disabled] { opacity: .6; cursor: progress; }

/* Floating island nav */
.island { position: fixed; z-index: 20; top: 16px; left: 50%; translate: -50% 0; display: flex; align-items: center; gap: 28px;
  padding: 8px 8px 8px 18px; border-radius: 999px; background: color-mix(in srgb, var(--core) 72%, transparent);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: inset 0 0 0 1px var(--shell-line), 0 12px 32px -18px rgba(var(--shadow), .4); width: max-content; max-width: calc(100% - 24px); }
.island-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; font-size: 19px; letter-spacing: -.02em; }
.island-links { display: flex; gap: 22px; font-size: 15px; font-weight: 500; }
.island-links a { text-decoration: none; color: var(--ink-2); transition: color .3s var(--ease); }
.island-links a:hover { color: var(--ink); }
.island-cta { text-decoration: none; font-weight: 600; font-size: 15px; padding: 10px 18px; border-radius: 999px; background: var(--ink); color: var(--bg); }
.burger { display: none; position: relative; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--shell); cursor: pointer; }
.burger span { position: absolute; left: 13px; width: 18px; height: 1.6px; border-radius: 2px; background: var(--ink); transition: transform .5s var(--spring), top .5s var(--spring); }
.burger span:first-child { top: 18px; } .burger span:last-child { top: 25px; }
.burger[aria-expanded="true"] span:first-child { top: 21.5px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 21.5px; transform: rotate(-45deg); }
@media (max-width: 820px) {
  .island { left: 12px; right: 12px; translate: none; width: auto; justify-content: space-between; gap: 12px; }
  .island-links, .island-cta { display: none; }
  .burger { display: block; }
}
.menu { position: fixed; inset: 0; z-index: 19; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px); opacity: 0; transition: opacity .5s var(--ease); }
.menu[hidden] { display: none; }
.menu.open { opacity: 1; }
.menu nav { display: grid; gap: 10px; text-align: center; }
.menu a { font-size: clamp(34px, 9vw, 52px); font-weight: 600; letter-spacing: -.03em; text-decoration: none; overflow: hidden;
  transform: translateY(40px); opacity: 0; transition: transform .7s var(--spring), opacity .7s var(--spring); transition-delay: calc(var(--i) * 70ms + 80ms); }
.menu.open a { transform: none; opacity: 1; }

/* Hero */
.hero { position: relative; min-height: 100dvh; display: grid; align-items: center; padding: 120px 0 72px; overflow: hidden; }
.lattice { position: absolute; inset: -60px; opacity: .5; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cpath d='M36 6 L66 36 L36 66 L6 36Z' fill='none' stroke='%23B4532F' stroke-opacity='.22' stroke-width='1.5'/%3E%3C/svg%3E");
  background-size: 72px 72px; -webkit-mask-image: radial-gradient(ellipse at 70% 45%, #000 0%, transparent 65%); mask-image: radial-gradient(ellipse at 70% 45%, #000 0%, transparent 65%); }
.hero-grid { position: relative; display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.15fr .85fr; gap: 64px; } }
.hero-title { margin-top: 22px; font-size: clamp(46px, 7.2vw, 104px); letter-spacing: -.045em; line-height: .98; }
.hero-title em { font-style: normal; color: var(--clay); }
.line { display: block; overflow: hidden; padding-bottom: .06em; white-space: nowrap; }
.line > span { display: inline-block; }
.lede { margin-top: 26px; font-size: clamp(18px, 2vw, 21px); color: var(--ink-2); max-width: 40ch; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-mark { justify-self: center; width: min(100%, 460px); }
.bezel-art { border-radius: 40px; padding: 8px; }
.bezel-art .bezel-core { border-radius: 32px; aspect-ratio: 1; display: grid; place-items: center; background:
  radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--clay) 12%, var(--core)) 0%, var(--core) 62%); }
.draw { width: 70%; overflow: visible; }
.draw path { fill: none; stroke: var(--clay); stroke-width: 17; stroke-linejoin: miter; stroke-linecap: square; }
.draw .d1 { stroke-linecap: butt; }

/* Frieze: the page's single marquee */
.frieze { height: 46px; overflow: hidden; border-block: 1px solid var(--shell-line); background: var(--bg-2); }
.frieze-track { height: 100%; width: calc(100% + 120px);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='46' viewBox='0 0 60 46'%3E%3Cpath d='M2 8 H28 L15 24Z M32 8 H58 L45 24Z' fill='%23B4532F' fill-opacity='.55'/%3E%3Cpath d='M30 20 L43 38 H17Z' fill='%23B4532F' fill-opacity='.3'/%3E%3C/svg%3E");
  background-size: 60px 46px; }

/* Story */
.story { padding: 140px 0; }
.story-grid { display: grid; gap: 40px; }
@media (min-width: 960px) { .story-grid { grid-template-columns: 280px 1fr; gap: 80px; align-items: start; } .story-side { position: sticky; top: 120px; } }
.tifinagh { font-size: 44px; color: var(--clay); line-height: 1; font-family: "Noto Sans Tifinagh", "Ebrima", system-ui, sans-serif; }
.story-word { margin-top: 14px; font-size: 28px; font-weight: 600; letter-spacing: -.02em; }
.story-note { margin-top: 6px; color: var(--ink-3); font-size: 15px; }
.story-text { font-size: clamp(26px, 3.4vw, 42px); font-weight: 500; line-height: 1.28; letter-spacing: -.02em; max-width: 26ch; }
.story-text .w { color: var(--ink); }

/* Principles bento */
.principles { padding: 40px 0 140px; }
.section-title { font-size: clamp(38px, 5vw, 64px); letter-spacing: -.035em; margin-bottom: 48px; }
.bento { display: grid; gap: 16px; }
@media (min-width: 900px) { .bento { grid-template-columns: repeat(12, 1fr); grid-auto-rows: minmax(250px, auto); }
  .cell-offline { grid-column: span 7; grid-row: span 2; } .cell-private { grid-column: span 5; } .cell-lang { grid-column: span 5; } .cell-people { grid-column: span 12; } }
.cell .bezel-core { padding: 32px; display: flex; flex-direction: column; gap: 12px; position: relative; overflow: hidden; }
.cell h3 { font-size: clamp(24px, 2.4vw, 32px); max-width: 18ch; }
.cell p { color: var(--ink-2); max-width: 42ch; }
.cell-offline .bezel-core { background: var(--indigo); color: var(--on-indigo); justify-content: flex-end; min-height: 360px; }
.cell-offline p { color: color-mix(in srgb, var(--on-indigo) 75%, transparent); }
.signal { position: absolute; top: 34px; left: 32px; display: flex; align-items: flex-end; gap: 7px; height: 64px; }
.signal span { width: 12px; border-radius: 4px; background: var(--clay); }
.signal span:nth-child(1) { height: 25%; } .signal span:nth-child(2) { height: 50%; } .signal span:nth-child(3) { height: 75%; opacity: .25; } .signal span:nth-child(4) { height: 100%; opacity: .25; }
.cell-private .bezel-core { background: var(--clay); color: var(--on-clay); }
.cell-private p { color: color-mix(in srgb, var(--on-clay) 82%, transparent); }
.cell-private .bezel-core::after { content: ""; position: absolute; right: -40px; bottom: -40px; width: 180px; height: 180px; rotate: 45deg; border: 14px solid color-mix(in srgb, var(--on-clay) 18%, transparent); }
.langs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.langs span { padding: 6px 14px; border-radius: 999px; background: var(--shell); box-shadow: inset 0 0 0 1px var(--shell-line); font-weight: 500; }
.cell-people .bezel-core { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 40px;
  background: linear-gradient(120deg, var(--core) 55%, color-mix(in srgb, var(--clay) 10%, var(--core))); }

/* Apps cascade */
.apps { padding: 140px 0; background: var(--bg-2); border-block: 1px solid var(--shell-line); overflow: hidden; }
.apps-grid { display: grid; gap: 64px; align-items: center; }
@media (min-width: 960px) { .apps-grid { grid-template-columns: 1fr 1fr; gap: 40px; } }
.app-id { display: flex; align-items: center; gap: 18px; margin: 22px 0 28px; }
.app-id img { width: 72px; height: 72px; border-radius: 18px; box-shadow: 0 12px 24px -12px rgba(var(--shadow), .5); }
.app-id h2 { font-size: clamp(40px, 5vw, 60px); letter-spacing: -.04em; }
.app-sub { color: var(--ink-2); margin-top: 4px; }
.facts { list-style: none; padding: 0; display: grid; gap: 14px; margin-bottom: 36px; }
.facts li { position: relative; padding-left: 30px; font-size: 18px; }
.facts li::before { content: ""; position: absolute; left: 4px; top: .5em; width: 10px; height: 10px; rotate: 45deg; background: var(--clay); border-radius: 2px; }
.cascade { position: relative; height: clamp(440px, 60vw, 600px); }
.phone { position: absolute; width: 44%; max-width: 250px; border-radius: 30px; padding: 6px; background: var(--shell); box-shadow: inset 0 0 0 1px var(--shell-line), 0 40px 60px -30px rgba(var(--shadow), .45); }
.phone img { border-radius: 25px; width: 100%; height: auto; }
.phone-back { left: 4%; top: 10%; rotate: -6deg; }
.phone-front { left: 30%; top: 0; z-index: 2; }
.phone-side { right: 2%; top: 14%; rotate: 5deg; }
@media (max-width: 767px) { .phone { width: 52%; } .phone-back { left: 0; } .phone-front { left: 24%; } .phone-side { right: 0; } }

/* Company ledger */
.company { padding: 140px 0; }
.company-grid { display: grid; gap: 40px; }
@media (min-width: 900px) { .company-grid { grid-template-columns: 1fr 1.6fr; gap: 80px; } }
.company h2 { font-size: clamp(38px, 5vw, 64px); letter-spacing: -.035em; }
.ledger { display: grid; gap: 0; }
.ledger div { display: grid; grid-template-columns: 1fr 1.4fr; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--shell-line); }
.ledger div:first-child { border-top: 1px solid var(--shell-line); }
.ledger dt { color: var(--ink-3); }
.ledger dd { font-weight: 500; font-size: 19px; }

/* Contact */
.contact { padding: 40px 0 160px; }
.contact-grid { display: grid; gap: 48px; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: .85fr 1.15fr; gap: 80px; align-items: start; } }
.contact h2 { font-size: clamp(44px, 6vw, 80px); letter-spacing: -.04em; }
.contact-copy > p { margin-top: 20px; color: var(--ink-2); max-width: 40ch; font-size: 18px; }
.reach { margin-top: 36px; display: grid; gap: 18px; }
.reach dt { color: var(--ink-3); font-size: 14px; }
.reach dd a { font-weight: 500; font-size: 18px; text-decoration: none; background: linear-gradient(var(--clay), var(--clay)) 0 100% / 0 1.5px no-repeat; transition: background-size .5s var(--spring); }
.reach dd a:hover { background-size: 100% 1.5px; }
.form { padding: 28px; display: grid; gap: 20px; }
@media (min-width: 768px) { .form { padding: 40px; } }
.field { display: grid; gap: 8px; }
.field label { font-weight: 500; font-size: 15px; }
.field input, .field textarea { width: 100%; font: 400 17px/1.5 "Outfit", sans-serif; color: var(--ink); background: var(--bg); border: 0; border-radius: 16px; padding: 14px 16px;
  box-shadow: inset 0 0 0 1px var(--shell-line); transition: box-shadow .4s var(--spring); }
.field textarea { resize: vertical; min-height: 150px; }
.field input:focus, .field textarea:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--clay), 0 0 0 4px color-mix(in srgb, var(--clay) 18%, transparent); }
.field [aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px #B3261E; }
.help { font-size: 14px; color: var(--ink-3); }
.err { font-size: 14px; color: #B3261E; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form .pill { justify-self: start; }
.status { min-height: 1.6em; font-weight: 500; }
.status.ok { color: #2E7D4F; }
.status.bad { color: #B3261E; }
@media (prefers-color-scheme: dark) { .err, .status.bad { color: #F2B8B5; } .status.ok { color: #8FD3A8; } .field [aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px #F2B8B5; } }

/* Footer */
.footer { padding: 40px 0 32px; border-top: 1px solid var(--shell-line); }
.footer-word { width: 100%; height: auto; opacity: .9; }
.footer-word.dark { display: none; }
@media (prefers-color-scheme: dark) { .footer-word.light { display: none; } .footer-word.dark { display: block; } }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; margin-top: 28px; color: var(--ink-3); font-size: 15px; }

/* ---------- Motion (only when the visitor allows it) ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* Hero type rises out of its line mask */
  .js .rise { transform: translateY(105%); opacity: 0; animation: rise 1.1s var(--spring) forwards; animation-delay: calc(var(--d) * 110ms + 150ms); }
  .js .tag.rise, .js .lede.rise, .js .ctas.rise { transform: translateY(24px); }
  @keyframes rise { to { transform: none; opacity: 1; } }

  /* The symbol draws itself: the lozenges, then the hand, then the fingers */
  .js .draw path { stroke-dasharray: var(--len, 1200); stroke-dashoffset: var(--len, 1200); animation: draw 1.6s var(--ease) forwards; }
  .js .draw .d1 { --len: 760; animation-delay: .35s; animation-duration: 2s; }
  .js .draw .d2 { --len: 220; animation-delay: 1.5s; }
  .js .draw .d3 { --len: 60; animation-delay: 1.85s; animation-duration: .8s; }
  .js .draw .d4 { --len: 60; animation-delay: 2s; animation-duration: .8s; }
  @keyframes draw { to { stroke-dashoffset: 0; } }

  .lattice { animation: drift 40s linear infinite; }
  @keyframes drift { to { transform: translate(72px, 72px); } }

  .frieze-track { animation: frieze 18s linear infinite; }
  @keyframes frieze { to { transform: translateX(-60px); } }

  /* Sections arrive heavy: a blur that settles */
  .js .reveal { opacity: 0; transform: translateY(48px); filter: blur(10px); transition: opacity 1s var(--spring), transform 1.1s var(--spring), filter 1s var(--spring); transition-delay: var(--stagger, 0ms); }
  .js .reveal.in { opacity: 1; transform: none; filter: none; }

  /* Story: each word lights up as it crosses the reading line */
  .js .story-text .w { color: var(--ink-3); transition: color .5s var(--ease); }
  .js .story-text .w.lit { color: var(--ink); }
  @supports (animation-timeline: view()) {
    .js .story-text .w { transition: none; animation: lit linear both; animation-timeline: view(); animation-range: entry 60% cover 45%; }
    @keyframes lit { from { color: var(--ink-3); } to { color: var(--ink); } }
  }

  /* Phones drift at different depths while the section scrolls */
  @supports (animation-timeline: view()) {
    .phone { animation: depth linear both; animation-timeline: view(); animation-range: cover; }
    .phone-back { --from: 60px; --to: -40px; }
    .phone-front { --from: 110px; --to: -90px; }
    .phone-side { --from: 30px; --to: -20px; }
    @keyframes depth { from { translate: 0 var(--from); } to { translate: 0 var(--to); } }
  }
}

/* Safety net: if a browser never runs the intro (a throttled background tab),
   app.js marks the page settled after 3 s and everything shows in its final state. */
.js.settled .rise { animation: none !important; opacity: 1 !important; transform: none !important; }
.js.settled .draw path { animation: none !important; stroke-dashoffset: 0 !important; }

/* Legal pages (privacy.html): plain reading column, same tokens */
.legal-top { display: flex; align-items: center; justify-content: space-between; padding-top: 24px; padding-bottom: 24px; }
.legal-back { font-size: 15px; font-weight: 500; color: var(--ink-2); text-decoration: none; }
.legal-back:hover { color: var(--ink); }
.legal { max-width: 720px; padding-top: 32px; padding-bottom: 96px; }
.legal-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--clay-text); }
.legal h1 { font-size: clamp(40px, 7vw, 64px); margin: 12px 0 8px; }
.legal-date { color: var(--ink-3); font-size: 15px; margin-bottom: 32px; }
.legal h2 { font-size: 24px; margin: 40px 0 12px; }
.legal p, .legal li { color: var(--ink-2); }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 1.2em; margin: 12px 0 0; display: grid; gap: 6px; }
.legal a { color: var(--clay-text); }
.legal strong { color: var(--ink); font-weight: 600; }
.footer-row.wrap { margin-top: 0; }
