/* fardesk.franzai.com - one stylesheet. Modelled on apfel-web (assets/brand.css tokens + assets/design.css site
   layer): same Inter / Inter Tight fonts, same pre-header, header and footer. The single accent is the orange of
   the Fardesk app icon (#F45F05) where apfel uses franzai orange.
   Hard rules (build/check.py enforces them): no text under 16px, no hover effects, links ink and underlined
   (white on dark), no en or em dashes. Keyboard focus keeps a visible ring.
   1 Tokens + fonts  2 Base  3 Pre-header  4 Header  5 Hero + strip  6 Sections  7 Screenshots  8 Diagram
   9 Ruled lists  10 Terminal + install  11 FAQ  12 Footer */

/* ---------- 1 Tokens + fonts ---------- */
:root {
  --ink: #0F1419;
  --paper: #FFFFFF;
  --muted: #5B636B;
  --hairline: #E5E7EB;
  --rule: #BFC0BF;
  --surface: #FBF9F7;
  --band: #F4EEE9;
  --accent: #F45F05;        /* icon orange: fills, large text (3.24:1 on white, 5.72:1 under ink) */
  --accent-large: #E05206;  /* large orange headline text, 3.9:1 on white */
  --accent-text: #B4430A;   /* small orange text, 5.6:1 on white */
  --panel: #14161A;
  --panel-bar: #202328;
  --panel-text: #F5F5F2;
  --panel-orange: #FF8A3D;  /* orange on the dark panel, 7.7:1 */
  --font-sans: "Inter Variable", "Inter Fallback", Arial, sans-serif;
  --font-heading: "Inter Tight Variable", "Inter Tight Fallback", Arial, sans-serif;
  --font-mono: SFMono-Regular, Menlo, Consolas, monospace;
  --gutter: clamp(20px, 4.5vw, 64px);
  --content: 1400px;
  --font-h2: clamp(36px, 5.6vw, 80px);
  --font-h3: clamp(24px, 2.4vw, 32px);
  --header-height: 62px;
}
@media (min-width: 801px) { :root { --header-height: 68px; } }

@font-face { font-family: "Inter Variable"; font-style: normal; font-display: optional; font-weight: 100 900; src: url("/fonts/inter-latin-wght-normal.woff2?v=3100e775") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter Variable"; font-style: normal; font-display: optional; font-weight: 100 900; src: url("/fonts/inter-latin-ext-wght-normal.woff2?v=34b9c504") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, 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: "Inter Tight Variable"; font-style: normal; font-display: optional; font-weight: 100 900; src: url("/fonts/inter-tight-latin-wght-normal.woff2?v=77fefe8c") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter Tight Variable"; font-style: normal; font-display: optional; font-weight: 100 900; src: url("/fonts/inter-tight-latin-ext-wght-normal.woff2?v=fd9bedda") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, 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: "Inter Fallback"; src: local("Arial"); size-adjust: 109.38%; ascent-override: 88.57%; descent-override: 22.05%; line-gap-override: 0%; }
@font-face { font-family: "Inter Tight Fallback"; src: local("Arial"); size-adjust: 98.96%; ascent-override: 97.89%; descent-override: 24.37%; line-gap-override: 0%; }

