/* Earthwork Volume Calculator — "Szelvény" (measured section): concrete paper, umber ink, soil
   layers and teal dimension lines, as in the app. Fonts are self-hosted (SIL OFL, see fonts/). */

@font-face { font-family: "Zilla Slab"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/zilla-slab-latin-600-normal.woff2") 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: "Zilla Slab"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/zilla-slab-latin-ext-600-normal.woff2") 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: "Zilla Slab"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/zilla-slab-latin-700-normal.woff2") 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: "Zilla Slab"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/zilla-slab-latin-ext-700-normal.woff2") 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: "Work Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/work-sans-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+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: "Work Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/work-sans-latin-ext-400-normal.woff2") 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: "Work Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/work-sans-latin-600-normal.woff2") 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: "Work Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/work-sans-latin-ext-600-normal.woff2") 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: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/ibm-plex-mono-latin-500-normal.woff2") 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: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/ibm-plex-mono-latin-ext-500-normal.woff2") 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; }

:root {
  --paper: #e7e5df;
  --paper-2: #dcd9d1;
  --card: #fcfbf8;
  --ink: #261e17;
  --soft: #5c5249;
  --line: #cdc8be;
  --earth: #7b4a26;
  --umber: #5e3719;
  --clay: #b98a4e;
  --mid: #d2ae6e;
  --sand: #e3cfa2;
  --teal: #0e6f73;
  --teal-d: #0a5458;
  --teal-t: #d8eceb;
  --earth-t: #f0e3d6;
  --slab: "Zilla Slab", Georgia, "Times New Roman", serif;
  --sans: "Work Sans", "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "IBM Plex Mono", Consolas, "Courier New", monospace;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; 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: 400 1.0625rem/1.6 var(--sans);
  overflow-wrap: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}

h1, h2, h3 {
  font-family: var(--slab);
  font-weight: 700;
  line-height: 1.12;
  margin: 0 0 0.6em;
  overflow-wrap: anywhere;
  hyphens: auto;
  -webkit-hyphens: auto;
}
h1 { font-size: clamp(2rem, 7vw, 3.6rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 4.6vw, 2.5rem); }
h3 { font-size: clamp(1.35rem, 3.4vw, 1.85rem); }
p { margin: 0 0 1em; }
a { color: var(--teal-d); text-underline-offset: 3px; }
a:hover { color: var(--umber); }
img { max-width: 100%; height: auto; display: block; }
code { font-family: var(--mono); }
sub { font-size: 0.72em; line-height: 0; }

:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 10px 14px; z-index: 10; }
.skip:focus { left: 12px; top: 12px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

.kicker {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--earth);
  margin: 0 0 0.8em;
  overflow-wrap: anywhere;
}
.lead { font-size: 1.15rem; color: var(--soft); max-width: 40em; }
.section-lead { color: var(--soft); max-width: 46em; }
.small { font-size: 0.92rem; color: var(--soft); }
.earth { color: var(--earth); }

/* ---- Soil layers ---- */
.strata { position: relative; display: block; }
.strata span { display: block; }
.strata span:nth-child(1) { height: 5px; background: var(--umber); }
.strata span:nth-child(2) { height: 4px; background: var(--clay); }
.strata span:nth-child(3) { height: 4px; background: var(--sand); }
.strata::before { content: ""; position: absolute; left: max(16px, calc((100% - 1120px) / 2 + 28px)); top: 0; width: 56px; height: 13px; background: var(--teal); }

/* ---- Header ---- */
.top { background: var(--paper); }
.top-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--slab); font-weight: 700; font-size: 1.2rem; line-height: 1.15; min-width: 0; }
.brand img { flex: none; }
.nav { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.nav a { display: inline-block; padding: 10px 10px; min-height: 44px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.98rem; border-radius: 4px; }
.nav a:hover { background: var(--paper-2); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--teal-d); text-decoration: underline; text-decoration-thickness: 2px; }

