/* Forgeplot — "The Drafting Room" marketing site
   Ink on warm paper, one accent, mechanical warmth. */

/* ---------- Tokens ---------- */
:root {
  /* Color */
  --ink: #1c1b22;
  --ink-secondary: rgba(28, 27, 34, 0.68);
  --ink-faint: rgba(28, 27, 34, 0.64);
  --paper: #f7f2e8;
  --paper-edge: rgba(28, 27, 34, 0.08);
  --chrome: #f3efe6;
  --chrome-card: #fdfbf6;
  --accent: #3050c8;
  --accent-soft: rgba(48, 80, 200, 0.1);
  --accent-line: rgba(48, 80, 200, 0.25);

  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --font-body: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* Spacing — 8px scale */
  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 32px;
  --sp-5: 48px;
  --sp-6: 64px;
  --sp-7: 96px;
  --sp-8: 128px;

  /* Misc */
  --radius: 2px;
  --radius-card: 3px;
  --max-width: 1180px;
  --shadow-tight: 0 1px 2px rgba(28, 27, 34, 0.14), 0 2px 6px rgba(28, 27, 34, 0.08);
  --shadow-diffuse: 0 24px 60px rgba(28, 27, 34, 0.16), 0 8px 24px rgba(28, 27, 34, 0.08);
  --border-hairline: 1px solid var(--paper-edge);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--chrome);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
li { list-style: none; }

/* Subtle paper-grain / ruled atmosphere on the chrome background */
body {
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(28, 27, 34, 0.008) 0px,
      rgba(28, 27, 34, 0.008) 1px,
      transparent 1px,
      transparent 48px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(28, 27, 34, 0.005) 0px,
      rgba(28, 27, 34, 0.005) 1px,
      transparent 1px,
      transparent 48px
    );
}

/* ---------- Focus & selection ---------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 1px;
}
::selection { background: var(--accent-soft); color: var(--ink); }

/* ---------- Layout shells ---------- */
.wrap {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--sp-3);
}
main { display: block; }
section { padding-block: var(--sp-7); }
section + section { padding-top: 0; }

/* ---------- Header ---------- */
.site-header {
  border-bottom: var(--border-hairline);
  background: rgba(243, 239, 230, 0.88);
  backdrop-filter: saturate(140%) blur(6px);
  -webkit-backdrop-filter: saturate(140%) blur(6px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding-block: var(--sp-2);
}
.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.brand svg {
  height: 22px;
  width: auto;
  display: block;
}
.brand svg polyline,
.brand svg path {
  stroke: var(--ink) !important;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}
.site-nav ul {
  display: flex;
  gap: var(--sp-3);
}
.site-nav a {
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink-secondary);
  padding: var(--sp-1) 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.site-nav a:hover { color: var(--ink); border-color: var(--accent-line); }

.badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  padding-top: var(--sp-7);
  padding-bottom: var(--sp-6);
  text-align: center;
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-2);
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  max-width: 18ch;
  margin-inline: auto;
  letter-spacing: -0.01em;
}
.hero-sub {
  margin: var(--sp-3) auto 0;
  max-width: 56ch;
  font-size: 1.2rem;
  color: var(--ink-secondary);
}
.hero-sub2 {
  margin: var(--sp-2) auto 0;
  max-width: 56ch;
  font-size: 1.0rem;
  color: var(--ink-faint);
  font-family: var(--font-mono);
}

.hero-figure {
  margin-top: var(--sp-6);
  display: flex;
  justify-content: center;
}

/* ---------- Paper sheet treatment ---------- */
.sheet {
  background: var(--paper);
  border-radius: var(--radius);
  border: 1px solid var(--paper-edge);
  box-shadow: var(--shadow-tight), var(--shadow-diffuse);
  padding: var(--sp-3);
}
.sheet-hero {
  max-width: 900px;
  width: 100%;
  transform: rotate(-0.6deg);
  opacity: 0;
  transform: rotate(-0.6deg) translateY(12px);
  animation: settle 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}
.sheet-hero img { width: 100%; height: auto; }

@keyframes settle {
  from { opacity: 0; transform: rotate(-0.6deg) translateY(12px); }
  to { opacity: 1; transform: rotate(-0.6deg) translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .sheet-hero { animation: none; opacity: 1; transform: rotate(-0.6deg); }
}

/* ---------- Section headings ---------- */
.section-head {
  text-align: center;
  max-width: 60ch;
  margin: 0 auto var(--sp-5);
}
.section-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-1);
  display: block;
}
.section-head h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
}
.section-head p {
  margin-top: var(--sp-2);
  color: var(--ink-secondary);
  font-size: 1.05rem;
}

/* ---------- How it works: drafting-plate cards ---------- */
.plate-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
}
.plate {
  background: var(--chrome-card);
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius-card);
  padding: var(--sp-3);
  box-shadow: var(--shadow-tight);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.plate:hover {
  box-shadow: var(--shadow-tight), 0 18px 34px rgba(28, 27, 34, 0.14);
  transform: translateY(-2px);
}
.plate-number {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.05em;
}
.plate-thumb {
  margin: var(--sp-2) 0;
  background: var(--paper);
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius);
  box-shadow: var(--shadow-tight);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-2);
}
.plate-thumb img { width: 100%; height: 100%; object-fit: contain; }
.plate h3 {
  font-size: 1.15rem;
  margin-bottom: var(--sp-1);
}
.plate p { color: var(--ink-secondary); font-size: 0.96rem; }

