/* Marketing pages (about, patterns, calculator): normal scrolling documents (the app's styles.css locks the viewport, so it isn't shared). */
:root {
  /* Matches the app's Light theme (css/styles.css) and the Round Q logo. */
  --bg: #F4F4F5;
  --surface: #FFFFFF;
  --surface-alt: #FAFAFA;
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-light: #E3ECFD;
  --border-light: #E4E4E7;
  --text: #18181B;
  --text-secondary: #52525B;
  --blush: #FFE1D9; /* the logo's coral, lightened for step numbers */
  --radius: 10px;
  --max: 1080px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); }

code {
  font-size: 0.9em;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--primary-light);
}

/* ===== Header ===== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px max(16px, calc((100% - var(--max)) / 2));
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-light);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

/* ===== Buttons ===== */

.btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, transform 0.15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-light { background: #fff; color: var(--primary); }
.btn-light:hover { background: var(--primary-light); }
.btn-lg { padding: 13px 24px; font-size: 1.0625rem; }
.btn:hover { transform: translateY(-1px); }

/* ===== Sections ===== */

main > section { padding: 64px max(16px, calc((100% - var(--max)) / 2)); }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 28px; text-align: center; }
h3 { font-size: 1.0625rem; margin: 0 0 6px; }

.hero { text-align: center; padding-top: 56px !important; }
.kicker {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.hero h1 { font-size: clamp(1.875rem, 5vw, 3.125rem); max-width: 860px; margin: 0 auto 18px; }
.lede { max-width: 680px; margin: 0 auto 28px; font-size: 1.125rem; color: var(--text-secondary); }
.hero-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.hero-note { color: var(--text-secondary); font-size: 0.875rem; }

.hero-shot { margin: 48px auto 0; max-width: 1000px; }
.hero-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  box-shadow: 0 24px 60px rgba(44, 56, 48, 0.18);
}

.features { background: var(--surface); }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 16px;
}
.feature-grid article {
  padding: 20px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--surface-alt);
}
.feature-grid p { margin: 0; color: var(--text-secondary); font-size: 0.9375rem; }

.how { text-align: center; }
.steps {
  max-width: 680px;
  margin: 0 auto 32px;
  padding: 0;
  list-style: none;
  counter-reset: step;
  text-align: left;
}
.steps li {
  position: relative;
  padding: 14px 0 14px 52px;
  border-bottom: 1px solid var(--border-light);
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blush);
  color: var(--text);
  font-weight: 700;
}

.faq { background: var(--surface); }
.faq details {
  max-width: 760px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border-light);
}
.faq summary {
  padding: 16px 0;
  font-weight: 600;
  cursor: pointer;
}
.faq details p { margin: 0 0 16px; color: var(--text-secondary); }

.cta-band { text-align: center; background: var(--primary); color: #fff; }
.cta-band h2 { margin-bottom: 20px; }

.site-footer {
  padding: 28px 16px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.875rem;
}
.site-footer p { margin: 4px 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .btn:hover { transition: none; transform: none; }
}

/* ===== Site nav and breadcrumbs ===== */

.site-nav { display: flex; gap: 18px; margin-left: auto; margin-right: 8px; font-size: 0.9375rem; }
.site-nav a { color: var(--text-secondary); text-decoration: none; }
.site-nav a:hover { color: var(--primary); }

.crumbs {
  padding: 16px max(16px, calc((100% - var(--max)) / 2)) 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}
.crumbs a { color: var(--text-secondary); }

/* ===== Pattern and block pages ===== */

.preview { display: block; max-width: 100%; height: auto; border-radius: 6px; }

.item-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
  padding-top: 32px !important;
}
.item-preview .preview { width: 100%; box-shadow: 0 18px 44px rgba(44, 56, 48, 0.16); }
.item-text h1 { font-size: clamp(1.875rem, 4vw, 2.75rem); margin: 0 0 12px; }
.item-text .lede { margin: 0 0 20px; text-align: left; }
.item-text .hero-note { display: block; margin-top: 10px; }

.facts { margin: 0 0 24px; display: grid; gap: 6px; }
.facts div { display: flex; gap: 12px; }
.facts dt { width: 72px; flex-shrink: 0; font-weight: 600; }
.facts dd { margin: 0; color: var(--text-secondary); }

.related h2, .list-hero h1 { text-align: center; }
.list-hero { text-align: center; padding-bottom: 8px !important; }
.list-hero h1 { font-size: clamp(1.875rem, 5vw, 2.75rem); margin: 0 0 12px; }
.list-hero + .related { padding-top: 24px; }

.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}
.item-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}
.item-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.item-card .preview { width: 100%; aspect-ratio: 1; height: auto; } /* non-square blocks letterbox */
.related-more { margin-top: 24px; text-align: center; }

/* ===== Yardage calculator ===== */

.bolt { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.calcs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 16px;
  padding-top: 24px !important;
}
.calc {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--surface);
}
.calc h2 { font-size: 1.125rem; margin: 0 0 4px; text-align: left; }
.calc label, .bolt { color: var(--text-secondary); }
.calc label { display: grid; grid-template-columns: 1fr 84px 1.25em; align-items: center; gap: 8px; }
.calc input, .bolt input {
  width: 84px;
  padding: 6px 8px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font: inherit;
  color: var(--text);
  background: var(--surface-alt);
}
.calc output {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 6px;
  padding: 12px;
  border-radius: 8px;
  background: var(--primary-light);
  color: var(--text-secondary);
  font-size: 0.875rem;
}
.calc .buy { color: var(--text); font-size: 1.25rem; }

.cta-inline { text-align: center; }
.cta-inline p { margin: 0 0 16px; color: var(--text-secondary); }

@media (max-width: 720px) {
  .item-hero { grid-template-columns: 1fr; gap: 24px; }
  .site-nav { display: none; }
}