/* ---- Hero ---- */
.hero { padding-top: 40px; overflow: hidden; }
.hero-grid { display: grid; gap: 32px; align-items: end; }
.hero-copy { padding-bottom: 32px; min-width: 0; }
.hero h1 span { display: block; }
.facts { list-style: none; margin: 0 0 1.4em; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.facts li { font-family: var(--mono); font-size: 0.85rem; padding: 6px 10px; border: 1.5px solid var(--ink); border-radius: 3px; background: var(--card); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-bottom: 1em; }
.textlink { font-weight: 600; padding: 10px 0; }
.note { font-size: 0.9rem; color: var(--soft); max-width: 36em; }
.hero-shot { position: relative; justify-self: center; width: min(100%, 360px); }
.shot-hero { margin: 0; height: 520px; overflow: hidden; border: 4px solid var(--ink); border-bottom: 0; background: var(--card); }
.shot-hero img { width: 100%; height: auto; }
.ground span { display: block; }
.ground span:nth-child(1) { height: 30px; background: var(--clay); border-top: 6px solid var(--umber); }
.ground span:nth-child(2) { height: 26px; background: var(--mid); }
.ground span:nth-child(3) { height: 22px; background: var(--sand); }

.dim { font-family: var(--mono); font-size: 0.78rem; color: var(--teal-d); }
.dim-h { position: relative; height: 26px; margin-bottom: 8px; display: flex; align-items: center; justify-content: center; }
.dim-h::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px solid var(--teal); }
.dim-h::after { content: ""; position: absolute; left: 0; right: 0; top: 4px; bottom: 4px; border-left: 2px solid var(--teal); border-right: 2px solid var(--teal); }
.dim-h span { position: relative; background: var(--paper); padding: 0 10px; z-index: 1; }

@media (min-width: 900px) {
  .hero { padding-top: 64px; }
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; gap: 48px; }
  .hero-copy { padding-bottom: 64px; }
  .shot-hero { height: 600px; }
}

