/* Ameryin — hand-tuned. Natural materials: stone, linen, clay, bark.
   System fonts only. No frameworks, no trackers, no webfonts. */

:root {
  --paper: #f7f3ea;          /* linen */
  --card: #fffdf7;
  --ink: #2b2520;            /* bark charcoal */
  --muted: #6f665a;
  --faint: #9a917f;
  --line: #e4dac6;           /* stone */
  --clay: #a9603c;           /* terracotta — accents, CTAs */
  --clay-deep: #8a4e2f;
  --clay-light: #c98a5e;     /* clay for dark backgrounds */
  --clay-soft: #f4e6d7;
  --sage: #75815f;
  --sage-soft: #e9ebdb;
  --olive: #5a5f3c;
  --bark: #211b15;           /* deep bark — dark sections */
  --bark-ink: #16110d;
  --cream: #f6f0e2;
  --cream-dim: rgba(246, 240, 226, 0.72);
  --radius: 18px;
  --maxw: 70rem;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 18px 44px -22px rgba(33, 27, 21, 0.3);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: #efe0cd; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0 0 0.9rem;
  text-wrap: balance;
}

p { margin: 0 0 1.1rem; }

a { color: var(--clay); }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 243, 234, 0.88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.25s ease;
}

.site-header.scrolled { box-shadow: 0 10px 30px -18px rgba(33, 27, 21, 0.35); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}

.brand .mark {
  width: 30px;
  height: 30px;
  color: var(--ink);
  flex: none;
}

.brand span {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.32rem;
  letter-spacing: -0.01em;
}

.site-header nav { display: flex; align-items: center; }

.site-header nav a {
  position: relative;
  margin-left: 1.5rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.97rem;
  padding: 0.2rem 0;
  transition: color 0.2s ease;
}

.site-header nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: var(--clay);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.site-header nav a:hover { color: var(--ink); }
.site-header nav a:hover::after,
.site-header nav a[aria-current="page"]::after { transform: scaleX(1); }
.site-header nav a[aria-current="page"] { color: var(--ink); }

/* ---------- Hero (deep bark signature) ---------- */

.hero {
  background:
    radial-gradient(52rem 30rem at 78% 8%, rgba(169, 96, 60, 0.17), transparent 62%),
    radial-gradient(44rem 26rem at 12% 100%, rgba(117, 129, 95, 0.22), transparent 60%),
    linear-gradient(180deg, var(--bark), var(--bark-ink));
  color: var(--cream);
  padding: 6.5rem 0 5.5rem;
  overflow: hidden;
}

.hero .kicker { color: var(--clay-light); }

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  letter-spacing: -0.025em;
  margin-bottom: 1.4rem;
  max-width: 14ch;
  color: var(--cream);
}

.hero .lede {
  color: var(--cream-dim);
  font-size: clamp(1.1rem, 2.2vw, 1.28rem);
  max-width: 40rem;
  margin-bottom: 2.4rem;
}

.kicker {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--clay);
  margin: 0 0 1.2rem;
}

.cta-row {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  background: var(--clay);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  border: 1px solid var(--clay);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  background: var(--clay-deep);
}

.btn.ghost {
  background: transparent;
  color: var(--clay);
}

.btn.ghost:hover {
  background: rgba(169, 96, 60, 0.09);
  box-shadow: none;
}

.hero .btn {
  background: var(--cream);
  border-color: var(--cream);
  color: var(--bark-ink);
}

.hero .btn:hover { background: #fff; }

.hero .btn.ghost {
  background: transparent;
  color: var(--cream);
  border-color: rgba(246, 240, 226, 0.45);
}

.hero .btn.ghost:hover { background: rgba(246, 240, 226, 0.1); }

/* ---------- Sections ---------- */

.section { padding: 5rem 0; }

.section + .section { padding-top: 0; }

.section h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.3rem);
  margin-bottom: 0.8rem;
}

.section .sub {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 44rem;
  margin: 0 0 2.6rem;
}

/* ---------- Cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.9rem 1.7rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: #d6c8ac;
}

.card h3 {
  font-size: 1.22rem;
  margin-bottom: 0.55rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.99rem;
}

.card .status {
  display: inline-block;
  margin-top: 1rem;
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--olive);
  background: var(--sage-soft);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
}

/* ---------- Steps ---------- */