/* ---------- 2 Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 16px); }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-sans); font-size: 17px; line-height: 1.55; }
@media (min-width: 801px) { body { font-size: 18px; } }
img, svg { max-width: 100%; }
img { height: auto; }
a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 850; margin: 0; }
p { margin: 0; }
code { font-family: var(--font-mono); font-size: 16px; padding: 1px 5px; border-radius: 4px; background: var(--surface); border: 1px solid var(--hairline); overflow-wrap: anywhere; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
.container { width: min(calc(100% - var(--gutter) * 2), var(--content)); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: 8px; left: 8px; z-index: 1000; min-height: 48px; padding: 12px 24px; background: var(--ink); color: #fff; font-weight: 700; border-radius: 6px; text-decoration: none; transform: translateY(-200%); }
.skip-link:focus { transform: translateY(0); outline: 3px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: 0.01ms; transition-duration: 0.01ms; } }

/* ---------- 3 Pre-header (apfel design.css 79-103, verbatim apart from the brand slot name) ---------- */
.franzai-project { display: grid; place-items: center; min-height: 48px; padding: 2px 20px; background: var(--band); color: var(--ink); text-align: center; }
.franzai-project__link {
  display: block; width: fit-content; max-width: 100%; min-height: 44px; padding: 9px 6px; border-radius: 4px;
  color: var(--ink); font-family: var(--font-sans); font-size: 16px; font-weight: 450; line-height: 26px; letter-spacing: 0;
  text-decoration: none; text-wrap: balance; overflow-wrap: anywhere;
}
.franzai-project__link:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.franzai-project__brand { white-space: nowrap; font-family: var(--font-heading); font-size: 20px; font-weight: 900; line-height: 1; letter-spacing: -.05em; }
.franzai-project__logo { position: relative; white-space: nowrap; }
.franzai-project__logo .franzai-logo { display: inline-block; width: 80px; height: 20px; max-width: none; vertical-align: -2.8px; }
@media (max-width: 380px) { .franzai-project { padding-inline: 12px; } .franzai-project__link { padding-inline: 4px; } }
@media (forced-colors: active) { .franzai-project__link:focus-visible { outline-color: Highlight; } }

/* ---------- 4 Header (apfel: 68 px row, 44 px wordmark, 21 px underlined nav, 2 px ink rule; mobile: "Menu") ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: #fff; }
.site-header__bar { display: flex; flex-wrap: wrap; align-items: center; border-bottom: 2px solid var(--ink); }
.site-header__logo, .site-header__toggle-slot { display: flex; align-items: center; min-height: var(--header-height); }
.site-header__logo { margin-right: auto; }
.wordmark { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-family: var(--font-heading); font-size: 36px; font-weight: 900; letter-spacing: -.05em; line-height: 1; text-decoration: none; }
.site-header__toggle-slot { display: none; }
.menu-button { display: inline-flex; align-items: center; min-width: 44px; height: 44px; padding: 0; background: transparent; border: 0; color: var(--ink); cursor: pointer; font: inherit; }
.menu-button__label { font-size: 20px; font-weight: 500; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 6px; }
.site-menu { flex-basis: 100%; padding-bottom: 24px; }
.site-menu__list { margin: 0; padding: 0; list-style: none; }
.site-menu__link { display: flex; align-items: center; min-height: 56px; padding: 12px 0; border-top: 1px solid var(--hairline); color: var(--ink); font-family: var(--font-heading); font-size: 24px; font-weight: 700; }
@media (max-width: 1023px) {
  .js .site-header__toggle-slot { display: flex; }
  .js .site-menu { display: none; position: fixed; inset: var(--header-height) 0 0; z-index: 100; overflow-y: auto; padding: 8px var(--gutter) 32px; background: #fff; }
  .js .site-menu.is-open { display: block; }
  .js.menu-open { overflow: hidden; }
}
@media (min-width: 801px) { .wordmark { font-size: 44px; } }
@media (min-width: 1024px) {
  .site-header__bar { flex-wrap: nowrap; column-gap: 24px; }
  .site-menu { display: contents; }
  .site-menu__nav { margin-left: auto; }
  .site-menu__list { display: flex; gap: 18px; }
  .site-menu__link { min-height: 48px; padding: 8px 4px; border-top: 0; white-space: nowrap; font-family: var(--font-sans); font-size: 21px; font-weight: 500; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 6px; }
}

/* ---------- 5 Hero + strip ---------- */
.hero { padding-block: 40px 56px; }
.hero__grid { display: grid; gap: 40px; }
.eyebrow { color: var(--accent-text); font-size: 18px; font-weight: 700; margin-bottom: 20px; }
.hero__brand { display: flex; align-items: center; gap: clamp(16px, 2vw, 28px); }
.hero__icon { width: clamp(84px, 11vw, 148px); border-radius: 22%; flex: none; }
.hero__title { font-size: clamp(64px, 11vw, 168px); font-weight: 900; line-height: .9; letter-spacing: -.06em; }
.hero__subtitle { margin: 24px 0 20px; color: var(--accent-large); font-family: var(--font-heading); font-size: clamp(32px, 4.4vw, 60px); font-weight: 850; line-height: 1.02; letter-spacing: -.04em; text-wrap: balance; }
.lead { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.45; max-width: 720px; }
.hero-tags { display: flex; flex-wrap: wrap; margin: 28px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.tag { padding: 12px 24px 12px 0; font-family: var(--font-heading); font-size: 20px; font-weight: 800; }
.tag + .tag { padding-left: 24px; border-left: 1px solid var(--ink); }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 28px; font-size: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 12px 24px; border-radius: 4px; font-size: 18px; font-weight: 750; text-decoration: none; }
.btn--primary { background: var(--ink); color: #fff; }
.hero__shot { display: flex; justify-content: flex-start; }
@media (max-width: 800px) {
  .hero-tags { flex-direction: column; }
  .tag { font-size: 24px; padding: 12px 0; }
  .tag + .tag { padding-left: 0; border-left: 0; border-top: 1px solid var(--ink); }
}
@media (min-width: 1024px) {
  .hero { padding-block: 56px 80px; }
  .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); align-items: center; gap: 64px; }
  .hero__shot { justify-content: flex-end; }
}
.strip { background: var(--accent); color: var(--ink); padding-block: 22px; }
.strip p { font-family: var(--font-heading); font-size: clamp(24px, 2.8vw, 38px); font-weight: 850; line-height: 1.15; letter-spacing: -.02em; }