/* ---- Google Play badge (neutral, own drawing) ---- */
.play { display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 18px 8px 14px; background: var(--ink); color: #fff; border-radius: 6px; text-decoration: none; }
.play:hover { color: #fff; background: var(--umber); }
.play-mark { width: 0; height: 0; border-top: 11px solid transparent; border-bottom: 11px solid transparent; border-left: 18px solid #6ccbce; }
.play-text { display: flex; flex-direction: column; line-height: 1.15; }
.play-small { font-size: 0.75rem; letter-spacing: 0.03em; }
.play-big { font-family: var(--slab); font-weight: 700; font-size: 1.25rem; }
.play-soon { background: var(--card); color: var(--ink); border: 2px dashed var(--soft); cursor: default; }
.play-soon .play-mark { border-left-color: var(--clay); }

/* ---- Three states ---- */
.states { padding: 64px 0; background: var(--card); border-bottom: 1px solid var(--line); }
.state-bars { display: grid; gap: 18px; margin-top: 28px; }
.state-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; font-family: var(--slab); font-weight: 700; font-size: 1.3rem; }
.state-value { font-family: var(--mono); font-weight: 500; font-size: 1.1rem; }
.state-bar { height: 18px; background: repeating-linear-gradient(90deg, var(--clay) 0 22px, var(--mid) 22px 24px); margin: 6px 0; border-radius: 2px; max-width: 100%; }
.state:nth-child(2) .state-bar { background: repeating-linear-gradient(90deg, var(--mid) 0 10px, var(--sand) 10px 14px); }
.state:nth-child(3) .state-bar { background: var(--umber); }
.state p { color: var(--soft); margin: 0; }
@media (min-width: 900px) { .state-bars { grid-template-columns: repeat(3, 1fr); gap: 28px; } }

/* ---- Steps ---- */
.steps { padding: 72px 0 24px; }
.step { padding: 40px 0; }
.step + .step { border-top: 1px dashed var(--soft); }
.step-grid { display: grid; gap: 28px; align-items: center; }
.step-copy { min-width: 0; }
.step-no { font-family: var(--mono); font-size: 0.9rem; color: var(--earth); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.6em; }
.step-no span { display: inline-block; font-size: 2.2rem; line-height: 1; color: var(--teal); margin-right: 8px; vertical-align: -0.15em; letter-spacing: 0; }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding-left: 26px; margin: 8px 0; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 0.55em; width: 12px; height: 8px; border-left: 2px solid var(--teal); border-right: 2px solid var(--teal); border-top: 2px solid var(--teal); }
.shot { margin: 0 auto; width: min(100%, 340px); border: 3px solid var(--ink); background: var(--card); box-shadow: 10px 10px 0 var(--sand); }
@media (min-width: 900px) {
  .step-grid { grid-template-columns: 1.2fr 0.8fr; gap: 64px; }
  .step-flip .step-copy { order: 2; }
  .step-flip .shot { order: 1; box-shadow: -10px 10px 0 var(--sand); }
}

/* ---- Formulas ---- */
.formulas { padding: 64px 0; background: var(--paper-2); }
.formula-list { margin: 28px 0 0; display: grid; gap: 12px; }
.formula { background: var(--card); border-left: 6px solid var(--earth); padding: 14px 16px; border-radius: 0 4px 4px 0; min-width: 0; }
.formula-fill { border-left-color: var(--teal); }
.formula-both { border-image: linear-gradient(var(--earth) 50%, var(--teal) 50%) 1; border-left-width: 6px; border-left-style: solid; }
.formula dt { font-family: var(--slab); font-weight: 700; font-size: 1.2rem; margin-bottom: 4px; }
.formula dd { margin: 0; display: grid; gap: 4px; }
.formula code { font-size: 0.95rem; color: var(--ink); overflow-wrap: anywhere; }
.formula dd span { color: var(--soft); font-size: 0.95rem; }
@media (min-width: 900px) { .formula-list { grid-template-columns: 1fr 1fr; } .formula-compact { grid-template-columns: 1fr; } }

/* ---- More ---- */
.more { padding: 72px 0; }
.more-grid { display: grid; gap: 40px; align-items: start; }
.more-list { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 18px; }
.more-list li { display: grid; gap: 2px; padding-left: 16px; border-left: 3px solid var(--clay); }
.more-list strong { font-family: var(--slab); font-size: 1.2rem; }
.more-list span { color: var(--soft); }
.strip { display: flex; gap: 20px; overflow-x: auto; padding: 4px 14px 18px 4px; scroll-snap-type: x mandatory; min-width: 0; }
.strip .shot { flex: 0 0 auto; width: min(72vw, 280px); scroll-snap-align: start; margin: 0; }
@media (min-width: 900px) { .more-grid { grid-template-columns: 1fr 1fr; } }

/* ---- Download ---- */
.download { background: var(--umber); color: #fff; padding: 56px 0; border-top: 13px solid var(--clay); }
.download a { color: #b8e6e8; }
.download h2 { color: #fff; }
.download p { color: #f0e3d6; max-width: 36em; }
.download-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.download-inner > div { flex: 1 1 280px; min-width: 0; }
.download a, .legal a, .page a { overflow-wrap: anywhere; }
.download .play-soon { background: transparent; color: #fff; border-color: #f0e3d6; }

/* ---- Pages ---- */
.page { padding: 48px 0 72px; }
.page h2 { font-size: clamp(1.35rem, 4vw, 1.75rem); margin-top: 1.8em; }
.legal p { max-width: 44em; }
.guide-steps { padding-left: 1.4em; display: grid; gap: 12px; }
.guide-steps li { padding-left: 4px; }
.guide-steps strong { display: block; font-family: var(--slab); font-size: 1.15rem; }
.faq { display: grid; gap: 10px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 0 16px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; min-height: 48px; }
.faq details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 10px; }

/* ---- Footer ---- */
.foot { background: var(--paper-2); }
.strata-foot::before { display: none; }
.foot-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; padding-top: 28px; padding-bottom: 32px; }
.foot-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.foot-brand img { flex: none; border-radius: 8px; }
.foot-name { font-family: var(--slab); font-weight: 700; font-size: 1.15rem; margin: 0; }
.foot-small { font-size: 0.88rem; color: var(--soft); margin: 0; }
.foot-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.foot-links a { display: inline-block; padding: 8px 0; min-height: 40px; overflow-wrap: anywhere; }

@media (max-width: 380px) {
  .brand { font-size: 1.05rem; }
  .nav a { padding: 10px 7px; font-size: 0.92rem; }
}
