/* ============================================================
   Ampie Labs — shared stylesheet
   Aesthetic: engineering notebook / editorial. Cream paper,
   ink text, ampere-amber accent, serif display + mono labels.
   ============================================================ */

:root {
  --paper: #f7f2e9;
  --paper-deep: #efe7d8;
  --ink: #22201b;
  --ink-soft: #55524a;
  --ink-faint: #8a857a;
  --amber: #d97706;
  --amber-deep: #b45309;
  --amber-wash: #fbeed7;
  --rule: #d9d2c3;
  --card: #fffdf8;
  --max: 1080px;
  --serif: "Fraunces", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Code", monospace;
  --body: "Newsreader", Georgia, serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  font-size: 1.075rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  /* subtle paper grain */
  background-image:
    radial-gradient(circle at 15% 20%, rgba(217, 119, 6, 0.045), transparent 42%),
    radial-gradient(circle at 85% 75%, rgba(180, 83, 9, 0.035), transparent 45%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.025 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  background-attachment: fixed;
}

::selection { background: var(--amber); color: #fff; }

/* ---------- layout ---------- */

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

.narrow { max-width: 760px; }

/* ---------- header ---------- */

header.site {
  border-bottom: 1px solid var(--rule);
  background: rgba(247, 242, 233, 0.92);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 20;
}

header.site .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 1.05rem;
  padding-bottom: 1.05rem;
}

.brand {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-decoration: none;
}

.brand .tld { color: var(--amber); }

nav.top { display: flex; gap: 1.6rem; }

nav.top a {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
  transition: color 0.15s, border-color 0.15s;
}

nav.top a:hover, nav.top a[aria-current="page"] {
  color: var(--ink);
  border-color: var(--amber);
}

/* ---------- type ---------- */

h1, h2, h3 { font-family: var(--serif); line-height: 1.12; letter-spacing: -0.02em; }

.kicker {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber-deep);
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.kicker::before {
  content: "";
  width: 2.2rem;
  height: 1px;
  background: var(--amber);
  display: inline-block;
}

a { color: var(--amber-deep); }
a:hover { color: var(--ink); }

/* ---------- hero ---------- */

.hero { padding: 5.5rem 0 4.5rem; position: relative; overflow: hidden; }

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  font-weight: 600;
  max-width: 15ch;
  margin: 1.1rem 0 1.4rem;
}

.hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--amber-deep);
}

.hero p.lede {
  font-size: 1.28rem;
  color: var(--ink-soft);
  max-width: 52ch;
}

/* big ambient ampersand-ish glyph */
.hero .glyph {
  position: absolute;
  right: -1rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--serif);
  font-size: clamp(14rem, 30vw, 26rem);
  font-weight: 700;
  font-style: italic;
  color: transparent;
  -webkit-text-stroke: 1px var(--rule);
  user-select: none;
  pointer-events: none;
  line-height: 1;
}

/* staggered load-in */
.rise { opacity: 0; transform: translateY(14px); animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
.rise.d1 { animation-delay: 0.05s; }
.rise.d2 { animation-delay: 0.16s; }
.rise.d3 { animation-delay: 0.27s; }
.rise.d4 { animation-delay: 0.38s; }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rise { animation: none; opacity: 1; transform: none; } }

/* ---------- sections ---------- */

section.band { padding: 3.6rem 0; border-top: 1px solid var(--rule); }

section.band h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); margin: 0.9rem 0 1.2rem; font-weight: 600; }

/* ---------- work grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin-top: 1.8rem;
}

.cell {
  background: var(--card);
  padding: 1.6rem 1.5rem 1.7rem;
  position: relative;
  transition: background 0.2s;
}

.cell:hover { background: var(--amber-wash); }

.cell .num {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
  letter-spacing: 0.1em;
}

.cell h3 { font-size: 1.22rem; margin: 0.55rem 0 0.5rem; font-weight: 600; }

.cell p { font-size: 0.98rem; color: var(--ink-soft); line-height: 1.55; }

/* ---------- whatsapp callout on landing ---------- */