/* ---------- 6 Sections + cards ---------- */
.section { padding-block: clamp(56px, 7vw, 104px); border-top: 1px solid var(--hairline); }
.section-header { margin-bottom: 40px; }
.section-header h2 { font-size: var(--font-h2); line-height: 1.02; font-weight: 850; letter-spacing: -.045em; margin-bottom: 20px; text-wrap: balance; }
.section-header p { font-size: clamp(18px, 1.8vw, 25px); line-height: 1.4; max-width: 1040px; }
h3 { font-size: var(--font-h3); line-height: 1.15; letter-spacing: -.03em; margin-bottom: 12px; }
.cards { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; }
.card { padding: 28px; background: var(--surface); border: 1px solid var(--hairline); border-top: 6px solid var(--accent); border-radius: 4px; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(2, 1fr); gap: 24px; } }
@media (min-width: 1200px) { .cards { grid-template-columns: repeat(4, 1fr); } }
.columns { display: grid; gap: 32px; margin-top: 48px; }
.columns h3 { padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
@media (min-width: 900px) { .columns { grid-template-columns: repeat(3, 1fr); gap: 40px; } .columns--two { grid-template-columns: repeat(2, 1fr); } }

/* ---------- 7 Screenshots (phone frames; the gallery scrolls sideways on phones) ---------- */
.phone { display: block; }
.phone img { display: block; width: 100%; border: 8px solid var(--ink); border-radius: 40px; background: var(--ink); }
.phone--hero { width: min(100%, 320px); }
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: min(72vw, 280px); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 16px; }
.gallery__item { margin: 0; scroll-snap-align: start; }
.gallery__item figcaption { margin-top: 16px; font-size: 18px; line-height: 1.4; }
@media (min-width: 1100px) { .gallery { grid-auto-flow: row; grid-template-columns: repeat(5, 1fr); overflow: visible; } }

