/* Content pages (/features, /guides/*, /about, /faq) and the site header
   and footer menus they share with the home page. Loaded after home.css,
   which provides the colours, .wrap, .feature cards, .shots and badges. */

/* Header: logo + menu. Leaves room on the right for the theme switch
   (theme.css, 44px at 12px from the edge). */

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

.site-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  min-height: 68px;
  padding-top: 12px;
  padding-bottom: 12px;
  padding-right: 64px;
}

.site-brand {
  gap: 10px;
  font-size: 19px;
  font-weight: 800;
}

.site-brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  font-size: 15px;
  font-weight: 600;
}

.site-nav a {
  padding: 6px 0;
  color: var(--text);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--primary-text);
}

.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* Page intro */

.page-intro {
  padding: 40px 0 8px;
  background: linear-gradient(180deg, var(--hero-top) 0%, var(--bg) 100%);
}

.page-intro .wrap {
  max-width: 752px;
}

.page-intro h1 {
  margin: 0 0 12px;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.page-intro .lead {
  margin: 0 0 16px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary-text);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Long-form text */

.prose {
  max-width: 752px;
  padding-top: 16px;
  padding-bottom: 16px;
  font-size: 17px;
}

.prose h2 {
  margin: 36px 0 10px;
  font-size: 22px;
  line-height: 1.3;
}

.prose h3 {
  margin: 24px 0 6px;
  font-size: 18px;
}

.prose p,
.prose li {
  color: var(--text);
}

.prose ul,
.prose ol {
  padding-left: 22px;
}

.prose li + li {
  margin-top: 6px;
}

.note {
  margin: 20px 0;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 12px;
  background: var(--surface);
  font-size: 16px;
}

.note p {
  margin: 0;
}

.note p + p {
  margin-top: 8px;
}

/* Tables (points, examples). Scroll sideways on narrow phones instead of
   widening the page. */

.table-scroll {
  margin: 16px 0;
  overflow-x: auto;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.prose th,
.prose td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

.prose th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Tables of long text (privacy policy): cells wrap instead of scrolling. */

.prose .table-text th,
.prose .table-text td {
  padding: 8px;
  vertical-align: top;
  white-space: normal;
}

.formula {
  display: block;
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-alt);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  overflow-x: auto;
}

/* Features page: text beside a screenshot */

.feature-rows {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-top: 24px;
  padding-bottom: 16px;
}

.feature-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.feature-row-text {
  max-width: 560px;
}

.feature-row-text h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.feature-row-text p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 16px;
}

.feature-row-text ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 16px;
}

.feature-row .shot {
  max-width: 240px;
}

/* Card links (guides list, home page strip) */

.card-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card-link {
  display: block;
  height: 100%;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}

.card-link:hover,
.card-link:focus-visible {
  border-color: var(--primary);
}

.card-link h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.card-link p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.card-link .more {
  display: inline-block;
  margin-top: 10px;
  color: var(--primary-text);
  font-size: 15px;
  font-weight: 600;
}

/* FAQ */

.faq {
  max-width: 752px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.faq h2 {
  margin: 32px 0 12px;
  font-size: 20px;
}

.faq details {
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.faq summary {
  padding: 16px 18px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.faq details > div {
  padding: 0 18px 16px;
  color: var(--muted);
  font-size: 16px;
}

.faq details p {
  margin: 0 0 8px;
}

/* Get the app */

.cta {
  margin-top: 32px;
  padding: 28px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--tint);
  text-align: center;
}

.cta h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.cta p {
  margin: 0 auto 16px;
  color: var(--muted);
}

.cta .badges {
  justify-content: center;
}

/* Wider screens */

@media (min-width: 600px) {
  .card-links {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .page-intro {
    padding-top: 56px;
  }

  .page-intro h1 {
    font-size: 40px;
  }

  .card-links.three {
    grid-template-columns: repeat(3, 1fr);
  }

  .feature-row {
    flex-direction: row;
    justify-content: space-between;
    gap: 48px;
  }

  .feature-row:nth-child(even) {
    flex-direction: row-reverse;
  }

  .feature-row .shot {
    flex: 0 0 260px;
    max-width: 260px;
  }
}

/* Home page: menu under the logo, link under the screenshots. */
.section-more {
  margin: 0;
  text-align: center;
  font-weight: 600;
}

.hero-nav {
  justify-content: center;
  margin-top: 16px;
}

@media (min-width: 900px) {
  .hero-nav {
    justify-content: flex-start;
  }
}

/* The closing line under the home page's "How it works" cards. */
.how-note { max-width: 720px; margin: 24px auto 0; text-align: center; }

/* Calculators on the keyword pages */
.calc {
  margin: 24px 0 32px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}
.calc label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
}
.calc input,
.calc select {
  font: inherit;
  font-size: 16px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}
.calc output {
  display: block;
  margin-top: 16px;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-text);
}

/* "Golfmie for your game" link list */
.topic-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  padding: 0;
  list-style: none;
}
.topic-links li + li { margin-top: 0; }
.topic-links a {
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
}
