/* FIFO Calculator — support site
   Calm, restrained, utility-app aesthetic. */

:root {
  --ink: #14181f;
  --ink-2: #3c4453;
  --muted: #6b7280;
  --line: #e6e8ec;
  --paper: #fafaf7;
  --card: #ffffff;
  --accent: #1f4d3a;          /* deep green — remote-work utility */
  --accent-soft: #e8efe9;
  --warn: #8a5a00;

  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(20, 24, 31, 0.04), 0 1px 1px rgba(20, 24, 31, 0.03);
  --shadow-md: 0 8px 24px rgba(20, 24, 31, 0.06);

  --font-serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --max-w: 760px;
  --max-w-wide: 1040px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover { text-decoration-thickness: 2px; }

img, svg { max-width: 100%; display: block; }

/* ---------- Layout ---------- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.container-wide {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header / Nav ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--card);
}
.site-header .container-wide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  width: 32px;
  height: 32px;
  display: inline-block;
}
.brand-name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
}
nav.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 22px;
}
nav.site-nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 15px;
}
nav.site-nav a:hover { color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(1200px 380px at 50% -120px, rgba(31, 77, 58, 0.06), transparent 70%),
    var(--paper);
}
.eyebrow {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 14px;
}
h1.hero-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(34px, 5vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  color: var(--ink);
}
.hero-sub {
  font-size: 19px;
  color: var(--ink-2);
  max-width: 56ch;
  margin: 0 0 28px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.08s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #173b2c; }
.btn-secondary {
  background: var(--card);
  color: var(--ink);
  border-color: var(--line);
}
.btn-secondary:hover { border-color: var(--ink-2); }

/* ---------- Sections ---------- */
section {
  padding: 64px 0;
}
section + section {
  border-top: 1px solid var(--line);
}
h2.section-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(26px, 3.2vw, 32px);
  letter-spacing: -0.015em;
  margin: 0 0 8px;
  color: var(--ink);
}
.section-lede {
  color: var(--ink-2);
  margin: 0 0 32px;
  max-width: 64ch;
}

/* ---------- Feature grid ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.feature h3 {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--ink);
}
.feature p {
  margin: 0;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.55;
}
.feature .icon {
  width: 28px;
  height: 28px;
  color: var(--accent);
  margin-bottom: 12px;
}

/* ---------- FAQ ---------- */
.faq {
  display: grid;
  gap: 4px;
}
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 4px 18px;
}
.faq details + details { margin-top: 8px; }
.faq summary {
  cursor: pointer;
  padding: 14px 0;
  font-weight: 500;
  color: var(--ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}
.faq details[open] summary::after { content: "–"; }
.faq details > *:not(summary) {
  color: var(--ink-2);
  font-size: 15.5px;
  padding-bottom: 16px;
}

/* ---------- Callout / contact ---------- */
.callout {
  background: var(--accent-soft);
  border: 1px solid #d4e0d6;
  border-radius: var(--radius-lg);
  padding: 28px;
}
.callout h3 {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.callout p { margin: 0 0 8px; color: var(--ink-2); }

/* ---------- Legal pages ---------- */
.legal {
  padding: 56px 0 80px;
}
.legal h1 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.legal .updated {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 32px;
}
.legal h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  margin: 36px 0 10px;
  letter-spacing: -0.01em;
}
.legal h3 {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 600;
  margin: 22px 0 8px;
}
.legal p, .legal li {
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.65;
}
.legal ul { padding-left: 20px; }
.legal li + li { margin-top: 4px; }
.legal code {
  font-family: var(--font-mono);
  background: #f1f2f0;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.92em;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--card);
  padding: 32px 0 40px;
  margin-top: 32px;
}
.site-footer .container-wide {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}
.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.site-footer nav ul {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14px;
}
.site-footer nav a:hover { color: var(--accent); }

/* ---------- Utility ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 8px 12px;
  z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

@media (max-width: 600px) {
  .site-header .container-wide { padding-top: 14px; padding-bottom: 14px; }
  nav.site-nav ul { gap: 14px; }
  .hero { padding: 56px 0 44px; }
  section { padding: 48px 0; }
}
