/* SameFold — site stylesheet. Same palette and rules as the app:
   parchment ground, two LCH-equal side colours, one accent, motion ≤ 260 ms,
   no celebration. Content in Literata, interface in the system face. */

@font-face { font-family: "Literata"; src: url("../fonts/Literata.ttf") format("truetype"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Literata"; src: url("../fonts/Literata-Italic.ttf") format("truetype"); font-weight: 200 900; font-style: italic; font-display: swap; }

:root {
  --ground: #f3f2ed; --surface: #faf9f5; --text: #1c1b19;
  --muted: rgba(28, 27, 25, .62); --hairline: rgba(28, 27, 25, .14);
  --accent: #8e2f3f; --on-accent: #f3f2ed;
  --side-a: #4d69a8; --side-b: #437640; --lens: #205155; --blend: multiply;
  --content: "Literata", Georgia, "Times New Roman", serif;
  --ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --micro: 120ms; --standard: 180ms; --deliberate: 260ms;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #141518; --surface: #1e1f22; --text: #efeee9;
    --muted: rgba(239, 238, 233, .62); --hairline: rgba(239, 238, 233, .14);
    --accent: #d97a88; --on-accent: #141518;
    --side-a: #758ac5; --side-b: #699764; --lens: #a2c7ca; --blend: screen;
  }
}

*, *::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(--ground); color: var(--text);
  font-family: var(--content); font-size: 1.0625rem; line-height: 1.55;
  font-variation-settings: "opsz" 17;
  -webkit-font-smoothing: antialiased;
}
img, svg, picture { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; text-underline-offset: .15em; }
a:hover, a:focus-visible { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-weight: 400; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.125rem, 5.5vw, 3.5rem); font-variation-settings: "opsz" 72; }
h2 { font-size: clamp(1.625rem, 3.6vw, 2.25rem); font-variation-settings: "opsz" 36; }
h3 { font-size: 1.375rem; font-variation-settings: "opsz" 24; }
p { margin: 0; max-width: 68ch; }
p + p { margin-top: 1em; }
.eyebrow { font-style: italic; color: var(--muted); font-size: .9375rem; margin-bottom: .5rem; }
.muted { color: var(--muted); }
.stack > * + * { margin-top: 1.25rem; }

.wrap { width: min(100% - 2.5rem, 1080px); margin-inline: auto; }
.prose { width: min(100% - 2.5rem, 720px); margin-inline: auto; }
section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
section + section { border-top: 1px solid var(--hairline); }

/* Header */
.site-header { padding-block: 1.25rem; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .625rem; color: var(--text); font-size: 1.25rem; }
.brand:hover { text-decoration: none; }
.brand .mark { width: 28px; height: 28px; }
.site-nav { display: flex; gap: 1.25rem; font-family: var(--ui); font-size: .9375rem; flex-wrap: wrap; }
.site-nav a { color: var(--muted); }
.site-nav a:hover { color: var(--text); text-decoration: none; }
@media (max-width: 600px) { .site-nav a[href^="#"], .site-nav a[href^="/#"] { display: none; } }

/* Buttons: interface voice */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--ui); font-weight: 600; font-size: 1.0625rem;
  padding: .875rem 1.5rem; border-radius: 14px; border: 1px solid transparent;
  transition: opacity var(--micro) ease, transform var(--micro) ease;
}
.button:hover { text-decoration: none; opacity: .92; }
.button:active { transform: scale(.985); }
.button.primary { background: var(--accent); color: var(--on-accent); }
.button.secondary { background: var(--surface); color: var(--text); border-color: var(--hairline); }
@media (prefers-reduced-motion: reduce) { .button:active { transform: none; } }

/* Hero */
.hero { padding-block: clamp(2.5rem, 7vw, 6rem); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.hero h1 { max-width: 14ch; }
.hero .lede { font-size: 1.25rem; margin-top: 1.5rem; }
.hero .actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 2rem; align-items: center; }
.hero .price-note { font-family: var(--ui); font-size: .9375rem; color: var(--muted); }
.arrive { animation: arrive var(--standard) ease-out both; }
.arrive.d1 { animation-delay: 90ms; } .arrive.d2 { animation-delay: 180ms; } .arrive.d3 { animation-delay: 270ms; }
@keyframes arrive { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .arrive { animation: none; } }

