/* AMZA Agency — shared stylesheet
   Light, warm palette (ivory + ink + the exact brand gold sampled from the
   logo file) — easier on the eye than the earlier all-black version.
   Everything lives in the variables below, so any future refinement is a
   one-block edit. */

:root {
  --paper: #faf7f0;         /* page background — warm ivory, not stark white */
  --paper-raised: #f2ead9;  /* panels: cta band, contact card, problem cards */
  --header-bg: #fffdf8;     /* header/footer — a touch lighter than the page */
  --gold: #aa8800;          /* exact brand gold, sampled from the emblem — headings, icons, buttons */
  --gold-text: #8a6d1e;     /* darker gold, for links/small text needing full AA contrast on ivory */
  --ink: #201c14;           /* body text — warm near-black */
  --muted: #6b6552;         /* secondary text */
  --line: rgba(170, 136, 0, 0.3); /* hairline rules — gold at low opacity */
  --max-w: 760px;
  --max-w-wide: 1040px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, .serif {
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink);
  margin: 0;
}

h2, h3 {
  font-family: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0;
}

a { color: var(--gold-text); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--gold); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

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

.wrap { max-width: var(--max-w-wide); margin: 0 auto; padding: 0 28px; }
.prose { max-width: var(--max-w); }

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

.site-header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
  flex-wrap: wrap;
}

.wordmark {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.wordmark img { height: 50px; width: auto; display: block; }

.nav-links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.98rem;
}
.nav-links a:hover, .nav-links a[aria-current="page"] {
  color: var(--gold-text);
}
.nav-links a[aria-current="page"] {
  border-bottom: 1.5px solid var(--gold);
  padding-bottom: 2px;
}

/* ---------- Hero ---------- */

.hero {
  background: var(--paper);
  padding: 30px 0 88px;
  text-align: center;
}
.hero .brand-mark {
  height: 96px;
  width: auto;
  margin-bottom: 26px;
}
.hero h1 {
  font-size: clamp(2.3rem, 4.6vw, 3.4rem);
  line-height: 1.16;
  max-width: 18ch;
  margin: 0 auto;
}
.hero p {
  margin: 22px auto 0;
  max-width: 52ch;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.65;
}
.hero .button { margin-top: 30px; }

.page-hero {
  background: var(--paper);
  padding: 54px 0 58px;
  border-bottom: 1px solid var(--line);
}
.page-hero h1 {
  font-size: clamp(2rem, 3.8vw, 2.7rem);
  max-width: 20ch;
}
.page-hero p {
  margin-top: 18px;
  max-width: 56ch;
  color: var(--muted);
  font-size: 1.08rem;
}

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

section.on-paper { padding: 68px 0; background: var(--paper); }
section.on-paper + section.on-paper { padding-top: 0; }

.section-title {
  font-size: 1.7rem;
  margin-bottom: 8px;
}
.section-lede {
  color: var(--muted);
  max-width: 56ch;
  margin-bottom: 42px;
  font-size: 1.05rem;
}

/* ---------- Problem section ---------- */

section.problem { padding: 70px 0 20px; background: var(--paper); }

.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 8px;
}
.problem-card {
  background: var(--paper);
  padding: 34px 30px 38px;
}
.problem-card .icon {
  width: 34px;
  height: 34px;
  color: var(--gold);
  margin-bottom: 20px;
}
.problem-card h3 {
  font-size: 1.32rem;
  margin-bottom: 12px;
}
.problem-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.99rem;
  line-height: 1.6;
}

@media (max-width: 780px) {
  .problem-grid { grid-template-columns: 1fr; }
}

/* Divided list — used for pillars on the homepage and service items on
   subpages. Rules carry the structure rather than cards or shadows. */

.divided-list { border-top: 1px solid var(--line); }
.divided-item {
  display: grid;
  grid-template-columns: minmax(160px, 260px) 1fr;
  gap: 28px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}
.divided-item h3 {
  font-size: 1.4rem;
}
.divided-item .item-body p { margin: 0; color: var(--ink); }
.divided-item .item-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.98rem;
}

