/* Margin Map Co. — static site styles
   Brand colors: teal #084858, off-white #F7F1EA, coral #E07858.
   No build step. Works on Cloudflare Pages and GitHub Pages at the site root.
*/

:root {
  --teal: #084858;
  --teal-deep: #05343f;
  --teal-mid: #0e6574;
  --teal-soft: #d7e8ea;
  --ink: #14333a;
  --muted: #4a646a;
  --line: #d9d0c6;
  --offwhite: #f7f1ea;
  --paper: #fffbf6;
  --cream: #f8f0e8;
  --coral: #e07858;
  --coral-deep: #c45a3a;
  --gold: #e8c46a;
  --white: #ffffff;
  --shadow: 0 14px 40px rgba(8, 72, 88, 0.10);
  --shadow-sm: 0 4px 16px rgba(8, 72, 88, 0.08);
  --radius: 1.15rem;
  --radius-sm: 0.75rem;
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Source Sans 3", "Source Sans Pro", "Segoe UI", system-ui, sans-serif;
  --header-h: 4.35rem;
  --max: 70rem;
  --measure: 43rem;
  --focus: 0 0 0 3px var(--paper), 0 0 0 6px var(--teal);
}

*, *::before, *::after { box-sizing: border-box; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--offwhite);
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
svg { display: block; }
a { color: var(--teal); text-underline-offset: 0.18em; }
a:hover { color: var(--teal-mid); }

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 0.25rem;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--teal);
  color: var(--cream);
  padding: 0.6rem 1rem;
  z-index: 100;
  border-radius: 0 0 0.5rem 0.5rem;
  text-decoration: none;
}
.skip:focus { top: 0; color: var(--cream); }

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}
.wrap-narrow { width: min(100% - 2rem, var(--measure)); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--offwhite) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.header-inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--teal);
  flex-shrink: 0;
}
.logo:hover { color: var(--teal); }
.logo-mark { width: 2.05rem; height: 2.05rem; border-radius: 0.45rem; }
.logo-word {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
  line-height: 1;
}

#nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-toggle {
  display: none;
  cursor: pointer;
  font: 600 0.95rem var(--font-sans);
  color: var(--teal);
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
}
.nav-toggle:hover { border-color: var(--teal); }

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.15rem 1.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 550;
  font-size: 0.98rem;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--teal); }
.site-nav .nav-cta {
  background: var(--teal);
  color: var(--cream) !important;
  padding: 0.48rem 0.95rem;
  border-radius: 999px;
  text-decoration: none;
}
.site-nav .nav-cta:hover { background: var(--teal-mid); }

@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 0.6rem 1rem 1.1rem;
  }
  #nav-toggle:checked ~ .site-nav { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav li { border-top: 1px solid var(--line); }
  .site-nav a { display: block; padding: 0.75rem 0.2rem; }
  .site-nav .nav-cta { text-align: center; margin-top: 0.4rem; }
}

/* Hero */
.hero {
  background: var(--teal);
  color: var(--cream);
  padding: 3.2rem 0 3.6rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 80% 0%, black 20%, transparent 70%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6e5412;
  margin-bottom: 0.85rem;
}
.hero .eyebrow { color: var(--gold); }
.hero h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.05rem, 4.6vw, 3.35rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  color: var(--cream);
}
.hero .lede {
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--teal-soft);
  margin: 0 0 1.6rem;
  max-width: 36rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.hero-art {
  background: var(--cream);
  border-radius: 1.1rem;
  padding: 0.7rem;
  box-shadow: 0 24px 50px rgba(0,0,0,0.22);
}
.hero-art img { border-radius: 0.75rem; width: 100%; }
.hero-caption {
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0.45rem 0 0.15rem;
}