.steps {
  list-style: none;
  margin: 0 0 3rem;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

.steps li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.7rem 1.7rem 1.7rem 4.6rem;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.steps li:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.steps .n {
  position: absolute;
  left: 1.5rem;
  top: 1.55rem;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--bark);
  color: var(--cream);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.02rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.steps h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.steps p { margin: 0; color: var(--muted); }

/* ---------- Diagram ---------- */

.diagram {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.5rem 1.2rem;
  margin: 0 0 3rem;
}

.diagram svg { width: 100%; height: auto; display: block; }

.diagram figcaption {
  text-align: center;
  color: var(--faint);
  font-size: 0.92rem;
  padding: 1rem 0 0.6rem;
}

.flow-line {
  stroke-dasharray: 7 7;
  animation: drift 3.2s linear infinite;
}

@keyframes drift { to { stroke-dashoffset: -28; } }

/* ---------- Lists ---------- */

.tight-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 46rem;
}

.tight-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.tight-list li:last-child { border-bottom: 0; }
.tight-list strong { color: var(--ink); font-weight: 600; }

/* ---------- FAQ ---------- */

.faq { max-width: 46rem; }

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 0;
}

.faq details:first-of-type { border-top: 1px solid var(--line); }

.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 1.15rem 0;
  font-weight: 600;
  font-size: 1.05rem;
  transition: color 0.2s ease;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary:hover { color: var(--clay); }

.faq summary::after {
  content: "+";
  flex: none;
  width: 1.7rem;
  height: 1.7rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 400;
  color: var(--clay);
  transition: transform 0.25s ease, background 0.25s ease;
}

.faq details[open] summary::after {
  content: "–";
  background: var(--clay-soft);
}

.faq details p {
  color: var(--muted);
  margin: 0;
  padding: 0 0 1.3rem;
  max-width: 40rem;
}

/* ---------- Contact band ---------- */

.contact {
  background: linear-gradient(180deg, var(--bark), var(--bark-ink));
  color: var(--cream);
  border-radius: calc(var(--radius) + 6px);
  padding: 3.5rem 3rem;
  margin: 5rem 0 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(30rem 16rem at 50% 0%, rgba(169, 96, 60, 0.2), transparent 65%);
  pointer-events: none;
}

.contact h2 { color: var(--cream); font-size: clamp(1.6rem, 3vw, 2.1rem); }
.contact p { color: var(--cream-dim); max-width: 34rem; margin: 0 auto 1.8rem; }
.contact .btn { position: relative; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 5rem;
  padding: 2.5rem 0 3rem;
  color: var(--faint);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.site-footer p { margin: 0.25rem 0; }

.footer-nav a {
  color: var(--faint);
  text-decoration: none;
  margin-left: 1.2rem;
  transition: color 0.2s ease;
}

.footer-nav a:first-child { margin-left: 0; }
.footer-nav a:hover { color: var(--ink); }

/* ---------- Interior page head ---------- */

.page-head { padding: 4.5rem 0 1.5rem; }

.page-head h1 {
  font-size: clamp(2.1rem, 4.8vw, 3.1rem);
  letter-spacing: -0.02em;
  margin-bottom: 1.1rem;
  max-width: 20ch;
}

.page-head .lede {
  font-size: clamp(1.08rem, 2vw, 1.25rem);
  color: var(--muted);
  max-width: 42rem;
  margin-bottom: 0;
}

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in { opacity: 1; transform: none; }

/* ---------- Focus ---------- */

a:focus-visible, summary:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Responsive ---------- */

@media (max-width: 44rem) {
  .site-header nav a { margin-left: 1rem; font-size: 0.92rem; }
  .brand span { font-size: 1.18rem; }
  .hero { padding: 4.5rem 0 4rem; }
  .section { padding: 3.5rem 0; }
  .contact { padding: 2.6rem 1.6rem; margin-top: 3.5rem; }
  .steps li { padding-left: 4rem; }
  .footer-inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .flow-line { animation: none; }
  .card:hover, .steps li:hover, .btn:hover { transform: none; }
}