/* ---------- Numbered step plates (learn page) ---------- */
.step-plate {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-top: var(--border-hairline);
}
.step-plate:last-child { border-bottom: var(--border-hairline); }
.step-index {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  color: var(--accent);
  line-height: 1;
}
.step-body h3 { font-size: 1.25rem; margin-bottom: var(--sp-1); }
.step-body p { color: var(--ink-secondary); }
.step-body ul { margin-top: var(--sp-2); display: grid; gap: var(--sp-1); }
.step-body li {
  color: var(--ink-secondary);
  padding-left: 1.2em;
  position: relative;
}
.step-body li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}
.step-body strong { color: var(--ink); font-weight: 600; }
.step-body code {
  font-family: var(--font-mono);
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.1em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
}

/* ---------- What you'll need ---------- */
.needs-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-2);
  margin: var(--sp-4) 0 var(--sp-6);
}
.needs-list li {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-secondary);
  border: 1px solid var(--paper-edge);
  background: var(--chrome-card);
  border-radius: var(--radius);
  padding: var(--sp-2);
}
.needs-list strong { color: var(--ink); font-family: var(--font-body); font-size: 1rem; display: block; margin-bottom: 4px; }

/* ---------- Wallpaper section ---------- */
.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--sp-6);
  align-items: center;
}
.split .sheet { transform: rotate(0.5deg); }
.wallpaper-sizes {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
  margin-top: var(--sp-3);
}
.wallpaper-sizes span {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-secondary);
  border: 1px solid var(--paper-edge);
  border-radius: 999px;
  padding: 4px 10px;
}

/* ---------- Tips list ---------- */
.tips-list {
  display: grid;
  gap: var(--sp-2);
  max-width: 760px;
  margin: 0 auto;
}
.tips-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: var(--sp-2);
  padding: var(--sp-2) 0;
  border-top: var(--border-hairline);
}
.tips-list li:last-child { border-bottom: var(--border-hairline); }
.tip-mark { font-family: var(--font-mono); color: var(--accent); }
.tips-list strong { display: block; margin-bottom: 2px; }
.tips-list span.tip-body { color: var(--ink-secondary); }

/* ---------- Pull quote ---------- */
.pull-quote {
  text-align: center;
  padding-block: var(--sp-6);
}
.pull-quote blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  max-width: 22ch;
  margin: 0 auto;
  line-height: 1.3;
  position: relative;
}
.pull-quote .rule {
  width: 48px;
  height: 2px;
  background: var(--accent);
  margin: var(--sp-3) auto 0;
}

/* ---------- Divider art (learn page) ---------- */
.art-divider {
  margin-block: var(--sp-6);
  display: flex;
  justify-content: center;
}
.art-divider img {
  width: 100%;
  max-width: 1000px;
  opacity: 0.85;
}

/* ---------- FAQ ---------- */
.faq-list { max-width: 780px; margin: 0 auto; display: grid; gap: var(--sp-2); }
.faq-item {
  background: var(--chrome-card);
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-tight);
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: var(--sp-3);
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 1.3rem;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body {
  padding: 0 var(--sp-3) var(--sp-3);
  color: var(--ink-secondary);
}
.faq-item .faq-body p + p { margin-top: var(--sp-2); }

/* ---------- CTA links / buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  color: var(--ink);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn-accent {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-accent:hover { background: var(--accent); color: #fff; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: var(--border-hairline);
  padding-block: var(--sp-5);
}
.site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
}
.footer-mark img { width: 40px; height: 40px; opacity: 0.8; }
.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-secondary);
  text-align: right;
  max-width: 46ch;
  line-height: 1.6;
}
.footer-copy strong { color: var(--ink); font-family: var(--font-mono); }

/* ---------- Learn page hero ---------- */
.page-hero {
  padding-top: var(--sp-6);
  padding-bottom: var(--sp-4);
  text-align: center;
}
.page-hero .hero-eyebrow { margin-bottom: var(--sp-2); }
.page-hero h1 { font-size: clamp(2.2rem, 4.4vw, 3.2rem); }
.page-hero p { margin-top: var(--sp-2); max-width: 60ch; margin-inline: auto; color: var(--ink-secondary); font-size: 1.1rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .plate-grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: var(--sp-4); }
  .needs-list { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  section { padding-block: var(--sp-6); }
  .site-nav ul { display: none; }
  .site-header .wrap { flex-wrap: wrap; row-gap: var(--sp-1); }
  .hero { padding-top: var(--sp-5); }
  .hero h1 { font-size: 2.1rem; }
  .footer-copy { text-align: left; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
  .step-plate { grid-template-columns: 1fr; }
  .step-index { font-size: 1.2rem; }
}

/* ---- App Store badges ------------------------------------------------ */
/* Official Apple artwork (Download_on_the_App_Store_Badge_US-UK_RGB_blk).
   Per Apple's badge guidelines the artwork is never altered — no shadows,
   glows or recolouring; only position and size change. Clear space around
   each badge is kept well above the required 1/10 of badge height. */

.store-badge {
  display: inline-block;
  line-height: 0;
  transition: transform 0.18s ease;
}
.store-badge img { display: block; width: 156px; height: auto; }
.store-badge:hover { transform: translateY(-2px); }
.store-badge:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 8px; }

.store-badge-sm img { width: 124px; }

.hero-cta {
  margin-top: var(--sp-5);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.hero-cta-note {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  color: var(--ink-secondary);
  margin: 0;
}

.quote-actions {
  margin-top: var(--sp-4);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
}

@media (prefers-reduced-motion: reduce) {
  .store-badge { transition: none; }
  .store-badge:hover { transform: none; }
}

@media (max-width: 720px) {
  .store-badge-sm { display: none; }
}
