/* FOLIO. The app's approved look (research/photo-restoration/ui/style.md, #152): an open editorial
   page, Newsreader with a sans, fine rules, one pine accent, and every photo shown whole as a print
   on a neutral stage. Every color, font and radius lives in the two token blocks below (the names
   follow the app's OldPhotosColors); nothing else in this file holds one. scripts/check.mjs reads
   these blocks to check contrast in both themes.
   Fonts are self-hosted from /fonts/ (never Google Fonts, which would send visitors' IPs to Google).
   Until the files are added (see README), the system fonts below show instead. */
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 300 600; font-display: swap; src: url("/fonts/Newsreader.ttf") format("truetype"); }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 300 600; font-display: swap; src: url("/fonts/Newsreader-Italic.ttf") format("truetype"); }
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/fonts/SchibstedGrotesk.ttf") format("truetype"); }
:root {
  --background: #f6f7f5;
  --surface: #ffffff;
  --surface-quiet: #eceeeb;
  --photo-stage: #e7e8e6;
  --on-photo-stage: #1b201d;
  --ink: #1b201d;
  --ink-quiet: #474e49;
  --rule: #d6d9d4;
  --line: #7a827c;
  --accent: #2e5a46;
  --on-accent: #ffffff;
  --on-accent-quiet: #f2f7f4;
  --accent-ink: #2e5a46;
  --accent-wash: #e1eae4;
  --danger: #a32d2d;
  --pending-bg: #fff2cc;
  --pending-ink: #4f3a00;
  --print-shadow: 0 1px 2px rgba(20, 24, 21, 0.16), 0 12px 28px -16px rgba(20, 24, 21, 0.5);
  --radius: 8px;
  --radius-small: 6px;
  --radius-print: 2px;
  --font-body: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Newsreader", Georgia, "Iowan Old Style", "Times New Roman", serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --background: #121413;
    --surface: #1b1e1c;
    --surface-quiet: #232724;
    --photo-stage: #0a0b0a;
    --on-photo-stage: #edefec;
    --ink: #edefec;
    --ink-quiet: #b3bab4;
    --rule: #2c312e;
    --line: #7b847d;
    --accent: #3b765c;
    --on-accent: #ffffff;
    --accent-ink: #93c8ac;
    --accent-wash: #1c3328;
    --danger: #f08a8a;
    --pending-bg: #3a2f10;
    --pending-ink: #f3d98a;
    --print-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  }
}

*, *::before, *::after { 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(--background); color: var(--ink); font: 400 1.0625rem/1.5 var(--font-body); }
img, svg { max-width: 100%; }
a { color: inherit; text-underline-offset: 0.2em; }
.prose a, .doc__intro a, .contact a:not(.btn):not(.topic) { color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 3px; border-radius: 4px; }
/* On the dark panel (the accent color) the ring is the panel's own text color. */
.panel :focus-visible { outline-color: var(--on-accent); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.2; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(72rem, 100% - 2rem); margin-inline: auto; }
.wrap--narrow { width: min(44rem, 100% - 2rem); }
.icon { flex: none; }
.skip-link { position: absolute; left: 1rem; top: -4rem; background: var(--accent); color: var(--on-accent); padding: 0.6rem 1rem; border-radius: var(--radius-small); z-index: 10; }
.skip-link:focus { top: 1rem; }
main:focus { outline: none; }

