/* HAYULA · hayula.com
   Dark ink, living colour. A single English edition. */

:root {
  --bg: #0a0a0c;
  --bg-2: #121215;
  --bg-3: #1a1a1e;
  --fg: #f4f0e8;
  --fg-2: #d6d0c4;
  --muted: #918b80;
  --line: rgba(244, 240, 232, .12);
  --line-2: rgba(244, 240, 232, .26);
  --paper: #f4f0e8;
  --ink: #0a0a0c;

  --c-green: #8fd24d;
  --c-yellow: #ffc83d;
  --c-orange: #ff8a3d;
  --c-red: #e9475f;
  --c-purple: #a24fc9;
  --c-blue: #3aa6dc;
  --c-teal: var(--c-blue);
  --rainbow: linear-gradient(90deg, var(--c-green) 0%, var(--c-yellow) 20%, var(--c-orange) 40%, var(--c-red) 60%, var(--c-purple) 80%, var(--c-blue) 100%);

  --font-display: "Fraunces", "Lora", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --wrap: 1140px;
  --gutter: 24px;
  --radius: 24px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); overflow-x: hidden; overflow-x: clip; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-x: clip;
}

/* English content is available without JavaScript. */

img, svg, canvas { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--c-yellow); color: var(--ink); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; inset-inline-start: 16px; top: -60px; background: var(--fg); color: var(--ink); padding: 10px 14px; border-radius: 999px; z-index: 100; }
.skip:focus { top: 16px; }

/* A thread of colour along the top of every page. */
.thread { position: fixed; top: 0; left: 0; right: 0; height: 2px; background: var(--rainbow); z-index: 60; }

/* ---------- Type ---------- */

h1, h2, h3, .display { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.015em; margin: 0; color: var(--fg); }

h2 { font-size: clamp(2.2rem, 4.6vw, 3.9rem); line-height: 1.04; }
h3 { font-size: 1.45rem; line-height: 1.25; font-weight: 600; }

p { margin: 0 0 1.2em; color: var(--fg-2); }
p:last-child { margin-bottom: 0; }
.lead { font-size: 1.22rem; line-height: 1.6; color: var(--fg-2); }

.eyebrow { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-body); font-size: 12px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-bottom: 20px; }
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--rainbow); border-radius: 2px; }

.grad { background: var(--rainbow); -webkit-background-clip: text; background-clip: text; color: transparent; }
.serif-i { font-family: var(--font-display); font-style: italic; font-weight: 500; color: var(--fg); }

/* ---------- Header ---------- */

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(10, 10, 12, .72); -webkit-backdrop-filter: saturate(140%) blur(16px); backdrop-filter: saturate(140%) blur(16px); border-bottom: 1px solid transparent; transition: border-color .3s var(--ease); }
.site-header.scrolled { border-bottom-color: var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand img { width: 30px; height: 30px; filter: invert(1); }
.brand .word { font-family: var(--font-body); font-size: 13px; font-weight: 600; letter-spacing: .34em; text-transform: uppercase; padding-inline-start: .34em; color: var(--fg); }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a { position: relative; font-size: 14px; font-weight: 500; color: var(--fg-2); padding: 6px 0; transition: color .25s; }
.nav a:hover { color: var(--fg); }
.nav a::after { content: ""; position: absolute; inset-inline: 0; bottom: 2px; height: 2px; background: var(--rainbow); border-radius: 2px; transform: scaleX(0); transform-origin: inline-start; transition: transform .35s var(--ease); }
.nav a:hover::after, .nav a:focus-visible::after { transform: scaleX(1); }

.menu-btn { display: none; appearance: none; -webkit-appearance: none; background: transparent; border: 0; padding: 10px; margin: -10px; cursor: pointer; color: var(--fg); }
.menu-btn span { display: block; width: 22px; height: 1.5px; background: currentColor; margin: 5px 0; transition: transform .3s var(--ease), opacity .3s; }
.menu-open .menu-btn span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
.menu-open .menu-btn span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- Buttons ---------- */

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--font-body); font-size: 14.5px; font-weight: 600; letter-spacing: .01em; padding: 15px 28px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--fg); background: transparent; position: relative; overflow: hidden; transition: transform .35s var(--ease-out), border-color .3s, background .3s, color .3s; }
.btn:hover { transform: translateY(-2px); border-color: var(--fg); }
.btn.primary { background: var(--fg); color: var(--ink); border-color: var(--fg); }
.btn.primary::after { content: ""; position: absolute; inset: 0; background: var(--rainbow); opacity: 0; transition: opacity .35s; }
.btn.primary:hover::after { opacity: 1; }
.btn.primary span { position: relative; z-index: 1; }
.btn.ghost:hover { background: var(--bg-3); }