@media (max-width: 860px) {
  .hero { padding: 2.3rem 0 2.5rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 1.6rem; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font-sans);
  font-weight: 650;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.8rem 1.25rem;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn-coral {
  background: var(--coral-deep);
  color: var(--white) !important;
  border-color: var(--coral-deep);
}
.btn-coral:hover { background: #a84c30; border-color: #a84c30; color: var(--white) !important; }
.btn-teal {
  background: var(--teal);
  color: var(--cream) !important;
  border-color: var(--teal);
}
.btn-teal:hover { background: var(--teal-mid); border-color: var(--teal-mid); color: var(--cream) !important; }
.btn-ghost {
  background: transparent;
  color: var(--cream) !important;
  border-color: color-mix(in srgb, var(--cream) 55%, transparent);
}
.btn-ghost:hover { background: color-mix(in srgb, var(--cream) 12%, transparent); color: var(--cream) !important; }
.btn-ghost-ink {
  background: transparent;
  color: var(--teal) !important;
  border-color: var(--teal);
}
.btn-ghost-ink:hover { background: var(--teal-soft); }
.btn-lg { padding: 0.95rem 1.45rem; font-size: 1.05rem; }

/* Sections */
.section { padding: 3.4rem 0; }
.section-sm { padding: 2.4rem 0; }
.section-teal { background: var(--teal); color: var(--cream); }
.section-cream { background: var(--cream); }
.section h2, .page-head h1, .article-body h2 {
  font-family: var(--font-serif);
  font-weight: 550;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--teal);
  margin: 0 0 0.8rem;
}
.section > .wrap > h2, .section-intro h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); }
.section-intro p, .lede-ink {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 40rem;
}

/* Cards / product grid */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
@media (max-width: 800px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (min-width: 801px) and (max-width: 1000px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
}

.card {
  background: var(--paper);
  border: 1px solid color-mix(in srgb, var(--line) 80%, var(--paper));
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card img, .card .card-media img { width: 100%; }
.card-body { padding: 1.3rem 1.35rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.card h3 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 550;
  margin: 0 0 0.5rem;
  color: var(--teal);
}
.card p { margin: 0 0 0.85rem; color: var(--ink); }
.card .price {
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 0.9rem;
}
.card .card-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.badge {
  display: inline-block;
  align-self: flex-start;
  width: fit-content;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--teal-soft);
  color: var(--teal);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  margin-bottom: 0.55rem;
}
.badge-coral { background: #f8e4dc; color: var(--coral-deep); }

/* Feature list */
.checklist { list-style: none; margin: 0 0 1rem; padding: 0; }
.checklist li {
  position: relative;
  padding: 0.28rem 0 0.28rem 1.45rem;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.72rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--coral);
}

/* Page heads */
.page-head { padding: 2.4rem 0 1.5rem; }
.page-head h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 0.6rem;
}
.page-head p { font-size: 1.12rem; color: var(--muted); margin: 0; max-width: 40rem; }

/* Articles index */
.article-card { text-decoration: none; color: inherit; transition: transform 0.15s ease; }
.article-card:hover { transform: translateY(-2px); color: inherit; }
.article-card h3 { font-size: 1.25rem; }
.article-card .meta { color: var(--muted); font-size: 0.9rem; margin: 0; }

