/* =========================================================================
   Goad plan — goadplan.app
   Single shared stylesheet. No JavaScript, no external resources.
   System font stacks only. Dark-first with light via prefers-color-scheme.
   ========================================================================= */

/* ---- Tokens: dark theme (default) ------------------------------------- */
:root {
  --bg: #0b0e12;
  --surface: #151a21;
  --surface-2: #1b212a;
  --surface-border: rgba(255, 255, 255, 0.08);
  --text: #e6e8eb;
  --text-secondary: #9aa0a8;
  --accent: #00e6cc; /* fills, motif, links on dark */
  --accent-text: #00e6cc; /* inline link colour on dark (same teal) */
  --accent-contrast: #052b27; /* text on an accent-filled button (dark) */
  --accent-tint: #11302d; /* SOLID chip/column tint (not a transparent
                                    color-mix — keeps contrast determinable for
                                    a11y tooling). accent-text passes AA on it. */
  --accent-tint-border: #1c544e; /* solid border for tinted chips */

  /* Escalation ladder (cool -> hot), dark variants */
  --step1: #8c8ca6;
  --step2: #b3994d;
  --step3: #e69933;
  --step4: #f25933;
  --step5: #ff2640;

  /* Status, dark */
  --success: #33d966;
  --warning: #f2bf26;
  --danger: #f24d4d;

  /* Glass */
  --glass-bg: rgba(21, 26, 33, 0.62);
  --glass-highlight: rgba(255, 255, 255, 0.05);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.35);

  /* Layout */
  --maxw: 70rem;
  --measure: 65ch;
  --radius: 16px;
  --radius-sm: 10px;
  --space: clamp(1rem, 0.6rem + 2vw, 1.5rem);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono:
    ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: dark light;
}

/* ---- Tokens: light theme --------------------------------------------- */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --surface: #f4f6f8;
    --surface-2: #edf0f3;
    --surface-border: rgba(0, 0, 0, 0.1);
    --text: #1a1d21;
    --text-secondary: #5b6168;
    --accent: #00786e; /* fills/buttons — darkened so white labels clear AA 4.5:1 (5.37:1) */
    --accent-text: #006b61; /* inline TEXT/LINK colour on white */
    --accent-contrast: #ffffff; /* white text on accent-filled button */
    --accent-tint: #e4f4f1; /* solid light chip/column tint (accent-text on it = 5.6:1) */
    --accent-tint-border: #bfe2db; /* solid border for tinted chips */

    --step1: #595973;
    --step2: #8c6b33;
    --step3: #b3661a;
    --step4: #cc401a;
    --step5: #d91a26;

    --success: #1a8c40;
    --warning: #b38000;
    --danger: #bf2626;

    --glass-bg: rgba(244, 246, 248, 0.72);
    --glass-highlight: rgba(255, 255, 255, 0.6);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 12px 30px rgba(15, 23, 42, 0.1);
  }
}

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

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

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Ambient glow backdrop — purely decorative, sits behind content. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(
      60rem 40rem at 85% -10%,
      color-mix(in srgb, var(--accent) 14%, transparent),
      transparent 60%
    ),
    radial-gradient(
      50rem 40rem at -10% 10%,
      color-mix(in srgb, var(--step4) 9%, transparent),
      transparent 55%
    );
}

img,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: from-font;
}

a:hover {
  text-decoration-thickness: 2px;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2.25rem, 1.4rem + 3.8vw, 3.75rem);
}
h2 {
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem);
}
h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1rem;
}

ul,
ol {
  margin: 0 0 1rem;
  padding-left: 1.4em;
}
li {
  margin: 0.25rem 0;
}

code,
pre,
kbd,
samp {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

code {
  background: var(--surface-2);
  padding: 0.1em 0.4em;
  border-radius: 6px;
  border: 1px solid var(--surface-border);
}

pre {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  overflow-x: auto;
}

pre code {
  background: none;
  border: 0;
  padding: 0;
}

hr {
  border: 0;
  border-top: 1px solid var(--surface-border);
  margin: 2.5rem 0;
}

/* ---- Accessibility: skip link + focus --------------------------------- */
.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 700;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top 0.15s var(--ease);
}

.skip-link:focus {
  top: 0.75rem;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Layout helpers --------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--space);
}