/* ---------- Hero ---------- */

.hero { position: relative; min-height: calc(100svh - 76px); display: flex; align-items: center; text-align: center; padding: 36px 0 64px; overflow: hidden; isolation: isolate; }
.hero .wrap { display: flex; flex-direction: column; align-items: center; position: relative; z-index: 2; }

.blobs { position: absolute; inset: -20%; z-index: 0; pointer-events: none; filter: blur(70px); opacity: .55; }
.blob { position: absolute; width: 46vw; height: 46vw; max-width: 720px; max-height: 720px; border-radius: 50%; mix-blend-mode: screen; }
.blob.a { background: radial-gradient(circle at 40% 40%, var(--c-green), transparent 62%); top: 8%; left: 6%; animation: drift1 26s ease-in-out infinite alternate; }
.blob.b { background: radial-gradient(circle at 60% 50%, var(--c-blue), transparent 62%); bottom: 2%; right: 4%; animation: drift2 30s ease-in-out infinite alternate; }
.blob.c { background: radial-gradient(circle at 50% 50%, var(--c-purple), transparent 62%); top: 30%; right: 26%; animation: drift3 34s ease-in-out infinite alternate; }
.blob.d { background: radial-gradient(circle at 50% 50%, var(--c-orange), transparent 62%); bottom: 12%; left: 30%; width: 30vw; height: 30vw; animation: drift2 22s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { from { transform: translate(0, 0) scale(1); } to { transform: translate(14vw, 10vh) scale(1.2); } }
@keyframes drift2 { from { transform: translate(0, 0) scale(1.1); } to { transform: translate(-12vw, -12vh) scale(.9); } }
@keyframes drift3 { from { transform: translate(0, 0) scale(.9); } to { transform: translate(-10vw, 14vh) scale(1.25); } }

.tone { position: absolute; inset: 0; z-index: 1; pointer-events: none; background-image: radial-gradient(rgba(244, 240, 232, .16) 1px, transparent 1.4px); background-size: 14px 14px; opacity: .22; -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 72%); mask-image: radial-gradient(ellipse at center, #000 20%, transparent 72%); }

.glow { position: absolute; z-index: 1; width: 520px; height: 520px; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, rgba(255, 200, 61, .14), rgba(58, 166, 220, .08) 45%, transparent 70%); transform: translate(-50%, -50%); left: 50%; top: 50%; opacity: 0; transition: opacity .6s; }
.hero:hover .glow { opacity: 1; }

/* The mark: ink draws it, then the real symbol takes over. */
.mark-stage { position: relative; width: clamp(170px, 20vw, 230px); aspect-ratio: 1; margin-bottom: 34px; }
.mark-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.mark-stage .stroke { fill: none; stroke: url(#inkgrad); stroke-width: 11; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 14px rgba(255, 200, 61, .35)); }
.mark-stage .stroke.h { stroke-dasharray: 1200; stroke-dashoffset: 1200; }
.mark-stage .stroke.v { stroke-dasharray: 1200; stroke-dashoffset: 1200; }
.js .mark-stage.go .stroke.v { animation: draw 1.7s .9s var(--ease-out) forwards, inkflow 9s 3.2s linear infinite; }
.js .mark-stage.go .stroke.h { animation: draw 1.7s var(--ease-out) forwards, inkflow 9s 3.2s linear infinite reverse; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes inkflow { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -2400; } }
.mark-stage .real { position: absolute; inset: 0; width: 100%; height: 100%; filter: invert(1) drop-shadow(0 0 24px rgba(244, 240, 232, .18)); opacity: 0; transform: scale(.94); transition: opacity 1.2s var(--ease) 2.5s, transform 1.2s var(--ease) 2.5s; }
.js .mark-stage.go .real { opacity: 1; transform: none; animation: float 7s ease-in-out 4s infinite; }
.js .mark-stage.go svg { animation: strokesfade 1.2s var(--ease) 2.6s forwards; }
@keyframes strokesfade { to { opacity: .22; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.halo { position: absolute; inset: -30%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 122, 69, .18), rgba(180, 82, 207, .12) 40%, transparent 70%); filter: blur(10px); animation: pulse 6s ease-in-out infinite; z-index: -1; }
@keyframes pulse { 0%, 100% { opacity: .6; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.06); } }

.hero h1 { font-size: clamp(2.9rem, 7.2vw, 6.2rem); line-height: 1; font-weight: 600; letter-spacing: -0.025em; max-width: 14ch; }
.hero h1 .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding: .08em .04em .14em; margin: -.08em 0 -.14em; }
.hero h1 .w i { display: inline-block; font-style: normal; transform: translateY(110%); transition: transform 1s var(--ease-out); }
.js .hero.go h1 .w:nth-child(1) i { transition-delay: .25s; }
.js .hero.go h1 .w:nth-child(2) i { transition-delay: .4s; }
.js .hero.go h1 .w:nth-child(3) i { transition-delay: .55s; }
.js .hero.go h1 .w i { transform: none; }
.hero .motto-sub { margin-top: 18px; font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 1.3rem; color: var(--muted); }
.hero .lead { max-width: 660px; margin: 24px auto 0; }
.hero .eyebrow { margin-bottom: 28px; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 34px; }

/* ---------- Sections ---------- */

.section { padding: 128px 0; position: relative; overflow: hidden; overflow: clip; }
.section + .section { border-top: 1px solid var(--line); }
.section.alt { background: var(--bg-2); }
.grid { display: grid; grid-template-columns: 5fr 7fr; gap: 56px 80px; align-items: start; }
.grid .head { position: sticky; top: 112px; }
.grid .head h2 { max-width: 13ch; }
.body { max-width: 64ch; }

/* Purpose */
.statement { font-size: clamp(2.4rem, 5.4vw, 4.6rem); line-height: 1.02; max-width: 20ch; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 64px; }
.card { position: relative; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 30px 32px; overflow: hidden; transform-style: preserve-3d; transition: transform .5s var(--ease-out), border-color .4s; will-change: transform; }
.section.alt .card { background: var(--bg-3); }
.card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .07), transparent 40%); opacity: 0; transition: opacity .4s; pointer-events: none; }
.card:hover { border-color: var(--line-2); }
.card:hover::before { opacity: 1; }
.card .icon { width: 56px; height: 56px; margin-bottom: 26px; }
.card .icon svg { width: 100%; height: 100%; overflow: visible; }
.card .icon path, .card .icon circle, .card .icon line, .card .icon rect { fill: none; stroke: url(#inkgrad2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card .num { font-size: 12px; letter-spacing: .2em; color: var(--muted); display: block; margin-bottom: 10px; }
.card h3 { margin-bottom: 10px; }
.card p { font-size: 15.5px; }

.callout { margin-top: 48px; padding: 30px 34px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(135deg, rgba(255, 122, 69, .09), rgba(58, 166, 220, .08) 50%, rgba(180, 82, 207, .1)); display: flex; align-items: center; gap: 24px; }
.callout .q { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.25; color: var(--fg); }
.callout .seal { flex: 0 0 auto; width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; background: var(--bg); }
.callout .seal img { width: 36px; height: 36px; filter: invert(1); }

/* Company */
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; margin: 40px 0 0; padding: 0; }
.facts div { padding: 16px 0; border-top: 1px solid var(--line); }
.facts dt { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
.facts dd { margin: 0; font-size: 16px; color: var(--fg); }
.orbit { position: relative; width: min(100%, 420px); aspect-ratio: 1; margin: 0 auto; display: grid; place-items: center; }
.orbit::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, var(--c-green), var(--c-yellow), var(--c-orange), var(--c-red), var(--c-purple), var(--c-blue), var(--c-green)); -webkit-mask: radial-gradient(circle, transparent 66%, #000 66.5%, #000 67.5%, transparent 68%); mask: radial-gradient(circle, transparent 66%, #000 66.5%, #000 67.5%, transparent 68%); animation: spin 28s linear infinite; opacity: .9; }
.orbit::after { content: ""; position: absolute; inset: 8%; border-radius: 50%; border: 1px dashed var(--line-2); animation: spin 90s linear infinite reverse; }
.orbit img { width: 54%; filter: invert(1) drop-shadow(0 0 30px rgba(244, 240, 232, .12)); animation: float 8s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* The idea: prime matter takes shape */
.matter { position: relative; width: 100%; aspect-ratio: 1; max-width: 460px; margin: 0 auto; }
.matter canvas { width: 100%; height: 100%; }
.matter .cap { position: absolute; inset-inline: 0; bottom: -6px; text-align: center; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.triptych { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 44px; padding-top: 32px; border-top: 1px solid var(--line); }
.triptych .word { font-family: var(--font-display); font-weight: 600; font-size: 2rem; line-height: 1.1; margin-bottom: 8px; color: var(--fg); }
.triptych p { font-size: 15px; color: var(--muted); }
.triptych .num { font-size: 12px; letter-spacing: .2em; color: var(--muted); display: block; margin-bottom: 12px; }

/* Hayula Ink */
.ink-panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: 32px; padding: clamp(32px, 5vw, 64px); display: grid; grid-template-columns: 6fr 6fr; gap: 56px; align-items: center; position: relative; overflow: hidden; }
.ink-panel::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 3px; background: var(--rainbow); }
.ink-panel::after { content: ""; position: absolute; width: 60%; height: 60%; right: -20%; bottom: -30%; background: radial-gradient(circle, rgba(180, 82, 207, .18), transparent 65%); filter: blur(40px); pointer-events: none; }
.ink-panel h2 { font-size: clamp(2.6rem, 5vw, 4.2rem); line-height: 1; }
.ink-panel .latin { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 1.3rem; color: var(--muted); display: block; margin-top: 6px; }
.ink-panel .sub { font-family: var(--font-display); font-weight: 500; font-size: 1.7rem; line-height: 1.3; color: var(--fg); margin: 14px 0 22px; }
.ink-head { display: flex; align-items: center; gap: 22px; margin-bottom: 8px; }
.ink-head img { width: 92px; height: 92px; flex: 0 0 auto; filter: drop-shadow(0 6px 24px rgba(255, 200, 61, .25)); animation: float 7s ease-in-out infinite; }

.ink-preview { margin: 0; min-width: 0; }
.ipad { position: relative; width: min(100%, 440px); margin: 0 auto; border-radius: 30px; background: #16161a; border: 1px solid var(--line-2); box-shadow: 0 30px 65px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .03); padding: 12px; transform: perspective(1200px) rotateY(-5deg) rotateX(2deg); transition: transform .6s var(--ease-out); }
.ink-panel:hover .ipad { transform: perspective(1200px) rotateY(-1deg) rotateX(0deg); }
.ipad .screen { position: relative; width: 100%; aspect-ratio: 1488 / 2266; border-radius: 19px; background: var(--paper); overflow: hidden; isolation: isolate; }
.ipad .ink-interface { display: block; width: 100%; height: 100%; object-fit: contain; }
.ipad .ink-artwork { position: absolute; left: 15.52419355%; top: 16.10767873%; width: 68.95161290%; height: 60.41482789%; border-radius: 4.48% / 3.36%; overflow: hidden; }
.ipad .ink-artwork img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ink-preview figcaption { font-family: var(--font-display); color: var(--muted); font-size: 1rem; font-style: italic; text-align: center; margin: 20px 0 0; }
@media (prefers-reduced-motion: reduce) { .ipad, .ink-panel:hover .ipad { transform: none; transition: none; } }


.pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--fg); border: 1px solid var(--line-2); border-radius: 999px; padding: 9px 15px; background: rgba(10, 10, 12, .4); }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rainbow); box-shadow: 0 0 10px rgba(255, 200, 61, .6); }
.pill.soft { color: var(--fg-2); }