/* Header and footer */
.site-header { border-bottom: 1px solid var(--rule); background: var(--background); z-index: 5; }
@media (min-width: 52rem) { .site-header { position: sticky; top: 0; } }
.site-header__inner { display: flex; align-items: center; gap: 1rem; min-height: 4rem; flex-wrap: wrap; padding-block: 0.5rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; font-family: var(--font-display); font-weight: 500; font-size: 1.25rem; min-height: 48px; }
.brand__mark { width: 1.75rem; height: 1.75rem; flex: none; background: url("/brand-mark.png") center / contain no-repeat; border-radius: 22%; }
.brand__name { line-height: 1.2; }
.site-nav { display: flex; gap: 0.25rem; margin-inline-start: auto; flex-wrap: wrap; }
.site-nav a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 0.75rem; text-decoration: none; color: var(--ink-quiet); border-radius: var(--radius-small); }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--ink); }
.site-nav a[aria-current] { text-decoration: underline; text-underline-offset: 0.4em; }
.lang-menu { position: relative; }
.lang-menu summary { list-style: none; display: inline-flex; align-items: center; gap: 0.4rem; min-height: 48px; padding: 0 0.75rem; cursor: pointer; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu[open] .lang-menu__chevron { transform: rotate(180deg); }
.lang-menu__panel { position: absolute; inset-inline-end: 0; top: calc(100% + 0.5rem); min-width: 13rem; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 0.5rem; z-index: 6; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); }
.lang-menu__title { font-size: 0.875rem; color: var(--ink-quiet); margin: 0.25rem 0.5rem; }
.lang-menu ul { list-style: none; margin: 0; padding: 0; }
.lang-menu li a { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 0.75rem; text-decoration: none; border-radius: var(--radius-small); }
.lang-menu li a:hover { background: var(--surface-quiet); }
.site-footer { border-top: 1px solid var(--rule); margin-top: 4rem; padding-block: 3rem 2rem; background: var(--surface-quiet); }
.site-footer__grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.site-footer__brand p { color: var(--ink-quiet); max-width: 26ch; margin-top: 0.5rem; }
.site-footer__title { font-weight: 650; margin-bottom: 0.25rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li a, .site-footer li span { display: inline-flex; align-items: center; min-height: 48px; }
.site-footer li span { color: var(--ink-quiet); }
.site-footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); color: var(--ink-quiet); font-size: 0.9rem; }
.site-footer__legal p { margin: 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem; min-height: 52px; padding: 0 1.5rem; border-radius: var(--radius); background: var(--accent); color: var(--on-accent); text-decoration: none; font-weight: 600; border: 0; font-size: 1.125rem; }
.btn:hover { opacity: 0.9; }
.btn--soon { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.eyebrow { font-size: 0.875rem; font-weight: 500; color: var(--ink-quiet); margin-bottom: 0.5rem; }
.link-arrow { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 48px; font-weight: 600; }

/* Hero */
.hero { padding-block: 3rem 1rem; }
.hero__grid { display: grid; gap: 2.5rem; align-items: center; }
.hero__title { font-size: clamp(2.125rem, 6vw, 3.5rem); line-height: 1.12; letter-spacing: -0.01em; }
.hero__lead { font-size: 1.25rem; color: var(--ink-quiet); margin-block: 1.25rem 1.75rem; max-width: 34ch; }
.hero__note { color: var(--ink-quiet); margin: 1rem 0 0; font-size: 0.95rem; }
.reassure { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; padding: 1.5rem 0 0; margin: 2rem 0 0; border-top: 1px solid var(--rule); }
.reassure li { display: flex; align-items: center; gap: 0.5rem; color: var(--ink-quiet); }
@media (min-width: 52rem) { .hero__grid { grid-template-columns: 1fr 1.15fr; } }

/* Before and after pairs */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.pairs { display: grid; gap: 1.5rem; }
@media (min-width: 52rem) { .pairs { grid-template-columns: 1fr 1fr; } }
.shot { margin: 0; }
.shot__photo { aspect-ratio: 4 / 5; border-radius: var(--radius-print); overflow: hidden; background: var(--photo-stage); box-shadow: var(--print-shadow); }
.shot__photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.shot figcaption { display: flex; gap: 0.5rem; margin-top: 0.5rem; flex-wrap: wrap; }
.tag { display: inline-block; font-size: 0.875rem; font-weight: 500; padding: 0.15rem 0.6rem; border-radius: var(--radius-small); background: var(--surface-quiet); color: var(--ink); }
.tag--ai { background: var(--accent); color: var(--on-accent); }
.fine-print { color: var(--ink-quiet); font-size: 0.875rem; margin-top: 1rem; }

/* Sections */
.section { padding-block: 4rem; }
.section--tint { background: var(--surface-quiet); }
.section-head { max-width: 40rem; margin-bottom: 2rem; }
.section-title { font-size: clamp(1.75rem, 4vw, 2.25rem); letter-spacing: -0.005em; }
.section-title--small { font-size: 1.5rem; }
.section-head p:last-child { color: var(--ink-quiet); margin: 0.75rem 0 0; }
.card { border-top: 1px solid var(--rule); padding: 1.5rem 0 0; }
.card h3 { font-size: 1.375rem; font-weight: 500; margin-bottom: 0.5rem; }
.card p:last-child { margin-bottom: 0; }
.steps { list-style: none; display: grid; gap: 1.25rem; padding: 0; margin: 0; counter-reset: s; }
@media (min-width: 52rem) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { border-top: 1px solid var(--rule); padding: 1.25rem 0 0; }
.step h3 { font-size: 1.375rem; font-weight: 500; margin-block: 0.5rem; }
.step p { margin: 0; color: var(--ink-quiet); }
.step__num { font-family: var(--font-display); font-size: 1.875rem; line-height: 1; color: var(--accent-ink); font-variant-numeric: lining-nums tabular-nums; }
.features { display: grid; gap: 1.25rem; }
@media (min-width: 52rem) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature > p:not(.eyebrow) { color: var(--ink-quiet); }
.checks { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.5rem; }
.checks li { display: flex; gap: 0.6rem; align-items: flex-start; }
.checks__icon { margin-top: 0.2em; }
.pricing { list-style: none; display: grid; gap: 1.25rem; padding: 0; margin: 0; }
@media (min-width: 40rem) { .pricing { grid-template-columns: 1fr 1fr; } }
@media (min-width: 64rem) { .pricing { grid-template-columns: repeat(4, 1fr); } }
.pricing p { color: var(--ink-quiet); }
.pricing__note { margin-top: 1.5rem; font-weight: 600; }
.panel { background: var(--accent); color: var(--on-accent); border-radius: var(--radius); padding: clamp(1.5rem, 5vw, 3.5rem); }
.panel .eyebrow { color: var(--on-accent-quiet); }
.panel__lead { margin-block: 0.75rem 0; }
.checks--panel { margin-bottom: 1.5rem; }
.panel .link-arrow { color: inherit; }
.faq__item { border-top: 1px solid var(--rule); }
.faq__item:last-child { border-bottom: 1px solid var(--rule); }
.faq__item summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 56px; padding: 0.75rem 0; cursor: pointer; font-weight: 600; list-style: none; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item[open] .faq__chevron { transform: rotate(180deg); }
.faq__item p { color: var(--ink-quiet); padding-bottom: 1rem; margin: 0; }
.closing { padding-block: 4rem 1rem; text-align: center; }
.closing__note { color: var(--ink-quiet); margin-top: 1rem; }
.closing .section-title { margin-bottom: 1.5rem; }

/* Documents: the privacy policy, the terms, account deletion */
.doc { padding-block: 3rem 1rem; }
.doc__head { max-width: 46rem; }
.page-title { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.01em; margin-bottom: 0.75rem; }
.doc__meta { color: var(--ink-quiet); margin-bottom: 1rem; }
.doc__intro { font-size: 1.125rem; }
.pending-inline { background: var(--pending-bg); color: var(--pending-ink); padding: 0 0.35em; border-radius: 4px; }
.glance { margin-top: 2rem; }
.glance__grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); margin-top: 0.75rem; }
.doc__layout { display: grid; gap: 2rem; margin-top: 2.5rem; }
@media (min-width: 60rem) { .doc__layout { grid-template-columns: 16rem minmax(0, 46rem); } .toc { position: sticky; top: 5.5rem; align-self: start; } }
.toc { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 1rem 0; }
.toc__title { font-weight: 650; margin-bottom: 0.5rem; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc a { display: flex; gap: 0.6rem; align-items: baseline; min-height: 44px; padding-block: 0.4rem; text-decoration: none; color: var(--ink-quiet); }
.toc a:hover { color: var(--ink); text-decoration: underline; }
.toc__num, .doc__num { color: var(--ink-quiet); font-variant-numeric: tabular-nums; min-width: 1.5em; }
.prose { max-width: 68ch; overflow-wrap: anywhere; hyphens: auto; }
.doc__section { margin-bottom: 2.5rem; scroll-margin-top: 5.5rem; }
.doc__section h2 { font-size: 1.625rem; font-weight: 500; margin-bottom: 0.75rem; display: flex; gap: 0.6rem; align-items: baseline; }
.doc__section h3 { font-size: 1.25rem; font-weight: 500; margin-block: 1.5rem 0.5rem; }
.prose ul, .prose ol { padding-inline-start: 1.25rem; }
.prose li { margin-bottom: 0.5rem; }
code { font-size: 0.95em; background: var(--surface-quiet); padding: 0.1em 0.35em; border-radius: 4px; }

/* Contact */
.contact { padding-block: 3rem 1rem; max-width: 52rem; }
.contact__lead { color: var(--ink-quiet); font-size: 1.125rem; }
.mail-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; border-block: 1px solid var(--rule); padding: 1.5rem 0; margin-block: 2rem; }
.mail-card__label { color: var(--ink-quiet); margin: 0; font-size: 0.9rem; }
.mail-card__address { margin: 0; font-size: 1.25rem; font-weight: 600; overflow-wrap: anywhere; }
.topics__list { list-style: none; display: grid; gap: 0.75rem; padding: 0; margin: 1rem 0 2.5rem; }
@media (min-width: 40rem) { .topics__list { grid-template-columns: 1fr 1fr; } }
.topic { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; border-top: 1px solid var(--rule); padding: 1rem 0; text-decoration: none; height: 100%; }
.topic:hover .topic__title { color: var(--accent-ink); text-decoration: underline; }
.topic__text { display: grid; gap: 0.2rem; }
.topic__title { font-weight: 650; }
.topic__body { color: var(--ink-quiet); font-size: 0.95rem; }
.purchase h2 { font-size: 1.375rem; font-weight: 500; margin-bottom: 0.5rem; }

/* 404 */
.nf { padding-block: 5rem; max-width: 36rem; }
.nf__body { color: var(--ink-quiet); font-size: 1.125rem; }
.nf__langs ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0 1rem; padding: 0; margin: 1.5rem 0 0; }
.nf__langs a { display: inline-flex; align-items: center; min-height: 44px; }
[hidden] { display: none !important; }
