/* ---------- fonts (self-hosted, latin subset) ---------- */
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/fonts/outfit-latin.woff2") format("woff2"); }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 400 500; font-display: swap; src: url("/fonts/geist-mono-latin.woff2") format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("/fonts/instrument-serif-italic-latin.woff2") format("woff2"); }

/* ---------- tokens ---------- */
:root {
  --ink: #111418; --paper: #F4F1EA; --surface: #EAE6DC; --line: #D6D1C5; --muted: #6B6F76;
  --lav: #A99BD1; --sage: #A3BE95; --terra: #D2917B; --teal: #86B3A9; --blue: #7D9BB0; --gold: #D4B45F;
  --display: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --serif: "Instrument Serif", ui-serif, Georgia, serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --radius: 28px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #F1EBDD; --paper: #111418; --surface: #1B1F25; --line: #2A2F36; --muted: #8A8F96; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #F1EBDD; --paper: #111418; --surface: #1B1F25; --line: #2A2F36; --muted: #8A8F96; color-scheme: dark;
}

/* ---------- base ---------- */
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper); color: var(--ink);
  font: 400 18px/1.6 var(--display); -webkit-font-smoothing: antialiased;
  transition: background .4s var(--ease), color .4s var(--ease);
}
a { color: inherit; }
.wrap { width: min(1120px, 100% - 48px); margin-inline: auto; }
.label { font: 400 12px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 12px; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--paper) 78%, transparent); border-bottom: 1px solid transparent; transition: border-color .3s; }
.nav.scrolled { border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; }
.brand-tile { position: relative; width: 38px; height: 38px; border-radius: 11px; background: var(--ink); color: var(--paper);
  display: grid; place-items: center; font: 700 22px/1 var(--display); transition: transform .5s var(--ease); }
.brand-tile::after { content: ""; position: absolute; top: 6px; right: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.brand:hover .brand-tile { transform: rotate(-8deg) scale(1.06); }
.brand-name { font: 700 22px/1 var(--display); letter-spacing: .01em; }
.brand-name span { font: 400 15px var(--mono); margin-left: 4px; color: var(--muted); }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a.link { font: 400 13px var(--mono); letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
  padding: 10px 14px; border-radius: 999px; transition: background .25s, color .25s; }
.nav-links a.link:hover { background: var(--surface); }
.lang { font: 400 13px var(--mono); letter-spacing: .12em; text-transform: uppercase; text-decoration: none; padding: 10px 14px; border-radius: 999px; border: 1.5px solid var(--line); transition: background .25s, border-color .25s; }
.lang:hover { border-color: var(--ink); }
.theme { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); background: transparent; color: var(--ink);
  cursor: pointer; display: grid; place-items: center; transition: transform .4s var(--ease), border-color .25s, background .25s; }
.theme:hover { border-color: var(--ink); transform: rotate(25deg); }
.theme:active { transform: scale(.9); }
.theme svg { width: 20px; height: 20px; }
.theme .moon { display: none; }
:root[data-theme="dark"] .theme .sun { display: none; }
:root[data-theme="dark"] .theme .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme .sun { display: none; }
  :root:not([data-theme="light"]) .theme .moon { display: block; }
}
@media (max-width: 640px) { .nav-links a.link { display: none; } }

/* ---------- buttons ---------- */
.btn { position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; gap: .65em;
  height: 54px; padding: 0 30px; border-radius: 999px; border: 0; cursor: pointer; text-decoration: none;
  font: 700 16px/1 var(--display); transition: transform .25s var(--ease), color .3s, box-shadow .3s; }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; transition: transform .45s var(--ease); }
.btn .arrow { display: inline-block; transition: transform .35s var(--ease); }
.btn:hover .arrow { transform: translateX(5px); }
.btn:active { transform: scale(.96) !important; }
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary::before { background: var(--gold); transform: translateY(101%); }
.btn--primary:hover { color: #111418; box-shadow: 0 14px 30px -12px color-mix(in srgb, var(--gold) 80%, transparent); }
.btn--primary:hover::before { transform: none; }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn--ghost::before { background: var(--ink); transform: scaleX(0); transform-origin: left; }
.btn--ghost:hover { color: var(--paper); }
.btn--ghost:hover::before { transform: scaleX(1); }
.magnetic { transition: transform .25s var(--ease), color .3s, box-shadow .3s; }

/* ---------- hero ---------- */
.hero { padding: 72px 0 110px; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 12px; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); position: relative; }
.pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--gold); animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(3.2); opacity: 0; } }
h1 { font: 700 clamp(46px, 7vw, 92px)/.98 var(--display); letter-spacing: -.035em; margin: 26px 0 28px; }
h1 em { font: italic 400 1.04em/1 var(--serif); letter-spacing: -.01em; }
.lead { font-size: clamp(18px, 2vw, 21px); color: var(--muted); max-width: 30em; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }

/* stack */
.stack-area { display: grid; justify-items: center; gap: 34px; }
.stack { --lift: 0; position: relative; width: min(340px, 78vw); aspect-ratio: 1; margin-top: 104px; cursor: pointer; outline-offset: 14px; user-select: none; -webkit-tap-highlight-color: transparent; }
.stack:hover, .stack:focus-visible { --lift: 1; }
.sc { position: absolute; inset: 0; border-radius: 27%; padding: 8%; display: flex; flex-direction: column; justify-content: space-between;
  transform-origin: 50% 100%;
  transform: translateY(calc(var(--p) * (-22% - var(--lift) * 5%))) scale(calc(1 - var(--p) * .08)) rotate(calc(var(--p) * var(--lift) * (var(--rot, 1deg))));
  z-index: calc(10 - var(--p) * 2);
  transition: transform .8s var(--ease), box-shadow .8s var(--ease);
  box-shadow: 0 30px 50px -30px rgba(0,0,0,.35); }
.sc[data-pos="0"] { --p: 0; } .sc[data-pos="1"] { --p: 1; --rot: -2deg; } .sc[data-pos="2"] { --p: 2; --rot: 2deg; }
.sc.out { transform: translate(58%, -4%) rotate(12deg) !important; z-index: 20; transition-duration: .38s; }
.sc-top { display: flex; justify-content: space-between; align-items: center; font: 400 12px var(--mono); letter-spacing: .16em; }
.sc-dot { width: 9%; aspect-ratio: 1; border-radius: 50%; background: var(--gold); }
.sc-dot.badge { background: #111418; color: #F1EBDD; display: grid; place-items: center; font: 700 15px var(--display); letter-spacing: 0; width: 38px; height: 38px; }
.sc-title { font: 700 clamp(48px, 8vw, 72px)/.95 var(--display); letter-spacing: -.03em; }
.sc-title.small { font: 400 clamp(32px, 5vw, 44px)/1 var(--display); letter-spacing: -.02em; }
.sc--ink { background: var(--ink); color: var(--paper); }
.sc--lav { background: linear-gradient(150deg, #BDB1DE, var(--lav)); color: #111418; }
.sc--sage { background: linear-gradient(150deg, #B6CDA9, var(--sage)); color: #111418; }
.hint { display: inline-flex; align-items: center; gap: 10px; }
.hint svg { width: 16px; height: 16px; transition: transform .6s var(--ease); }
.stack-area:active .hint svg { transform: rotate(-200deg); }

/* ---------- sections ---------- */
section.block { padding: 100px 0; border-top: 1px solid var(--line); }
.sec-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 48px; }
h2 { font: 700 clamp(34px, 4.6vw, 56px)/1.02 var(--display); letter-spacing: -.03em; margin-top: 18px; }
h2 em { font: italic 400 1.05em/1 var(--serif); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { font: 400 14px var(--mono); padding: 11px 20px; border-radius: 999px; border: 1.5px solid var(--line); background: transparent; color: var(--ink); cursor: pointer;
  transition: transform .25s var(--ease), background .25s, color .25s, border-color .25s; }
.chip:hover { transform: translateY(-3px); border-color: var(--ink); }
.chip:active { transform: scale(.94); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 24px; perspective: 1200px; }
.card { --rx: 0deg; --ry: 0deg; position: relative; min-height: 380px; border-radius: var(--radius); padding: 30px; display: flex; flex-direction: column; justify-content: space-between;
  color: #111418; text-decoration: none; transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d;
  transition: transform .5s var(--ease), opacity .35s, box-shadow .5s var(--ease); box-shadow: 0 24px 40px -30px rgba(0,0,0,.45); }
.card.out { opacity: 0; transform: scale(.94); pointer-events: none; }
.card:hover { box-shadow: 0 40px 60px -30px rgba(0,0,0,.5); }
/* Stack strips sit only above the card edge. .card has a transform (stacking context), so z-index:-1 pseudo-elements
   paint OVER the card's own background; they must not overlap the card or they cut its top. Hover grows their height. */
.card::before, .card::after { content: ""; position: absolute; bottom: 100%; left: 7%; right: 7%; border-radius: 28px 28px 0 0; z-index: -1;
  transition: height .5s var(--ease); }
.card::before { height: 10px; background: var(--c2); } .card::after { height: 20px; left: 14%; right: 14%; background: var(--c3); z-index: -2; }
.card:hover::before { height: 17px; } .card:hover::after { height: 34px; }
.card--notes { background: linear-gradient(155deg, #B6CDA9, var(--sage)); --c2: var(--blue); --c3: var(--lav); }
.card--journal { background: linear-gradient(155deg, #2A3340, #222A35); color: #F1EBDD; --c2: var(--gold); --c3: var(--sage); }
.card--soon { background: linear-gradient(155deg, #E0A48F, var(--terra)); --c2: var(--lav); --c3: var(--gold); }
.card-top { display: flex; justify-content: space-between; align-items: center; font: 400 12px var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.badge { font: 400 11px var(--mono); letter-spacing: .12em; padding: 7px 12px; border-radius: 999px; background: rgba(17,20,24,.88); color: #F1EBDD; }
.card--journal .badge { background: var(--gold); color: #111418; }
.card h3 { font: 700 38px/1 var(--display); letter-spacing: -.025em; margin-bottom: 12px; }
.card p { font-size: 17px; line-height: 1.5; opacity: .82; max-width: 26em; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 26px; }
.tags { display: flex; gap: 12px; font: 400 13px var(--mono); opacity: .7; }
.more { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(17,20,24,.9); color: #F1EBDD; font-size: 20px;
  transition: transform .4s var(--ease), background .3s; }
.card--journal .more { background: #F1EBDD; color: #111418; }
.card:hover .more { transform: rotate(-45deg) scale(1.1); background: var(--gold); color: #111418; }

.points { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; }
.point { padding-top: 26px; border-top: 2px solid var(--ink); transition: border-color .3s; }
.point .n { font: 400 13px var(--mono); letter-spacing: .14em; color: var(--muted); }
.point h3 { font: 700 26px/1.15 var(--display); letter-spacing: -.02em; margin: 14px 0 10px; }
.point p { color: var(--muted); font-size: 17px; }
.point:hover { border-color: var(--gold); }

.contact { background: var(--ink); color: var(--paper); border-radius: 40px; padding: clamp(36px, 6vw, 84px); display: grid; gap: 36px; position: relative; overflow: hidden; }
.contact h2 { margin: 0; max-width: 11em; }
.contact .label { color: color-mix(in srgb, var(--paper) 60%, transparent); }
.contact .dots { position: absolute; right: 44px; top: 44px; display: flex; gap: 10px; }
.contact .dots i { width: 14px; height: 14px; border-radius: 50%; animation: bob 3.2s var(--ease) infinite; }
.contact .dots i:nth-child(2) { animation-delay: .15s; } .contact .dots i:nth-child(3) { animation-delay: .3s; }
.contact .dots i:nth-child(4) { animation-delay: .45s; } .contact .dots i:nth-child(5) { animation-delay: .6s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.mail { display: inline-flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.mail a.addr { font: 500 clamp(20px, 3.4vw, 34px)/1 var(--mono); text-decoration: none; background: linear-gradient(var(--gold), var(--gold)) 0 100% / 0 3px no-repeat; padding-bottom: 6px; transition: background-size .5s var(--ease); }
.mail a.addr:hover { background-size: 100% 3px; }
.copy { height: 46px; padding: 0 22px; border-radius: 999px; border: 1.5px solid color-mix(in srgb, var(--paper) 40%, transparent); background: transparent; color: var(--paper);
  font: 400 13px var(--mono); letter-spacing: .1em; cursor: pointer; transition: background .3s, color .3s, transform .25s var(--ease), border-color .3s; }
.copy:hover { background: var(--paper); color: var(--ink); }
.copy:active { transform: scale(.94); }
.copy.done { background: var(--gold); border-color: var(--gold); color: #111418; }

footer { padding: 56px 0 64px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 40px; justify-content: space-between; align-items: center; }
footer nav { display: flex; gap: 28px; }
footer a { font: 400 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: var(--muted); transition: color .25s; }
footer a:hover { color: var(--ink); }

/* ---------- motion ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
[data-d="08"] { --d: .08s; } [data-d="1"] { --d: .1s; } [data-d="16"] { --d: .16s; } [data-d="2"] { --d: .2s; } [data-d="24"] { --d: .24s; }
.contact .dots i.lav { background: var(--lav); } .contact .dots i.sage { background: var(--sage); } .contact .dots i.terra { background: var(--terra); }
.contact .dots i.teal { background: var(--teal); } .contact .dots i.gold { background: var(--gold); }
.reveal.in { opacity: 1; transform: none; }
.sc { animation: dealIn 1s var(--ease) both; }
.sc[data-pos="1"] { animation-delay: .15s; } .sc[data-pos="0"] { animation-delay: .3s; } .sc[data-pos="2"] { animation-delay: 0s; }
@keyframes dealIn { from { opacity: 0; translate: 0 40px; } to { opacity: 1; translate: 0 0; } }

@media (max-width: 880px) {
  .hero { padding: 40px 0 80px; }
  .hero .wrap { grid-template-columns: 1fr; }
  .contact .dots { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