/* The plan: sealed releases */
.plan-intro { max-width: 70ch; }
.sequence { position: relative; margin-top: 64px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.sequence::before { content: ""; position: absolute; top: 24px; inset-inline: 24px; height: 1px; background: var(--line-2); }
.sequence .progress { position: absolute; top: 23px; inset-inline-start: 24px; height: 3px; width: 0; background: var(--rainbow); border-radius: 3px; transition: width 2.4s var(--ease-out) .3s; box-shadow: 0 0 14px rgba(255, 200, 61, .5); }
.js .sequence.go .progress { width: calc(100% - 48px); }
.rel { position: relative; padding-top: 64px; }
.rel .node { position: absolute; top: 12px; inset-inline-start: 12px; width: 25px; height: 25px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--bg); display: grid; place-items: center; transition: transform .4s var(--ease-out), border-color .4s; }
.rel .node::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.rel.open .node { border-color: var(--c-yellow); box-shadow: 0 0 18px rgba(255, 200, 61, .45); }
.rel.open .node::after { background: var(--rainbow); }
.rel.final .node { border-color: var(--fg); background: var(--fg); }
.rel.final .node::after { background: var(--ink); }
.rel .tile { background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px; padding: 18px 16px 20px; min-height: 196px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; position: relative; overflow: hidden; transition: transform .45s var(--ease-out), border-color .4s; }
.rel .tile:hover { transform: translateY(-4px); border-color: var(--line-2); }
.rel .k { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rel .t { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; line-height: 1.15; color: var(--fg); }
.rel .s { font-size: 13px; color: var(--muted); line-height: 1.5; }
.rel.open .tile { background: linear-gradient(160deg, rgba(255, 122, 69, .14), rgba(58, 166, 220, .1) 60%, rgba(180, 82, 207, .14)); border-color: rgba(255, 200, 61, .35); }
.rel.open .tile img { width: 44px; height: 44px; position: absolute; top: 16px; inset-inline-start: 16px; filter: drop-shadow(0 4px 12px rgba(255, 200, 61, .3)); }
.wax { position: absolute; top: 16px; inset-inline-start: 16px; width: 44px; height: 44px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #a0303d, #5e1620 70%); box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .18), 0 6px 14px rgba(0, 0, 0, .45); display: grid; place-items: center; }
.wax img { width: 24px; height: 24px; filter: invert(1); opacity: .9; }
.rel.sealed .tile { background: repeating-linear-gradient(135deg, var(--bg-2) 0 10px, rgba(244, 240, 232, .025) 10px 11px); }
.rel.final .tile { background: var(--fg); border-color: var(--fg); color: var(--ink); }
.rel.final .t, .rel.final .k, .rel.final .s { color: var(--ink); }
.rel.final .s { color: rgba(10, 10, 12, .7); }
.rel.final .tile img { width: 44px; height: 44px; position: absolute; top: 16px; inset-inline-start: 16px; }
.rel.final .tile::after { content: ""; position: absolute; inset: auto -40% -60% auto; width: 80%; height: 80%; background: radial-gradient(circle, rgba(255, 200, 61, .5), transparent 60%); filter: blur(20px); }
.plan-note { margin-top: 28px; font-size: 14px; color: var(--muted); }

/* Patents */
.stamp { display: inline-block; margin-top: 32px; font-family: var(--font-body); font-size: 12px; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; border: 2px solid var(--c-yellow); border-radius: 6px; padding: 12px 18px; color: var(--c-yellow); transform: rotate(-3deg) scale(1.25); opacity: 0; transition: transform .5s var(--ease-out), opacity .4s; box-shadow: 0 0 24px rgba(255, 200, 61, .25); }
.js .stamp.go, html:not(.js) .stamp { transform: rotate(-3deg) scale(1); opacity: 1; }
.shield { width: min(100%, 360px); margin: 0 auto; display: grid; place-items: center; aspect-ratio: 1; position: relative; }
.shield svg { width: 78%; overflow: visible; }
.shield .ring { position: absolute; inset: 6%; border-radius: 50%; border: 1px solid var(--line-2); animation: spin 60s linear infinite; }
.shield .ring::before { content: ""; position: absolute; top: -5px; left: 50%; width: 9px; height: 9px; border-radius: 50%; background: var(--c-yellow); box-shadow: 0 0 12px var(--c-yellow); }

/* Beliefs strip */
.beliefs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.belief { padding-top: 24px; border-top: 1px solid var(--line-2); }
.belief .num { font-size: 12px; letter-spacing: .2em; color: var(--muted); display: block; margin-bottom: 18px; }
.belief h3 { margin-bottom: 8px; }
.belief p { font-size: 15.5px; }

/* Contact */
.contact-mail { display: inline-block; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.9rem, 4.6vw, 3.2rem); line-height: 1.1; color: var(--fg); margin: 10px 0 30px; background-image: var(--rainbow); background-repeat: no-repeat; background-size: 100% 3px; background-position: 0 100%; padding-bottom: 8px; transition: background-size .4s var(--ease); }
.contact-mail:hover { background-size: 100% 6px; }
.social { display: flex; flex-wrap: wrap; gap: 26px; }
.social a { font-size: 14px; font-weight: 600; color: var(--fg-2); border-bottom: 1px solid var(--line-2); padding-bottom: 2px; transition: border-color .3s, color .3s; }
.social a:hover { border-bottom-color: var(--fg); color: var(--fg); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 64px 0 44px; font-size: 14px; color: var(--muted); background: var(--bg-2); }
.foot-top { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; align-items: start; }
.foot-top .brand img { width: 26px; height: 26px; }
.foot-top .motto { margin-top: 14px; font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 1.2rem; color: var(--fg-2); }
.foot-col h4 { margin: 0 0 14px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.foot-col a { display: block; color: var(--fg-2); padding: 4px 0; transition: color .25s; }
.foot-col a:hover { color: var(--fg); }
.foot-bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.8; }

/* Privacy page */
.doc { max-width: 720px; padding: 72px 0 112px; }
.doc h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); line-height: 1.05; margin-bottom: 10px; }
.doc .meta { color: var(--muted); font-size: 14px; margin-bottom: 44px; }
.doc h2 { font-size: 1.6rem; margin: 44px 0 12px; }
.doc ul { padding-inline-start: 1.2em; color: var(--fg-2); }
.doc li { margin-bottom: .5em; }
.doc strong { color: var(--fg); font-weight: 600; }
.back { display: inline-block; font-size: 14px; color: var(--muted); margin-bottom: 36px; }
.back:hover { color: var(--fg); }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d2 { transition-delay: .12s; } .js .reveal.d3 { transition-delay: .24s; } .js .reveal.d4 { transition-delay: .36s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .blob, .orbit::before, .orbit::after, .orbit img, .shield .ring, .halo, .ink-head img, .mark-stage .real { animation: none !important; }
  .js .mark-stage.go .stroke.h, .js .mark-stage.go .stroke.v { animation: none; stroke-dashoffset: 0; }
  .js .mark-stage.go svg { animation: none; opacity: .22; }
  .mark-stage .real { transition: none; opacity: 1; transform: none; }
  .js .ipad.go .inkstroke path { animation: none; stroke-dashoffset: 0; }
  .hero h1 .w i { transform: none; transition: none; }
  .sequence .progress { transition: none; }
  .stamp { transition: none; }
  .btn:hover, .card, .ipad { transform: none !important; }
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .grid { grid-template-columns: 1fr; gap: 32px; }
  .grid .head { position: static; }
  .ink-panel { grid-template-columns: 1fr; gap: 36px; }
  .ipad { transform: none; }
  .sequence { grid-template-columns: repeat(3, 1fr); row-gap: 28px; }
  .sequence::before, .sequence .progress { display: none; }
  .rel { padding-top: 0; }
  .rel .node { position: static; margin-bottom: 10px; }
  .foot-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  :root { --gutter: 18px; }
  .section { padding: 88px 0; }
  .hero { padding: 36px 0 64px; }
  .mark-stage { margin-bottom: 30px; }
  .nav { display: none; }
  .menu-btn { display: block; }
  .menu-open .nav { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; position: absolute; inset-inline: 0; top: 76px; background: var(--bg); border-bottom: 1px solid var(--line); padding: 12px var(--gutter) 24px; }
  .menu-open .nav a { font-size: 22px; font-family: var(--font-display); font-weight: 600; padding: 8px 0; }
  .pillars, .triptych, .beliefs { grid-template-columns: 1fr; }
  .sequence { grid-template-columns: 1fr 1fr; }
  .facts { grid-template-columns: 1fr; }
  .foot-top { grid-template-columns: 1fr; }
  .callout { flex-direction: column; align-items: flex-start; }
  .ink-head { flex-direction: column; align-items: flex-start; }
  .blobs { filter: blur(50px); }
}

