/* ==========================================================================
   KoirApp — koirapp.fi marketing site
   Design system extracted verbatim from the Claude Design "Home" prototype.
   Fonts self-hosted (no Google CDN) to keep the site consistent with the
   app's own privacy stance: no third-party requests, nothing to consent to.
   ========================================================================== */

/* ----- Fonts (self-hosted woff2 subsets: latin + latin-ext cover en + fi) --- */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url('/assets/fonts/bricolage-latin.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: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url('/assets/fonts/bricolage-latinext.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: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/hanken-latin.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: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/hanken-latinext.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: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/dmmono-latin.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: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/dmmono-latinext.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;
}

/* ----- Design tokens (from the prototype's inline palette) ----------------- */
:root {
  --bg:        #E6EBE2;
  --bg-band:   #DEE6D8;
  --ink:       #1E2A22;
  --ink-soft:  #3B433A;
  --muted:     #525B50;
  --muted-2:   #6E7B72;
  --faint:     #7E8A76;
  --green:     #3E8E5E;
  --green-dk:  #2E7049;
  --terra:     #CE5B4A;
  --card:      #FFFFFF;
  --line:      #D6DDD0;
  --line-2:    #E2E8DC;
  --dark:      #1E2A22;
  --on-dark:   #E7EAE2;
  --on-dark-hi:#EEF2EB;
  --on-dark-mut:#A2AB99;
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Hanken Grotesk', system-ui, sans-serif;
  --font-mono: 'DM Mono', ui-monospace, monospace;
  --maxw: 1080px;
}