/* Article layout */
.article-hero-band { background: var(--teal); padding: 0.5rem 0 0; }
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--measure)) 16rem;
  gap: 3rem;
  align-items: start;
  width: min(100% - 2rem, 70rem);
  margin: 2rem auto 3.5rem;
}
.article-header { margin-bottom: 1.4rem; }
.article-header h1 {
  font-family: var(--font-serif);
  font-weight: 550;
  font-size: clamp(1.9rem, 3.6vw, 2.65rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--teal);
  margin: 0.2rem 0 0.8rem;
}
.article-meta { color: var(--muted); font-size: 0.95rem; margin: 0 0 1rem; }
.article-hero {
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0 0 1.5rem;
  box-shadow: var(--shadow);
}
.article-hero img { width: 100%; }
.pin-row {
  display: grid;
  grid-template-columns: 11.5rem 1fr;
  gap: 1.2rem;
  align-items: center;
  margin: 0 0 1.6rem;
  padding: 0.7rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.pin-row img {
  width: 100%;
  border-radius: 0.6rem;
}
.pin-row p { margin: 0; color: var(--muted); font-size: 0.95rem; }
@media (max-width: 600px) {
  .pin-row { grid-template-columns: 1fr; }
  .pin-row img { max-width: 16rem; margin-inline: auto; }
}

.article-body h2 {
  font-size: 1.55rem;
  margin: 2.1rem 0 0.7rem;
}
.article-body h3 {
  font-family: var(--font-serif);
  font-size: 1.18rem;
  font-weight: 550;
  color: var(--teal);
  margin: 1.4rem 0 0.45rem;
}
.article-body p { margin: 0 0 1rem; }
.article-body ul, .article-body ol { margin: 0 0 1.1rem; padding-left: 1.25rem; }
.article-body li { margin: 0.25rem 0; }
.article-body li + li { margin-top: 0.35rem; }

.callout {
  background: var(--cream);
  border-left: 4px solid var(--teal);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.15rem;
  margin: 0 0 1.4rem;
}
.callout strong { color: var(--teal); }
.callout p:last-child { margin-bottom: 0; }

.note, .disclaimer {
  font-size: 0.95rem;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.05rem;
  margin: 1.4rem 0;
}
.disclaimer { margin-top: 2rem; }

.cta-box {
  background: var(--teal);
  color: var(--cream);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem 1.55rem;
  margin: 2rem 0;
}
.cta-box h2, .cta-box h3 {
  color: var(--cream) !important;
  margin-top: 0 !important;
}
.cta-box p { color: var(--teal-soft); }
.cta-box .btn { margin-top: 0.3rem; }
.cta-box a:not(.btn) { color: var(--gold); }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 0 0 1.3rem;
  background: var(--paper);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
th, td {
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  background: var(--teal);
  color: var(--cream);
  font-weight: 650;
}
tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; margin: 0 0 1.3rem; }
.table-wrap table { margin: 0; }
.table-caption {
  font-size: 0.88rem;
  color: var(--muted);
  margin: -0.6rem 0 1.2rem;
}

.sidebar { position: sticky; top: calc(var(--header-h) + 1rem); }
.sidebar .cta-box { margin: 0 0 1rem; padding: 1.15rem 1.2rem 1.3rem; }
.sidebar .cta-box h3 { font-size: 1.2rem; font-family: var(--font-serif); font-weight: 550; }
.related {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem 1.2rem;
}
.related h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--teal);
  margin: 0 0 0.6rem;
}
.related ul { list-style: none; margin: 0; padding: 0; }
.related li { margin: 0; padding: 0.4rem 0; border-top: 1px solid var(--line); }
.related li:first-of-type { border-top: 0; }
.related a { text-decoration: none; font-weight: 600; }

@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}

/* FAQ */
.faq { margin: 0 0 1.5rem; }
.faq details {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  margin-bottom: 0.55rem;
}
.faq summary {
  cursor: pointer;
  font-weight: 650;
  color: var(--teal);
}
.faq details p { margin: 0.6rem 0 0.2rem; }

/* Footer */
.site-footer {
  background: var(--teal-deep);
  color: var(--teal-soft);
  padding: 2.4rem 0 1.6rem;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 1.6rem;
  margin-bottom: 1.6rem;
}
.site-footer h2 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--cream);
  margin: 0 0 0.55rem;
  font-weight: 550;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0.28rem 0; }
.site-footer a { color: var(--teal-soft); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.footer-note {
  border-top: 1px solid color-mix(in srgb, var(--teal-soft) 25%, transparent);
  padding-top: 1.1rem;
  font-size: 0.88rem;
  color: color-mix(in srgb, var(--teal-soft) 80%, transparent);
}
@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.2rem; }
}

/* 404 */
.error-page { text-align: center; padding: 4rem 0 5rem; }
.error-page h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  color: var(--teal);
  margin: 0 0 0.6rem;
}

/* Utilities */
.muted { color: var(--muted); }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* Print */
@media print {
  .site-header, .site-footer, .sidebar, .nav-toggle, .cta-box .btn, .skip { display: none !important; }
  .article-layout { display: block; width: auto; }
  body { background: white; }
  a { color: inherit; }
}