/* ---------- Polish ---------- */

/* Film grain over everything, very light. */
.grain { position: fixed; inset: 0; z-index: 70; pointer-events: none; background-image: url("assets/grain.png"); background-size: 96px 96px; opacity: .05; }

/* The colour thread grows as you read. */
.thread { transform-origin: left center; transform: scaleX(var(--read, 1)); transition: transform .15s linear; }

/* Scroll cue under the hero buttons. */
.cue { margin-top: 52px; display: inline-flex; flex-direction: column; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; letter-spacing: .24em; text-transform: uppercase; }
.cue i { display: block; width: 1px; height: 44px; background: linear-gradient(var(--fg-2), transparent); position: relative; overflow: hidden; }
.cue i::after { content: ""; position: absolute; left: 0; top: -44px; width: 1px; height: 44px; background: linear-gradient(transparent, var(--c-yellow)); animation: cue 2.2s ease-in-out infinite; }
@keyframes cue { to { top: 44px; } }
@media (max-height: 760px) { .cue { display: none; } }

/* Pillar icons draw themselves in. */
.card .icon path, .card .icon circle, .card .icon line { stroke-dasharray: 160; stroke-dashoffset: 160; transition: stroke-dashoffset 1.6s var(--ease-out) .2s; }
.card.in .icon path, .card.in .icon circle, .card.in .icon line, html:not(.js) .card .icon path, html:not(.js) .card .icon circle, html:not(.js) .card .icon line { stroke-dashoffset: 0; }
.pillars { position: relative; }
.pillars::before { content: ""; position: absolute; top: 61px; inset-inline: 30px; height: 1px; background: var(--line); z-index: 0; }
.pillars .card { z-index: 1; }