/* ----- Reset / base ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: var(--green-dk); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 4px; }

/* ----- Skip link (a11y) --------------------------------------------------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--on-dark-hi);
  padding: 10px 16px; border-radius: 0 0 10px 0; font-weight: 600; font-size: 14px;
}
.skip-link:focus { left: 0; }

/* ----- Sticky header (ported from the design's Header component) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(232, 237, 227, 0.82);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-body);
}
.site-header__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 28px;
  height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: baseline; gap: 9px; text-decoration: none; }
.brand__name { font-size: 23px; font-family: var(--font-display); font-weight: 800; color: var(--ink); letter-spacing: -0.03em; }
.brand__by { font-size: 11px; font-weight: 600; color: var(--muted-2); letter-spacing: 0.07em; text-transform: uppercase; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  text-decoration: none; font-size: 15px; font-weight: 500; color: var(--muted-2);
  padding: 6px 0; border-bottom: 2px solid transparent; transition: color .2s;
}
.nav a:hover { color: var(--green-dk); }
.nav a[aria-current="page"] { color: var(--green-dk); font-weight: 600; border-bottom-color: var(--green); }
.header-cta {
  text-decoration: none; background: var(--green); color: var(--on-dark-hi);
  font-size: 14px; font-weight: 600; padding: 10px 18px; border-radius: 999px; white-space: nowrap;
  box-shadow: 0 2px 6px -1px rgba(30, 38, 32, 0.22); transition: background .2s;
}
.header-cta:hover { background: var(--green-dk); }

/* ----- Footer (ported from the design's Footer component) ----------------- */
.site-footer { background: var(--dark); color: #D2D8CC; font-family: var(--font-body); }
.site-footer__inner { max-width: var(--maxw); margin: 0 auto; padding: 72px 28px 36px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; }
.footer-brand { display: flex; align-items: baseline; gap: 9px; margin-bottom: 16px; }
.footer-brand .brand__name { color: var(--on-dark-hi); }
.footer-brand .brand__by { color: #869080; }
.footer-blurb { margin: 0; font-size: 15px; line-height: 1.6; color: #9AA295; max-width: 340px; }
.footer-col h2 { margin: 0 0 16px; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #869080; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.footer-col a { text-decoration: none; font-size: 15px; color: #D2D8CC; transition: color .2s; }
.footer-col a:hover { color: var(--on-dark-hi); }
.footer-legal { margin-top: 56px; padding-top: 24px; border-top: 1px solid #364034; }
.footer-legal p { margin: 0; font-size: 13px; line-height: 1.6; color: #79836F; }

/* ----- Content pages (legal / support / about) prose ---------------------- */
.page { max-width: 760px; margin: 0 auto; padding: 72px 28px 96px; }
.page--wide { max-width: 880px; }
.page__eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; color: var(--faint); text-transform: uppercase; margin: 0 0 14px; }
.page h1 { font-family: var(--font-display); font-weight: 800; font-size: 40px; line-height: 1.1; letter-spacing: -0.035em; margin: 0 0 14px; text-wrap: balance; }
.page__updated { font-size: 14px; color: var(--muted-2); margin: 0 0 32px; }
.prose { font-size: 17px; line-height: 1.7; color: var(--ink-soft); }
.prose h2 { font-family: var(--font-display); font-weight: 800; font-size: 24px; letter-spacing: -0.02em; line-height: 1.2; margin: 44px 0 14px; color: var(--ink); }
.prose h3 { font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -0.01em; margin: 28px 0 10px; color: var(--ink); }
.prose p { margin: 0 0 16px; text-wrap: pretty; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin: 0 0 9px; }
.prose a { color: var(--green-dk); text-underline-offset: 2px; }
.prose strong { color: var(--ink); font-weight: 700; }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 40px 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 15px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 700; color: var(--ink); background: var(--bg-band); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 20px; border-radius: 12px; border: 1px solid var(--line); }
.table-scroll table { margin: 0; }
.table-scroll th, .table-scroll td { border-bottom: 1px solid var(--line); }

/* Callout blocks reused across content pages */
.callout {
  border-radius: 16px; padding: 18px 20px; margin: 0 0 24px;
  font-size: 15.5px; line-height: 1.6;
}
.callout p { margin: 0 0 10px; }
.callout p:last-child { margin: 0; }
.callout--draft { background: #FBEFD6; border: 1px solid #E7C98A; color: #6B4E14; }
.callout--warn { background: #FBE7E2; border: 1px solid #E7B3A8; color: #7A2E1E; }
.callout--info { background: #EAF0E6; border: 1px solid #C9DAC0; color: #2E4A38; }
.callout strong { color: inherit; }

.lead { font-size: 20px; line-height: 1.6; color: var(--muted); margin: 0 0 28px; text-wrap: pretty; }

/* Simple two-column layout for the About / values grid */
.value-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 28px 0 8px; }
.value-card { background: var(--card); border: 1px solid var(--line-2); border-radius: 18px; padding: 26px 24px; }
.value-card h3 { margin: 0 0 8px; }
.value-card p { margin: 0; font-size: 15.5px; color: var(--muted-2); line-height: 1.6; }

/* ----- Responsive collapse (the prototype was desktop-only; make it real) --
   Home uses inline desktop grids; these class hooks override on small screens.
   Inline styles win the cascade, so mobile overrides need !important.        */
@media (max-width: 900px) {
  .home-grid-2, .home-grid-hero { grid-template-columns: 1fr !important; gap: 40px !important; }
  .home-grid-4 { grid-template-columns: repeat(2, 1fr) !important; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  /* Let grid children shrink below their content's intrinsic width so a wide
     display heading can't force horizontal overflow. */
  .home-grid-hero > *, .home-grid-2 > *, .home-grid-4 > * { min-width: 0; }
}
@media (max-width: 640px) {
  html, body { overflow-x: hidden; }
  .home-grid-4 { grid-template-columns: 1fr !important; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .nav { display: none; }
  .page h1 { font-size: 32px; }
  .home-section { padding-left: 20px !important; padding-right: 20px !important; }
  /* Scale the design's fixed desktop display type down so long lines fit a
     phone without overflowing. Desktop rendering is untouched. */
  .home-root h1 { font-size: 34px !important; line-height: 1.1 !important; }
  .home-root h2 { font-size: 26px !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