.callout {
  margin-top: 0;
  border: 1px solid var(--ink);
  background: var(--card);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  padding: 1.7rem 1.8rem;
  box-shadow: 5px 5px 0 var(--amber);
}

.callout .txt h3 { font-size: 1.35rem; font-weight: 600; margin-bottom: 0.35rem; }
.callout .txt p { color: var(--ink-soft); max-width: 52ch; }

.btn {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
  padding: 0.85rem 1.4rem;
  border: 1px solid var(--ink);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.btn:hover { background: var(--amber); border-color: var(--amber); color: #fff; }

.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }

/* ---------- generic content pages (legal) ---------- */

main.doc { padding: 4rem 0 5rem; }

main.doc h1 { font-size: clamp(2.1rem, 4.5vw, 3rem); font-weight: 600; margin: 1rem 0 0.6rem; }

.docmeta {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
  margin-bottom: 2.4rem;
}

main.doc h2 {
  font-size: 1.45rem;
  font-weight: 600;
  margin: 2.4rem 0 0.7rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--rule);
}

main.doc h3 { font-size: 1.12rem; font-weight: 600; margin: 1.5rem 0 0.4rem; }

main.doc p, main.doc li { color: var(--ink-soft); margin-bottom: 0.8rem; }

main.doc ul, main.doc ol { padding-left: 1.4rem; margin-bottom: 1rem; }

main.doc strong { color: var(--ink); }

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

details.qa {
  border: 1px solid var(--rule);
  background: var(--card);
  margin-bottom: 0.7rem;
}

details.qa summary {
  cursor: pointer;
  list-style: none;
  padding: 1.05rem 1.3rem;
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

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

details.qa summary::after {
  content: "+";
  font-family: var(--mono);
  color: var(--amber-deep);
  font-size: 1.2rem;
  flex-shrink: 0;
  transition: transform 0.2s;
}

details.qa[open] summary::after { transform: rotate(45deg); }

details.qa .a { padding: 0 1.3rem 1.2rem; color: var(--ink-soft); }
details.qa .a p { margin-bottom: 0.7rem; }
details.qa .a ul { padding-left: 1.3rem; margin-bottom: 0.7rem; }
details.qa .a li { margin-bottom: 0.35rem; }

/* ---------- steps ---------- */

.steps { counter-reset: step; margin-top: 1.6rem; display: grid; gap: 0.9rem; }

.step {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1.1rem;
  border: 1px solid var(--rule);
  background: var(--card);
  padding: 1.2rem 1.3rem;
}

.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 1.3rem;
  color: var(--amber);
  font-weight: 500;
  line-height: 1.3;
}

.step h3 { font-size: 1.12rem; font-weight: 600; margin-bottom: 0.25rem; }
.step p { font-size: 0.98rem; color: var(--ink-soft); }

/* ---------- notice box ---------- */

.notice {
  border-left: 3px solid var(--amber);
  background: var(--amber-wash);
  padding: 1.1rem 1.4rem;
  margin: 1.6rem 0;
  font-size: 0.98rem;
  color: var(--ink-soft);
}

/* ---------- footer ---------- */

footer.site {
  border-top: 1px solid var(--ink);
  margin-top: 4rem;
  padding: 2.6rem 0 3rem;
  background: var(--paper-deep);
}

footer.site .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  justify-content: space-between;
}

footer.site .col { max-width: 34ch; }

footer.site .fbrand { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; }

footer.site p, footer.site a { font-size: 0.9rem; color: var(--ink-soft); }

footer.site .legal-links { display: flex; flex-direction: column; gap: 0.4rem; }

footer.site .legal-links a {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-decoration: none;
}

footer.site .legal-links a:hover { color: var(--ink); text-decoration: underline; }

footer.site .fine {
  width: 100%;
  margin-top: 1.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
  font-size: 0.8rem;
  color: var(--ink-faint);
}

/* ---------- responsive ---------- */

@media (max-width: 640px) {
  .hero { padding: 3.5rem 0 3rem; }
  .hero .glyph { display: none; }
  nav.top { gap: 1rem; }
  .callout { box-shadow: 3px 3px 0 var(--amber); }
}