/* ---------- 8 Diagram ---------- */
.diagram { margin: 0; }
.diagram__flow { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.diagram__node { display: grid; align-content: start; gap: 4px; padding: 20px 24px; border: 2px solid var(--ink); border-radius: 4px; background: #fff; }
.diagram__node strong { font-family: var(--font-heading); font-size: 26px; font-weight: 850; letter-spacing: -.02em; line-height: 1.15; }
.diagram__label { color: var(--accent-text); font-size: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.diagram__node--hub { background: var(--surface); border-color: var(--accent); border-width: 4px; }
.diagram__node--dark { background: var(--panel); border-color: var(--panel); color: var(--panel-text); }
.diagram__node--dark .diagram__label { color: var(--panel-orange); }
.diagram__link { display: flex; align-items: center; min-height: 64px; margin-left: 32px; padding-left: 24px; border-left: 4px solid var(--accent); font-size: 16px; font-weight: 600; }
.diagram figcaption { margin-top: 24px; font-size: 18px; max-width: 900px; }
@media (min-width: 1100px) {
  .diagram__flow { flex-direction: row; align-items: stretch; }
  .diagram__node { flex: 1 1 0; }
  .diagram__link { flex: 0 0 130px; flex-direction: column; justify-content: center; margin: 0; padding: 0 8px; border-left: 0; text-align: center; line-height: 1.3; }
  .diagram__link::after { content: ""; display: block; width: 100%; height: 4px; margin-top: 10px; background: var(--accent); }
}

/* ---------- 9 Ruled lists (security, requirements) ---------- */
.ruled { margin: 0; border-top: 2px solid var(--ink); }
.ruled > div { display: grid; align-content: start; gap: 6px; padding: 20px 0; border-bottom: 1px solid var(--rule); }
.ruled dt { font-family: var(--font-heading); font-size: 24px; font-weight: 850; letter-spacing: -.02em; }
.ruled dd { margin: 0; max-width: 820px; }
@media (min-width: 900px) {
  .ruled > div { grid-template-columns: minmax(240px, 1fr) 2fr; gap: 40px; padding: 24px 0; }
  .ruled--grid { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 48px; }
  .ruled--grid > div { grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- 10 Terminal + install ---------- */
.terminal { background: var(--panel); color: var(--panel-text); border-radius: 4px; overflow: hidden; }
.terminal__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 12px 10px 20px; background: var(--panel-bar); }
.terminal__title { font-size: 16px; font-weight: 600; color: var(--panel-text); }
.copy-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; background: transparent; color: #fff; border: 1px solid #767A80; border-radius: 4px; font: inherit; font-size: 17px; font-weight: 700; cursor: pointer; }
.copy-btn svg { width: 18px; height: 18px; flex: none; }
.copy-btn:focus-visible { outline-color: #fff; }
.terminal__code { margin: 0; padding: 24px; font-family: var(--font-mono); font-size: 17px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (min-width: 801px) { .terminal__code { padding: 28px 32px; font-size: 19px; } }
.note { margin-top: 16px; font-size: 18px; }
.steps { margin: 0; padding-left: 28px; display: grid; gap: 10px; }
.steps li::marker { font-weight: 800; color: var(--accent-text); }

/* ---------- 11 FAQ (native details, open by default like apfel) ---------- */
.faq { border-top: 2px solid var(--ink); }
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 16px 0; cursor: pointer; list-style: none; font-family: var(--font-heading); font-size: clamp(22px, 2.2vw, 30px); font-weight: 850; letter-spacing: -.02em; line-height: 1.2; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ""; flex: none; width: 14px; height: 14px; margin-right: 6px; border-right: 4px solid var(--accent); border-bottom: 4px solid var(--accent); transform: rotate(45deg); }
.faq-item[open] summary::after { transform: rotate(-135deg); }
.faq-item__body { padding-bottom: 24px; max-width: 900px; }

/* ---------- 12 Footer (apfel: two columns, base line, "is a franzai project" line) ---------- */
.site-footer { margin-top: 0; padding-block: 48px; border-top: 2px solid var(--ink); font-size: 18px; }
.site-footer__grid { display: grid; gap: 32px; }
.site-footer__heading { margin: 0 0 8px; color: var(--muted); font-family: var(--font-sans); font-size: 16px; font-weight: 700; }
.site-footer__list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.site-footer__link { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer__text { display: flex; align-items: center; min-height: 44px; }
.site-footer__base { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--hairline); }
.site-footer__tagline { color: var(--muted); }
.site-footer__project { margin: 8px 0 0; }
.site-footer__project .franzai-project__link { padding-inline: 0; }
.site-footer__copy { margin-top: 8px; color: var(--muted); font-size: 16px; }
@media (min-width: 768px) { .site-footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .site-footer { padding-block: 56px; } .site-footer__grid { grid-template-columns: repeat(3, 1fr); } }
