/* Read Her Right. "Ink & Brass" website
   Source of truth: Branding/STYLE-GUIDE.md (mirrors lib/theme.dart). */

/* ---- Self-hosted brand fonts (variable TTFs, no external deps) ---- */
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/Fraunces.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

/* ---- Palette ---- */
:root {
  --ink: #16233F;
  --ink-hi: #2A3B66;
  --ink-deep: #101A30;
  --ink-surface: #1E2B49;
  --brass: #CFA65F;
  --brass-deep: #9A7A40;
  --gold: #EFC255;
  --paper: #F4EFE4;
  --cream: #E7EBF6;
  --cream-dim: #A9B4CE;
  --divider: rgba(207, 166, 95, 0.18);

  --maxw: 1080px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---- Reset / base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink-deep);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--brass); text-decoration: none; }
a:hover { color: var(--gold); text-decoration: underline; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.1;
  text-wrap: balance;
  margin: 0 0 0.5em;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Header / nav ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(16, 26, 48, 0.82);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--divider);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--cream);
}
.brand:hover { text-decoration: none; }
.brand svg, .brand img { width: 30px; height: 30px; }
.brand .wordmark {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--cream);
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--cream-dim); font-size: 15px; }
.nav-links a:hover { color: var(--brass); text-decoration: none; }

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  padding: 13px 26px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: var(--brass);
  color: var(--ink);
  border: 1.4px solid var(--brass);
}
.btn-primary:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn-outline {
  background: transparent;
  color: var(--brass);
  border: 1.4px solid var(--brass);
}
.btn-outline:hover { color: var(--gold); border-color: var(--gold); }

/* ---- Hero ---- */
.hero {
  padding: 92px 0 84px;
  background:
    radial-gradient(1100px 520px at 50% -8%, rgba(42, 59, 102, 0.55), transparent 60%),
    var(--ink-deep);
  text-align: center;
}
.eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
  border: 1px solid var(--divider);
  border-radius: 999px;
  padding: 6px 16px;
  margin-bottom: 28px;
}
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.1rem);
  max-width: 15ch;
  margin-left: auto;
  margin-right: auto;
}
.hero .lede {
  max-width: 60ch;
  margin: 20px auto 0;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: var(--cream-dim);
}
.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 38px;
}
.hero-note {
  margin-top: 22px;
  font-size: 14px;
  color: var(--cream-dim);
}

/* ---- Sections ---- */
section { padding: 72px 0; }
.section-head { text-align: center; max-width: 42ch; margin: 0 auto 48px; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.section-head p { color: var(--cream-dim); margin: 0; }

/* ---- Feature cards ---- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  background: var(--ink-surface);
  border: 1px solid var(--divider);
  border-radius: 14px;
  padding: 30px 26px;
}
.card .num {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--brass);
  letter-spacing: 0.08em;
}
.card h3 { font-size: 1.35rem; margin-top: 10px; }
.card p { color: var(--cream-dim); margin: 0; font-size: 15.5px; }

/* ---- Wedge / quote band ---- */
.band {
  background:
    radial-gradient(700px 300px at 20% 0%, rgba(207, 166, 95, 0.10), transparent 70%),
    var(--ink);
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
}
.band .container { text-align: center; }
.band blockquote {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.6vw, 2.2rem);
  line-height: 1.3;
  max-width: 22ch;
  margin: 0 auto;
  color: var(--cream);
}
.band .attribution { color: var(--cream-dim); margin-top: 18px; font-size: 15px; }

/* ---- Signup / contact ---- */
.signup { text-align: center; }
.signup .card {
  max-width: 620px;
  margin: 0 auto;
  padding: 44px 34px;
}
.signup h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.signup p { color: var(--cream-dim); margin: 0 0 26px; }

/* ---- Forms ---- */
.hp {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}
input, textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--cream);
  background: var(--ink-deep);
  border: 1.4px solid var(--divider);
  border-radius: 10px;
  padding: 13px 15px;
  transition: border-color 0.12s ease;
}
input::placeholder, textarea::placeholder { color: var(--cream-dim); opacity: 0.7; }
input:focus, textarea:focus { outline: none; border-color: var(--brass); }
textarea { min-height: 140px; resize: vertical; line-height: 1.55; }

/* Inline email capture (hero + signup card) */
.signup-inline {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 38px;
}
.signup-inline input[type="email"] { width: 280px; max-width: 100%; }
.signup-inline .btn { flex: 0 0 auto; }

/* Full contact form */
.form { max-width: 560px; margin: 0 auto; text-align: left; }
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--cream-dim);
  margin-bottom: 7px;
}
.form .btn { width: 100%; margin-top: 6px; }
.form-privacy {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--cream-dim);
  text-align: center;
}

/* Message (thank-you / error) pages */
.message-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 0;
}
.message-page .icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 22px;
}
.message-page h1 { font-size: clamp(2rem, 5vw, 3rem); }
.message-page p { color: var(--cream-dim); max-width: 46ch; margin: 0 auto 30px; }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--divider);
  padding: 44px 0 56px;
  background: var(--ink-deep);
}
.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-grid .brand .wordmark { font-size: 18px; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { color: var(--cream-dim); font-size: 14.5px; }
.footer-links a:hover { color: var(--brass); text-decoration: none; }
.footer-legal {
  margin-top: 24px;
  color: var(--cream-dim);
  font-size: 13px;
  opacity: 0.8;
}

/* ---- Legal (privacy / terms) pages ---- */
.legal { padding: 60px 0 80px; }
.legal .container { max-width: 760px; }
.legal h1 { font-size: clamp(2rem, 5vw, 3rem); }
.legal .updated { color: var(--cream-dim); font-size: 14px; margin-bottom: 40px; }
.legal h2 { font-size: 1.4rem; margin-top: 40px; }
.legal p, .legal li { color: var(--cream); }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 8px; }

/* ---- Responsive ---- */
@media (max-width: 820px) {
  .cards { grid-template-columns: 1fr; }
  .nav-links { gap: 18px; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .hero { padding: 66px 0 60px; }
  section { padding: 56px 0; }
  .footer-grid { flex-direction: column; align-items: flex-start; }
}