/* Ink splats: colour that bleeds at the edges of a few sections. */
.splat { position: absolute; pointer-events: none; z-index: 0; opacity: .18; filter: blur(18px); }
.splat.one { width: 420px; inset-inline-end: -140px; top: -120px; }
.splat.two { width: 360px; inset-inline-start: -120px; bottom: -140px; }
.splat.three { width: 320px; inset-inline-end: 4%; top: 40px; opacity: .14; }
.section > .wrap { position: relative; z-index: 1; }

/* Hero mark glints once the ink has settled. */
.mark-stage::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, rgba(244, 240, 232, .0) 55%, rgba(244, 240, 232, .06) 70%, transparent 72%); opacity: 0; }
.js .mark-stage.go::after { animation: ripple 5s ease-out 3.2s infinite; }
@keyframes ripple { 0% { transform: scale(.6); opacity: .9; } 70% { transform: scale(1.45); opacity: 0; } 100% { opacity: 0; } }



/* Contact button */
.contact-row { display: flex; flex-wrap: wrap; align-items: center; gap: 22px 32px; margin-bottom: 30px; }
.contact-row .contact-mail { margin: 10px 0 0; }
.contact-row .btn { margin-top: 10px; }

.blob { will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  .cue i::after, .js .mark-stage.go::after { animation: none; }
  .thread { transition: none; }
  .card .icon path, .card .icon circle, .card .icon line { stroke-dashoffset: 0; transition: none; }
}
@media (max-width: 980px) { .pillars::before { display: none; } .splat { opacity: .1; } }