@media (max-width: 620px) {
  .divided-item { grid-template-columns: 1fr; gap: 8px; }
}

/* Closing / CTA band */

.cta-band {
  background: var(--paper-raised);
  padding: 58px 0;
  border-top: 1px solid var(--line);
}
.cta-band .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-band h2 { font-size: 1.55rem; max-width: 26ch; }
.cta-band p { color: var(--muted); margin: 8px 0 0; max-width: 42ch; }

.button {
  display: inline-block;
  background: var(--gold);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  padding: 13px 26px;
  border-radius: 2px;
  white-space: nowrap;
}
.button:hover { background: #8a6f04; color: #fff; }

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

.site-footer {
  background: var(--header-bg);
  color: var(--muted);
  padding: 34px 0;
  font-size: 0.95rem;
  border-top: 1px solid var(--line);
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--gold-text); }

/* ---------- Contact page ---------- */

.contact-block {
  padding: 72px 0 96px;
  background: var(--paper);
}
.contact-block .prose { margin: 0 auto; text-align: left; }
.contact-block p.lede {
  font-size: 1.15rem;
  color: var(--ink);
}
.contact-card {
  margin-top: 34px;
  padding: 30px 32px;
  background: var(--paper-raised);
  border-left: 3px solid var(--gold);
}
.contact-card .label {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 6px;
}
.contact-card .email-link {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.65rem;
  font-weight: 400;
  color: var(--gold-text);
}

/* Contact form */

.contact-form {
  margin-top: 40px;
  display: grid;
  gap: 20px;
}
.contact-form .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.field { display: flex; flex-direction: column; gap: 7px; }
.field label {
  font-size: 0.92rem;
  color: var(--muted);
}
.field input, .field textarea {
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--header-bg);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 12px 14px;
}
.field input:focus, .field textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  border-color: var(--gold);
}
.field textarea { resize: vertical; min-height: 130px; }
.contact-form .submit-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.contact-form button.button {
  font-family: inherit;
  font-size: 1rem;
  border: none;
  cursor: pointer;
}
.form-note { color: var(--muted); font-size: 0.9rem; margin: 0; }
.form-status { font-size: 0.95rem; margin: 0; }
.form-status[data-state="ok"] { color: #4b6b2f; }
.form-status[data-state="err"] { color: #a3402a; }

.direct-contact {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}
.direct-contact .field-block .label {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 4px;
}
.direct-contact .field-block a {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.4rem;
  color: var(--gold-text);
}

@media (max-width: 560px) {
  .contact-form .row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: no-preference) {
  .button, a { transition: background-color .15s ease, color .15s ease; }
  .divided-item { transition: background-color .2s ease; }
  .divided-item:hover { background-color: rgba(170, 136, 0, 0.055); }
  .problem-card { transition: background-color .2s ease, transform .2s ease; }
  .problem-card:hover { background-color: var(--paper-raised); transform: translateY(-3px); }
}

/* ---------- Motion ---------- */

/* One orchestrated entrance for the hero, staggered by element. */
.hero .brand-mark, .hero h1, .hero p, .hero .button {
  opacity: 0;
  animation: rise .7s ease forwards;
}
.hero .brand-mark { animation-delay: .05s; }
.hero h1 { animation-delay: .16s; }
.hero p { animation-delay: .3s; }
.hero .button { animation-delay: .44s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Sections reveal once as they enter the viewport (progressive enhancement —
   .reveal starts visible; script.js arms the hidden state only if JS runs,
   so the page is never broken without it). */
.reveal.is-ready {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal.is-ready:nth-child(2) { transition-delay: .08s; }
.reveal.is-ready:nth-child(3) { transition-delay: .16s; }

@media (prefers-reduced-motion: reduce) {
  .hero .brand-mark, .hero h1, .hero p, .hero .button { animation: none; opacity: 1; }
  .reveal.is-ready { opacity: 1; transform: none; transition: none; }
  .problem-card:hover { transform: none; }
}