.section {
  padding-block: clamp(3rem, 2rem + 5vw, 6rem);
}

.section-head {
  max-width: 48rem;
  margin-bottom: 2.5rem;
}

.section-head p {
  color: var(--text-secondary);
  font-size: 1.125rem;
  margin-bottom: 0;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 0.75rem;
}

/* ---- Header / nav ----------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--glass-bg);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--surface-border);
}

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  padding-block: 0.85rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand .mark {
  width: 1.6rem;
  height: 1.6rem;
  flex: none;
  color: var(--accent);
}

.site-nav {
  margin-left: auto;
}

.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: inline-block;
  padding: 0.6rem 0.85rem;
  border-radius: 999px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--text);
  background: var(--surface);
}

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.2;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 0.18s var(--ease),
    box-shadow 0.18s var(--ease),
    background-color 0.18s var(--ease);
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 30%, transparent);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 40%, transparent);
}

/* Non-interactive "Coming soon" state — not a link yet, so no pointer/lift. */
.btn-disabled,
.btn-disabled:hover {
  cursor: default;
  transform: none;
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--surface-border);
}

.btn-ghost:hover {
  transform: translateY(-2px);
  background: var(--surface-2);
}

.btn .icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
}

.btn-note {
  display: block;
  margin-top: 0.85rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ---- Hero ------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(3rem, 2rem + 7vw, 7rem);
}

.hero-grid {
  display: grid;
  gap: clamp(2rem, 1rem + 5vw, 4rem);
  align-items: center;
}

@media (min-width: 48rem) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.hero h1 {
  margin-bottom: 0.4em;
}

.hero .lede {
  font-size: clamp(1.1rem, 1rem + 0.6vw, 1.375rem);
  color: var(--text-secondary);
  max-width: 38ch;
  margin-bottom: 2rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

/* ---- Phone screenshot frame ------------------------------------------ */
.phone {
  margin-inline: auto;
  width: 100%;
  max-width: 270px;
  padding: 0.5rem;
  background: var(--surface-2);
  border: 1px solid var(--surface-border);
  border-radius: 36px;
  box-shadow: var(--shadow);
}

.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 28px;
}

/* ---- "See it in action" showcase ------------------------------------- */
.section-alt {
  background: var(--surface);
  border-block: 1px solid var(--surface-border);
}

.showcase {
  display: grid;
  gap: clamp(2rem, 1rem + 4vw, 3.5rem);
  grid-template-columns: 1fr;
}

@media (min-width: 48rem) {
  .showcase {
    grid-template-columns: 1fr 1fr;
  }
}

.shot {
  margin: 0;
  text-align: center;
}

.shot figcaption {
  margin-top: 1.25rem;
  margin-inline: auto;
  max-width: 36ch;
  color: var(--text-secondary);
}

/* ---- Cards (how-it-works + features) --------------------------------- */
.card-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 48rem) {
  .card-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 75rem) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition:
    transform 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

/* No decorative ::before gradient overlay on cards: a semi-transparent layer
   between the text and the solid surface makes the effective background
   indeterminable for contrast tooling (axe). The solid --surface + border +
   shadow carry the card visually. */
.card > * {
  position: relative;
}

.card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--surface-border));
}

.card h3 {
  margin-bottom: 0.35rem;
}

.card p {
  color: var(--text-secondary);
  margin-bottom: 0;
}

.card-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  font-weight: 800;
  background: var(--accent-tint);
  color: var(--accent-text);
  border: 1px solid var(--accent-tint-border);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: var(--accent-tint);
  border: 1px solid var(--accent-tint-border);
  color: var(--accent-text);
}

.feature-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.tag-pro {
  display: inline-block;
  margin-left: 0.5rem;
  vertical-align: middle;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15em 0.55em;
  border-radius: 999px;
  color: var(--accent-text);
  background: var(--accent-tint);
  border: 1px solid var(--accent-tint-border);
}

/* ---- Pricing note ----------------------------------------------------- */
.pricing {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: clamp(2rem, 1.5rem + 3vw, 3.5rem);
  box-shadow: var(--shadow);
}

