/* Lezki Polymath Atelier — one stylesheet, no external requests (fonts are self-hosted). */
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/instrument-serif-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/instrument-serif-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("/fonts/instrument-serif-latin-400-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("/fonts/instrument-serif-latin-ext-400-italic.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/fonts/hanken-grotesk-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/fonts/hanken-grotesk-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Palette: drafting ink on cool paper, a verdigris accent (patinated copper of an atelier's tools)
   and a small ochre for marks. Dark theme = the same ink drawing at night. */
:root {
  --paper: #F2F3EF;
  --paper-2: #E8EAE3;
  --ink: #16182A;
  --ink-2: #4A4E63;
  --ink-3: #7B7F92;
  --rule: #D4D7CE;
  --accent: #1F7A70;
  --accent-ink: #FFFFFF;
  --ochre: #B07C1E;
  --card: #FAFAF7;
  --display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --text: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 64ch;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0F1120; --paper-2: #151829; --ink: #E9EAF1; --ink-2: #B4B7C8; --ink-3: #868AA0;
    --rule: #262A40; --accent: #4FB3A6; --accent-ink: #0F1120; --ochre: #D9A441; --card: #13162A; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0F1120; --paper-2: #151829; --ink: #E9EAF1; --ink-2: #B4B7C8; --ink-3: #868AA0;
  --rule: #262A40; --accent: #4FB3A6; --accent-ink: #0F1120; --ochre: #D9A441; --card: #13162A; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--text); font-size: 18px; line-height: 1.6;
  font-feature-settings: "ss01"; text-rendering: optimizeLegibility; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.04; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }
.wrap { width: min(1160px, 100%); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-size: 22px; white-space: nowrap; }
.brand svg { width: 28px; height: 28px; flex: none; }
.nav { display: flex; gap: 22px; font-size: 15px; font-weight: 500; }
.nav a { text-decoration: none; color: var(--ink-2); }
.nav a:hover { color: var(--ink); }
@media (max-width: 640px) { .nav { gap: 14px; font-size: 14px; } .nav .opt { display: none; } .brand span { display: none; } }

/* Hero */
.hero { padding: clamp(48px, 9vw, 112px) 0 clamp(40px, 7vw, 88px); border-bottom: 1px solid var(--rule); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(54px, 9.5vw, 128px); line-height: 0.94; letter-spacing: -0.02em; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero .lede { margin-top: 28px; max-width: 34ch; font-size: clamp(19px, 2.1vw, 23px); color: var(--ink-2); line-height: 1.5; }
.hero .cta { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 16px;
  text-decoration: none; border: 1.5px solid var(--ink); transition: background .2s, color .2s, border-color .2s; }
.btn.solid { background: var(--ink); color: var(--paper); }
.btn.solid:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.line:hover { border-color: var(--accent); color: var(--accent); }
.figure { position: relative; aspect-ratio: 1; width: 100%; max-width: 460px; justify-self: end; }
.figure svg { width: 100%; height: 100%; overflow: visible; }
.figure .c { fill: none; stroke: var(--ink); stroke-width: 1.1; opacity: .55; }
.figure .c.key { stroke: var(--accent); stroke-width: 1.8; opacity: 1; }
.figure .s { fill: none; stroke: var(--ochre); stroke-width: 2.2; stroke-linecap: round; }
.figure .pt { fill: var(--ink); }
.figure .lbl { font-family: var(--display); font-style: italic; font-size: 15px; fill: var(--ink-3); }
.draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.6s cubic-bezier(.55,.1,.25,1) forwards; animation-delay: var(--d, 0s); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.fade { opacity: 0; animation: fade .8s ease forwards; animation-delay: var(--d, 0s); }
@keyframes fade { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .draw { animation: none; stroke-dashoffset: 0; } .fade { animation: none; opacity: 1; } }
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .figure { justify-self: start; max-width: 320px; order: -1; margin-bottom: 8px; }
}

/* Sections */
section { padding: clamp(56px, 8vw, 104px) 0; }
section + section { border-top: 1px solid var(--rule); }
.sec-head { display: grid; grid-template-columns: 220px 1fr; gap: 24px; margin-bottom: 44px; align-items: baseline; }
.sec-head h2 { font-size: clamp(38px, 5.4vw, 64px); }
.sec-head p { margin-top: 14px; color: var(--ink-2); max-width: var(--measure); }
@media (max-width: 820px) { .sec-head { grid-template-columns: 1fr; gap: 10px; margin-bottom: 32px; } }

/* Works */
.works { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 18px; }
.work { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--rule);
  border-radius: 18px; overflow: hidden; transition: border-color .2s, transform .2s; }
.work:hover { border-color: var(--accent); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .work:hover { transform: none; } }
.work .cover { aspect-ratio: 4 / 3; background: var(--paper-2); border-bottom: 1px solid var(--rule); overflow: hidden; }
.work .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.work:hover .cover img { transform: scale(1.03); }
@media (prefers-reduced-motion: reduce) { .work:hover .cover img { transform: none; } }
.work .body { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 22px; flex: 1; }
.work h3 { font-size: 30px; }
.work .kind { font-size: 13px; color: var(--ink-3); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.work p { color: var(--ink-2); font-size: 16.5px; }
.work .foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding-top: 8px; }
.status { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; padding: 4px 10px; border-radius: 999px; border: 1.5px solid currentColor; white-space: nowrap; }
.status.live { color: var(--accent); }
.status.soon { color: var(--ochre); }
.work .links { display: flex; gap: 14px; font-size: 15px; font-weight: 600; }
.work .links a { text-decoration: none; }
.work .links a:hover { text-decoration: underline; }

/* Atelier principles */
.principles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 0; border-top: 1px solid var(--rule); }
.principle { padding: 26px 24px 26px 0; border-bottom: 1px solid var(--rule); }
.principle + .principle { padding-left: 24px; border-left: 1px solid var(--rule); }
@media (max-width: 820px) { .principle + .principle { padding-left: 0; border-left: 0; } }
.principle h3 { font-size: 27px; margin-bottom: 8px; }
.principle p { color: var(--ink-2); font-size: 16.5px; }