/* Quiet screentone behind the beliefs. */
#beliefs::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(244, 240, 232, .13) 1px, transparent 1.4px); background-size: 16px 16px; opacity: .35; -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); pointer-events: none; }

/* ---------- Contact form (opens the visitor's own mail app) ---------- */
.writeform { margin-top: 26px; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-3); display: grid; gap: 16px; animation: unfold .5s var(--ease-out); }
.writeform[hidden] { display: none; }
@keyframes unfold { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.field { display: grid; gap: 8px; }
.field label { font-size: 12.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea { font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--line-2); border-radius: 12px; padding: 13px 14px; width: 100%; outline: none; transition: border-color .25s, box-shadow .25s; }
.field textarea { resize: vertical; min-height: 140px; line-height: 1.6; }
.field input:focus, .field textarea:focus { border-color: var(--c-yellow); box-shadow: 0 0 0 3px rgba(255, 200, 61, .18); }
.field input::placeholder { color: var(--muted); opacity: .7; }
.form-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.hint { font-size: 13px; color: var(--muted); max-width: 42ch; line-height: 1.5; }
.form-err { color: var(--c-yellow); font-size: 14px; margin: 0; }
.form-err[hidden] { display: none; }

.social { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.soc { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--fg); transition: transform .35s var(--ease-out), border-color .3s, background .3s; }
.soc svg { width: 21px; height: 21px; }
.soc path { fill: currentColor; transition: fill .3s; }
.soc:hover { transform: translateY(-3px); border-color: var(--fg); background: var(--bg-3); }
.soc:hover path { fill: url(#inkgrad2); }
@media (prefers-reduced-motion: reduce) { .writeform { animation: none; } .soc:hover { transform: none; } }

/* ---------- The story: a book you can open ---------- */
.book { position: relative; display: block; width: min(100%, 300px); aspect-ratio: 3 / 4.2; margin: 0 auto; perspective: 1400px; }
.book .pages { position: absolute; inset: 6px 0 6px 10px; border-radius: 4px 14px 14px 4px; background: repeating-linear-gradient(180deg, #eee9df 0 2px, #d9d3c6 2px 3px); box-shadow: 0 30px 60px rgba(0, 0, 0, .55); }
.book .cover { position: absolute; inset: 0; border-radius: 6px 16px 16px 6px; background: linear-gradient(160deg, #1f1d2a, #121216 60%, #0d0d10); border: 1px solid rgba(244, 240, 232, .14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .03), 0 24px 50px rgba(0, 0, 0, .5); transform-origin: left center; transition: transform .8s var(--ease-out); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 28px; text-align: center; overflow: hidden; }
.book .spine { position: absolute; inset-block: 0; inset-inline-start: 0; width: 7px; background: var(--rainbow); background-size: 100% 600%; animation: spineflow 8s linear infinite; }
@keyframes spineflow { to { background-position: 0 600%; } }
.book .cover img { width: 64px; height: 64px; filter: invert(1) drop-shadow(0 0 14px rgba(244, 240, 232, .2)); }
.book .ttl { font-family: var(--font-display); font-weight: 500; font-size: clamp(2rem, 4vw, 2.5rem); line-height: 1.06; letter-spacing: -.035em; color: var(--fg); }
.book .sub { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 1rem; color: var(--muted); }
.book .hint { position: absolute; bottom: 22px; inset-inline: 0; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); opacity: 0; transform: translateY(6px); transition: opacity .4s, transform .4s; }
.book:hover .cover, .book:focus-visible .cover { transform: rotateY(-26deg); }
.book:hover .hint, .book:focus-visible .hint { opacity: 1; transform: none; }
.book::after { content: ""; position: absolute; inset: 20% -10% -14% -10%; background: radial-gradient(ellipse at center, rgba(255, 200, 61, .18), rgba(162, 79, 201, .1) 50%, transparent 70%); filter: blur(24px); z-index: -1; }
.js .book { animation: float 9s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .js .book, .book .spine { animation: none; } .book:hover .cover { transform: none; } }