/* Phone frames: a hairline and a rounded corner, no glossy device art */
.phones { display: flex; gap: 1.25rem; justify-content: center; align-items: flex-start; }
.phone { width: min(100%, 300px); border-radius: 40px; overflow: hidden; border: 1px solid var(--hairline); background: var(--surface); flex: 0 1 300px; }
.phone img { width: 100%; height: auto; }
.phone.offset { margin-top: 3rem; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .phones { justify-content: flex-start; overflow-x: auto; padding-bottom: .5rem; scroll-snap-type: x mandatory; }
  .phone { flex: 0 0 260px; scroll-snap-align: start; }
  .phone.offset { margin-top: 0; }
}

/* Steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 2rem 2.5rem; margin-top: 2.5rem; }
.step .n { display: block; color: var(--side-a); font-size: 1.25rem; margin-bottom: .5rem; }
.step:nth-child(even) .n { color: var(--side-b); }
.step p { margin-top: .5rem; color: var(--muted); }

/* Example picture: the real structure of a shared picture */
.picture { margin-top: 2.5rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.picture .form { width: min(100%, 220px); }
.picture .form .b { mix-blend-mode: var(--blend); }
.picture h3 { margin-top: 2rem; }
.picture h3:first-child { margin-top: 0; }
.picture ul { padding-left: 1.1rem; margin: .75rem 0 0; }
.picture li { margin: .375rem 0; }
.picture li::marker { color: var(--accent); }
.side { border-left: 2px solid var(--side-a); padding-left: 1rem; margin-top: 1.25rem; }
.side.b { border-color: var(--side-b); }
.side .name { font-style: italic; }
.side.a .name { color: var(--side-a); } .side.b .name { color: var(--side-b); }
.paths { display: grid; gap: .75rem; margin-top: .75rem; }
.path { background: var(--surface); border: 1px solid var(--hairline); border-radius: 14px; padding: 1rem 1.125rem; }
.path .costs { color: var(--muted); font-size: .9375rem; margin-top: .375rem; }
.path .costs span:first-child { color: var(--side-a); } .path .costs span:last-child { color: var(--side-b); }
@media (max-width: 860px) { .picture { grid-template-columns: 1fr; } }

/* Plain lists and tables */
.rails { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: .75rem; max-width: 68ch; }
.rails li { padding-left: 1.5rem; position: relative; }
.rails li::before { content: ""; position: absolute; left: 0; top: .6em; width: 8px; height: 8px; border-radius: 50%; background: var(--side-a); }
.rails li:nth-child(even)::before { background: var(--side-b); }
table { border-collapse: collapse; width: 100%; margin-top: 2rem; font-size: 1rem; }
th, td { text-align: left; padding: .75rem .5rem; border-bottom: 1px solid var(--hairline); vertical-align: top; }
th { font-weight: 400; font-style: italic; color: var(--muted); }
td.price { white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }

/* Footer */
.site-footer { border-top: 1px solid var(--hairline); padding-block: 2.5rem; font-family: var(--ui); font-size: .875rem; color: var(--muted); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer .langs { flex-basis: 100%; gap: .5rem 1rem; }
.site-footer .langs a[aria-current] { color: var(--text); }

/* Document pages */
.doc { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.doc h1 { margin-bottom: .5rem; }
.doc h2 { font-size: 1.5rem; margin-top: 2.5rem; }
.doc h3 { font-size: 1.125rem; margin-top: 1.5rem; }
.doc p, .doc li { margin-top: .75rem; }
.doc ul { padding-left: 1.2rem; }
.doc .updated { font-family: var(--ui); font-size: .875rem; color: var(--muted); }
dl.faq dt { font-size: 1.25rem; margin-top: 2rem; }
dl.faq dd { margin: .5rem 0 0; color: var(--text); }