.pricing .price-line {
  font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.pricing p {
  color: var(--text-secondary);
  max-width: 48ch;
  margin-inline: auto;
  margin-bottom: 0;
}

.pricing .accent {
  color: var(--accent-text);
}

/* ---- FAQ / details-summary accordion --------------------------------- */
.faq {
  display: grid;
  gap: 0.75rem;
  max-width: 48rem;
}

details {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

details + details {
  margin-top: 0;
}

summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "";
  flex: none;
  width: 0.7rem;
  height: 0.7rem;
  border-right: 2px solid var(--text-secondary);
  border-bottom: 2px solid var(--text-secondary);
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease);
}

details[open] summary::after {
  transform: rotate(-135deg);
}

summary:hover {
  background: var(--surface-2);
}

details > .details-body {
  padding: 0 1.25rem 1.15rem;
  color: var(--text-secondary);
}

details > .details-body :last-child {
  margin-bottom: 0;
}

/* ---- Support contact block ------------------------------------------- */
.contact-card {
  margin-top: 2rem;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 1rem + 2vw, 2.25rem);
  box-shadow: var(--shadow);
  max-width: 48rem;
}

.contact-card h3 {
  margin-bottom: 0.35rem;
}

.contact-card p {
  color: var(--text-secondary);
}

.contact-card .email {
  font-weight: 700;
  font-size: 1.05rem;
}

/* ---- Footer ----------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--surface-border);
  background: var(--surface);
  padding-block: 2.5rem;
  margin-top: 2rem;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--text);
  text-decoration: underline;
}

.footer-meta {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

.footer-meta .made {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* ---- Legal / long-form pages (privacy, accessibility, 404) ----------- */
.legal-main {
  padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem);
}

.legal {
  max-width: var(--measure);
  margin-inline: auto;
}

.legal .page-meta {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.legal .page-meta strong {
  color: var(--text);
}

.legal h2 {
  margin-top: 2.5rem;
  padding-top: 0.5rem;
}

.legal h3 {
  margin-top: 1.75rem;
  font-size: 1.1rem;
}

.legal h2:first-of-type {
  margin-top: 1.5rem;
}

.legal ul,
.legal ol {
  padding-left: 1.3em;
}

.legal li {
  margin: 0.4rem 0;
}

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

/* Plain-language callout box */
.callout {
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--surface-border));
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0 2.5rem;
}

.callout p:last-child {
  margin-bottom: 0;
}

.callout .callout-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 0.5rem;
}

/* Tables on legal pages */
.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.97rem;
}

caption {
  text-align: left;
  font-weight: 700;
  padding: 0.85rem 1rem 0.25rem;
  color: var(--text);
}

th,
td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--surface-border);
  vertical-align: top;
}

thead th {
  background: var(--surface-2);
  font-weight: 700;
  border-bottom: 2px solid var(--surface-border);
}

tbody tr:last-child td {
  border-bottom: 0;
}

/* Free vs Pro comparison table */
.compare th[scope="row"] {
  font-weight: 600;
  color: var(--text);
}

.compare td {
  text-align: center;
}

.compare .col-pro {
  background: var(--accent-tint);
}

.compare thead .col-pro {
  background: var(--accent-tint);
  color: var(--accent-text);
}

.compare .yes {
  color: var(--accent-text);
  font-weight: 700;
}

.compare .no {
  color: var(--text-secondary);
}

.legal a {
  font-weight: 600;
}

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--accent-text);
}

.back-link:hover {
  text-decoration: underline;
}

.back-link .icon {
  width: 1em;
  height: 1em;
}

/* ---- 404 -------------------------------------------------------------- */
.notfound {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-block: clamp(3rem, 2rem + 6vw, 6rem);
}

.notfound .code {
  font-size: clamp(4rem, 2rem + 14vw, 8rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(120deg, var(--step1), var(--step3), var(--step5));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.5rem;
}

.notfound p {
  color: var(--text-secondary);
  max-width: 40ch;
  margin-bottom: 2rem;
}

/* ---- Motion preferences ---------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .btn:hover,
  .card:hover,
  .btn-ghost:hover {
    transform: none;
  }
}

/* ---- Print ------------------------------------------------------------ */
@media print {
  body {
    background: #ffffff;
    color: #000000;
  }
  body::before {
    display: none;
  }
  .site-header,
  .site-footer,
  .skip-link,
  .hero-cta {
    display: none;
  }
  a {
    color: #000000;
    text-decoration: underline;
  }
  .card,
  .callout,
  .pricing {
    box-shadow: none;
  }
}