/* Founder */
.founder { display: grid; grid-template-columns: 220px 1fr; gap: 24px; }
.founder blockquote { margin: 0; font-family: var(--display); font-size: clamp(28px, 3.6vw, 42px); line-height: 1.18; max-width: 26ch; }
.founder blockquote em { color: var(--accent); }
.founder .bio { margin-top: 26px; color: var(--ink-2); max-width: var(--measure); }
@media (max-width: 820px) { .founder { grid-template-columns: 1fr; gap: 10px; } }

/* Contact */
.contact { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px; }
.contact h2 { font-size: clamp(40px, 6vw, 72px); }
.contact a.mail { font-family: var(--display); font-size: clamp(24px, 3.4vw, 36px); text-decoration-thickness: 1px; overflow-wrap: anywhere; }

/* Footer */
footer { border-top: 1px solid var(--rule); padding: 28px 0 40px; font-size: 14.5px; color: var(--ink-3); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
footer nav { display: flex; gap: 20px; }
footer a { text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* Legal pages */
.legal { padding: clamp(40px, 7vw, 80px) 0; }
.legal .wrap { max-width: calc(var(--measure) + 2 * var(--gutter)); }
.legal h1 { font-size: clamp(44px, 7vw, 72px); margin-bottom: 28px; }
.legal h2 { font-size: 30px; margin: 40px 0 12px; }
.legal p, .legal li { color: var(--ink-2); font-size: 17px; }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 20px; }
.legal address { font-style: normal; color: var(--ink); }
.todo { background: color-mix(in srgb, var(--ochre) 22%, transparent); color: var(--ink); padding: 0 4px; border-radius: 3px; font-weight: 600; }
.note { margin-top: 32px; font-size: 14.5px; color: var(--ink-3); }
