/* pennello.app, in the studio's type (pennello.studio): Bodoni Moda for the wordmark, DM Serif Display for the words that
   matter, DM Sans for the rest and DM Mono for labels; paper and ink, French ultramarine for what's chosen, hairlines not
   boxes. Day, then dark (ink by night). Every page uses this; the home page's story is at the end. */
@font-face { font-family: 'Bodoni Moda'; src: url('/fonts/bodoni-moda-latin-opsz-normal.woff2') format('woff2'); font-weight: 400 900; font-display: swap; }
@font-face { font-family: 'DM Serif Display'; src: url('/fonts/dm-serif-display-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('/fonts/dm-sans-latin-opsz-normal.woff2') format('woff2'); font-weight: 100 1000; font-display: swap; }
@font-face { font-family: 'DM Mono'; src: url('/fonts/dm-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'DM Mono'; src: url('/fonts/dm-mono-latin-500-normal.woff2') format('woff2'); font-weight: 500 700; font-display: swap; }

:root {
  --paper: #f4f1ea; --paper-2: #ebe6db; --ink: #16171b; --muted: #5f5d57; --faint: #8b8577; --line: rgba(22,23,27,.16); --line-2: rgba(22,23,27,.08);
  --accent: #26357f; --accent-hover: #1c2866; --accent-ink: #fff; --accent-soft: rgba(38,53,127,.07);
  --wordmark: 'Bodoni Moda', Didot, 'Bodoni 72', Georgia, serif;
  --display: 'DM Serif Display', Georgia, 'Times New Roman', serif; --serif: var(--display);
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'DM Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 40px); --measure: 38rem; --wide: 72rem; --top-h: 76px;
  --step-0: clamp(1rem, .96rem + .2vw, 1.0625rem); --step-1: clamp(1.2rem, 1.08rem + .5vw, 1.45rem); --step-2: clamp(1.9rem, 1.3rem + 2.2vw, 3.1rem); --step-3: clamp(2.6rem, 1.5rem + 4.4vw, 5.4rem);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #13120f; --paper-2: #1c1a16; --ink: #eeeae2; --muted: #ada79a; --faint: #857f73; --line: rgba(238,234,226,.18); --line-2: rgba(238,234,226,.08); --accent: #aab4f3; --accent-hover: #c4cbf7; --accent-ink: #10131f; --accent-soft: rgba(170,180,243,.1); }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 var(--step-0)/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: .15em; }
h1, h2, h3 { margin: 0; font-weight: 400; letter-spacing: -.01em; line-height: 1.06; font-family: var(--display); }
h1 { font-size: var(--step-3); line-height: 1; }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); line-height: 1.2; }
p { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: 8px; top: -80px; padding: 8px 12px; background: var(--ink); color: var(--paper); border-radius: 6px; z-index: 20; }
.skip:focus { top: 8px; }

/* ---------- the top bar: the wordmark as the studio's ("Pennello", and APP under it to the right), the links as cards */
.top { position: fixed; inset: 0 0 auto 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: var(--top-h); padding: 0 var(--gutter); color: #fff; transition: color .3s, background-color .3s, border-color .3s; border-bottom: 1px solid transparent; }
.top.is-over-paper { color: var(--ink); background: color-mix(in srgb, var(--paper) 88%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom-color: var(--line-2); }
.wordmark { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 4px; color: inherit; text-decoration: none; }
.wordmark:hover { text-decoration: none; color: inherit; opacity: .85; }
.wm-name { font: 600 1.75rem/.9 var(--wordmark); letter-spacing: -.01em; }
.wm-tag { margin-right: -.3em; font: 500 .6875rem/1 var(--mono); letter-spacing: .3em; text-transform: uppercase; color: var(--accent); }
.top:not(.is-over-paper) .wm-tag { color: inherit; opacity: .85; }
.wordmark.small .wm-name { font-size: 1.35rem; }
.wordmark.small .wm-tag { font-size: .625rem; }
.topnav { display: flex; align-items: center; gap: clamp(6px, .8vw, 10px); }
.topnav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 clamp(12px, 1.2vw, 18px); border: 1px solid currentColor; border-radius: 8px; font: 500 clamp(.92rem, .86rem + .25vw, 1.05rem)/1 var(--sans); color: inherit; white-space: nowrap; transition: background-color .15s, color .15s, border-color .15s; }
.topnav a:hover { text-decoration: none; }
.top:not(.is-over-paper) .topnav a { background: rgba(20,18,14,.28); border-color: rgba(255,255,255,.7); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.top:not(.is-over-paper) .topnav a:hover { background: #fff; color: var(--ink); border-color: #fff; }
.top.is-over-paper .topnav a { border-color: var(--line); }
.top.is-over-paper .topnav a:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.topnav .try-link, .top:not(.is-over-paper) .topnav .try-link, .top.is-over-paper .topnav .try-link { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.topnav .try-link:hover, .top.is-over-paper .topnav .try-link:hover, .top:not(.is-over-paper) .topnav .try-link:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
@media (prefers-color-scheme: dark) { .top:not(.is-over-paper) .topnav .try-link { color: var(--accent-ink); } }
@media (max-width: 600px) {
  :root { --top-h: 64px; }
  .wm-name { font-size: 1.5625rem; }
  .topnav a { min-height: 38px; padding: 0 11px; border-radius: 7px; font-size: .86rem; }
}
@media (max-width: 350px) { .wm-name { font-size: 1.375rem; } .topnav a { padding: 0 8px; } }

/* ---------- shared: prose, labels, buttons, the foot */
.prose { max-width: var(--measure); margin: 0 auto; }
.prose.center { text-align: center; }
.prose p + p { margin-top: 1em; }
.prose h2 { margin-bottom: 1.1rem; }
.prose h2 + p { margin-top: 1.1rem; }
.kicker { font: 500 .75rem/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--accent); margin-bottom: 1.2rem; }
.small { font-size: .92rem; color: var(--muted); }
.button { display: inline-block; padding: .9rem 1.35rem; border-radius: 999px; border: 1px solid currentColor; font: 500 1rem/1 var(--sans); color: inherit; }
.button:hover { text-decoration: none; background: rgba(255,255,255,.08); }
.button.primary { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.button.primary:hover { background: #fff; color: var(--ink); }
.foot { position: relative; z-index: 1; background: var(--paper); padding: 40px var(--gutter) 56px; border-top: 1px solid var(--line-2); color: var(--muted); font-size: .9rem; }
.foot-row { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; max-width: var(--wide); margin: 0 auto; }
.foot .wordmark { color: var(--ink); }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot nav a { color: var(--muted); }
.foot-note { max-width: var(--wide); margin: 18px auto 0; }
.chapter-old { padding: clamp(72px, 12vh, 140px) var(--gutter); }

/* ---------- the hero: the Inukshuk across the whole screen, held still while the story slides up over it */
.hero { position: sticky; top: 0; z-index: 0; height: 100svh; min-height: 560px; overflow: hidden; background: #d9d1c0; color: #fff; }
.hero-paint { position: absolute; inset: 0; }
.hero-paint iframe, .frame iframe, .plate iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; opacity: 0; transition: opacity .6s ease; }
:is(.hero-paint, .frame, .plate) iframe.is-in { opacity: 1; }
.hero::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 160px; background: linear-gradient(rgba(16,14,12,.38), transparent); pointer-events: none; }
.hero::after { content: ''; position: absolute; inset: auto 0 0 0; height: 64%; background: linear-gradient(to top, rgba(16,14,12,.8), rgba(16,14,12,.34) 46%, transparent); pointer-events: none; }
.hero-words { position: absolute; inset: auto 0 0 0; z-index: 1; padding: 0 var(--gutter) clamp(64px, 10vh, 104px); max-width: min(100%, var(--wide)); margin: 0 auto; pointer-events: none; }
.hero-words > * { pointer-events: auto; }
.hero-pre { display: block; font: 500 .8rem/1 var(--mono); letter-spacing: .3em; text-transform: uppercase; margin-bottom: 1.1rem; opacity: .9; }
.hero h1 { max-width: 13ch; text-shadow: 0 1px 30px rgba(0,0,0,.25); }
.hero-sub { margin-top: 1.2rem; max-width: 38rem; font-size: var(--step-1); line-height: 1.4; opacity: .95; }
.hero-note { margin-top: 1rem; max-width: 34rem; font-size: .9rem; opacity: .72; }
.scroll-cue { position: absolute; left: 50%; bottom: 18px; z-index: 1; width: 26px; height: 42px; margin-left: -13px; border: 1px solid rgba(255,255,255,.55); border-radius: 13px; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 50% { transform: translateY(14px); opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .scroll-cue span { animation: none; } }

/* ---------- the story: paper that slides up over the hero */
.story { position: relative; z-index: 1; display: block; background: var(--paper); box-shadow: 0 -40px 80px -40px rgba(0,0,0,.35); }

/* the chapters' words */
.words { max-width: 33rem; }
.eyebrow { display: flex; align-items: baseline; gap: .9rem; margin-bottom: 1.6rem; font: 500 .75rem/1 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.eyebrow .num { font: 400 1rem/1 var(--mono); letter-spacing: .05em; color: var(--accent); padding-right: .9rem; border-right: 1px solid var(--line); }
.words h2 { font-size: clamp(2.2rem, 1.3rem + 2.5vw, 3.9rem); line-height: 1.02; letter-spacing: -.015em; margin-bottom: 1.6rem; text-wrap: balance; }
.words p { color: var(--muted); }
.words p + p { margin-top: 1em; }
.words .lede { color: var(--ink); font-size: clamp(1.1rem, 1rem + .35vw, 1.28rem); line-height: 1.5; }
.words .aside { margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--line-2); font-size: .92rem; }
.ways + .aside { border-top: 0; padding-top: 0; }
.ticks { list-style: none; margin: 1.4rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.ticks li { position: relative; padding: .7rem 0 .7rem 1.6rem; border-bottom: 1px solid var(--line-2); color: var(--ink); font-size: .98rem; line-height: 1.45; }
.ticks li::before { content: ''; position: absolute; left: 0; top: 1.28em; width: .7rem; height: 1px; background: var(--accent); }
.ways { margin: 1.4rem 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.6rem; border-top: 1px solid var(--line); }
.ways > div { padding: .9rem 0 1rem; border-bottom: 1px solid var(--line-2); }
.ways dt { font: 400 1.35rem/1.1 var(--display); color: var(--ink); }
.ways dd { margin: .35rem 0 0; color: var(--muted); font-size: .92rem; line-height: 1.45; }
@media (max-width: 420px) { .ways { grid-template-columns: 1fr; } }

/* the words come up as they're reached, one after another */
.js .words > * { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.js .chapter.is-in .words > * { opacity: 1; transform: none; }
.js .chapter.is-in .words > :nth-child(2) { transition-delay: .07s; }
.js .chapter.is-in .words > :nth-child(3) { transition-delay: .14s; }
.js .chapter.is-in .words > :nth-child(4) { transition-delay: .21s; }
.js .chapter.is-in .words > :nth-child(n+5) { transition-delay: .28s; }
@media (prefers-reduced-motion: reduce) { .js .words > * { opacity: 1; transform: none; transition: none; } }

/* a chapter's own painting, between the words: phones, and screens standing up */
.frame { position: relative; aspect-ratio: 960 / 1120; margin: 0 calc(-1 * var(--gutter)) 2.2rem; overflow: hidden; background: var(--paper-2); }
.frame-note, .plate-note { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; display: flex; align-items: baseline; gap: .8rem; padding: 14px 16px; font: 500 .7rem/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.92); background: linear-gradient(transparent, rgba(12,11,10,.55)); pointer-events: none; }
.plate-live, .frame-note .live { margin-left: auto; opacity: .7; white-space: nowrap; }
.plate-live::before, .frame-note .live::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: .5rem; border-radius: 50%; background: #e0523c; vertical-align: .08em; animation: live 1.6s ease-in-out infinite; }
@keyframes live { 50% { opacity: .25; } }
.chapter { position: relative; padding: clamp(56px, 9vh, 96px) var(--gutter); }
.chapter + .chapter { border-top: 1px solid var(--line-2); }
.plate-col { display: none; }

/* a screen lying down: the words on the left, and one canvas held on the right that paints each chapter's painting */
@media (min-width: 900px) and (min-aspect-ratio: 1/1) {
  .split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); }
  .frame { display: none; }
  .chapters { grid-column: 1; grid-row: 1; }
  .chapter { min-height: 100svh; display: flex; align-items: center; padding: calc(var(--top-h) + 48px) clamp(32px, 5vw, 96px) 64px clamp(24px, 5.5vw, 112px); }
  .chapter + .chapter { border-top: 0; }
  .chapter::after { content: ''; position: absolute; left: clamp(24px, 5.5vw, 112px); right: clamp(32px, 5vw, 96px); bottom: 0; height: 1px; background: var(--line-2); }
  .chapter:last-child::after { display: none; }
  .plate-col { display: block; grid-column: 2; grid-row: 1; position: relative; }
  .plate { position: sticky; top: calc(var(--top-h) + 14px); height: calc(100svh - var(--top-h) - 28px); margin-right: 14px; border-radius: 4px; overflow: hidden; background: var(--paper-2); box-shadow: 0 1px 0 var(--line), 0 40px 80px -48px rgba(0,0,0,.5); }
  .plate-note { padding: 18px 20px; font-size: .72rem; }
  .plate-num { color: #fff; padding-right: .8rem; border-right: 1px solid rgba(255,255,255,.35); }
  .plate-cap { transition: opacity .35s ease; }
  .plate-cap.is-changing { opacity: 0; }
}

/* ---------- the closing chapters: the versions, and try it */
.closing { position: relative; padding: clamp(80px, 13vh, 150px) var(--gutter); border-top: 1px solid var(--line-2); background: var(--paper); }
.compare { max-width: var(--wide); margin: clamp(32px, 5vh, 56px) auto 0; overflow-x: auto; }
.compare table { width: 100%; border-collapse: collapse; font-size: .95rem; table-layout: fixed; }
.compare col.feature { width: 40%; }
.compare th, .compare td { padding: .8rem .9rem; border-top: 1px solid var(--line-2); text-align: center; vertical-align: top; }
.compare thead th { border-top: 0; border-bottom: 1px solid var(--line); font: 400 var(--step-1)/1.1 var(--display); padding-bottom: .9rem; }
.compare thead th small { display: block; margin-top: .5rem; font: 500 1.36rem/1.25 var(--mono); letter-spacing: .02em; text-transform: uppercase; color: var(--muted); }
.compare tbody th { text-align: left; font-weight: 400; color: var(--ink); }
.compare td { color: var(--muted); }
.compare .is-product { background: var(--accent-soft); color: var(--ink); }
.compare thead th.is-product { color: var(--accent); }
.compare thead th.is-product small { color: var(--ink); }
.compare-note { margin-top: 1.4rem; font-size: .92rem; color: var(--muted); max-width: var(--measure); }
@media (max-width: 640px) { .compare th, .compare td { padding: .6rem .45rem; font-size: .84rem; } .compare thead th { font-size: 1.05rem; } .compare thead th small { font-size: .952rem; letter-spacing: 0; line-height: 1.2; overflow-wrap: anywhere; } .compare col.feature { width: 30%; } }
.closing-try { background: var(--ink); color: var(--paper); border-top: 0; }
.closing-try .kicker { color: var(--paper); opacity: .7; }
.closing-try .small { color: var(--paper); opacity: .6; }
.closing-try h2 { font-size: var(--step-3); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 1.8rem !important; margin-bottom: 1.4rem; }

/* ---------- scroll: what comes in as you reach it (the closing chapters) */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
