/* ==========================================================================
   Trywydd marketing site — shared stylesheet
   Plain CSS, no build step, no framework.
   ========================================================================== */

/* This file is marketing-only layout (hero, nav, numbered steps, FAQ
   accordion, phone-frame chrome) — none of it exists in the real app, which
   has no homepage or FAQ. app.css (loaded before this file, copied verbatim
   from src/styles/app.css — see app-src/) is the single source of truth for
   every color. The --color- and --area- names below are kept only as
   convenience aliases for this file's own selectors; every one of them
   points straight at a real custom property from app.css, so the computed
   colors are identical to the live app, not a re-guess of them. */
:root {
  --color-bg: var(--bg);
  --color-card: var(--panel);
  --color-card-border: var(--line);
  --color-accent: var(--jade);
  --color-highlight: var(--gold);
  --color-text: var(--ink);
  --color-text-muted: var(--muted);

  /* Owen's three example life-area colors, taken directly from the real
     app's own COLORS palette (src/lib/colors.js — see app-src/lib/colors.js):
     ['#4f9cf0','#e07b3f','#c06bdb','#3ecf8e','#d9b25a','#e05252','#52b0e0','#7ecf52','#cf52a8','#52cfc0'] */
  --area-blue: #4f9cf0;
  --area-purple: #c06bdb;
  --area-green: #7ecf52;
  --area-red: #e05252;
  --area-teal: #52cfc0;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1120px;
  --radius: 10px;
  --radius-lg: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  color: var(--color-highlight);
  text-decoration: underline;
}

/* Visible keyboard focus states everywhere */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-highlight);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.6em;
  color: var(--color-text);
}

h1 { font-size: clamp(2.1rem, 4vw + 1rem, 3.4rem); }
h2 { font-size: clamp(1.6rem, 2vw + 1rem, 2.3rem); }
h3 { font-size: 1.25rem; }

p {
  margin: 0 0 1em;
  color: var(--color-text);
}

.text-muted {
  color: var(--color-text-muted);
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

.skip-link {
  position: absolute;
  top: -3rem;
  left: 1rem;
  background: var(--color-accent);
  color: var(--color-bg);
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  font-weight: 700;
  z-index: 100;
  transition: top 0.15s ease;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--color-card-border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--color-text);
  letter-spacing: 0.01em;
}

.logo:hover {
  color: var(--color-text);
  text-decoration: none;
}

.logo-mark {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius);
  color: var(--color-text);
  padding: 0.5rem 0.7rem;
  font-size: 1rem;
  cursor: pointer;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-menu a:hover {
  color: var(--color-accent);
  text-decoration: none;
}

.nav-menu a[aria-current="page"] {
  color: var(--color-accent);
}

.nav-cta {
  background: var(--color-accent);
  color: var(--color-bg) !important;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-weight: 700 !important;
}

.nav-cta:hover {
  background: var(--color-highlight);
  color: var(--color-bg) !important;
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--color-card);
    border-bottom: 1px solid var(--color-card-border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .nav-menu.is-open {
    max-height: 24rem;
  }

  .nav-menu li {
    border-top: 1px solid var(--color-card-border);
  }

  .nav-menu a {
    display: block;
    padding: 1rem 1.5rem;
  }

  .nav-cta {
    border-radius: 0;
    text-align: center;
  }
}

/* ==========================================================================
   Buttons — reuses the real app's own .btn / .btn.primary / .btn.ghost
   (defined in app.css, loaded before this file) rather than inventing new
   button colors. .btn-lg is a marketing-only *size* modifier — it changes
   padding/font-size for a hero-scale CTA, never color.
   ========================================================================== */

.btn {
  text-decoration: none;
  display: inline-block;
}

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

.btn-lg {
  padding: 0.9rem 1.8rem;
  font-size: 1rem;
  border-radius: 999px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.75rem;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.hero-inner {
  max-width: 720px;
}

/* The opening "name moment" — Trywydd itself, large enough to read as a
   real beat before the pitch starts, not a caption. #E6A63C ("trail gold")
   is an intentional one-off here, specified directly for this single word;
   everywhere else on the site uses the real app's own custom properties. */
.hero-name-block {
  margin-bottom: 3rem;
}

.hero-name {
  font-size: clamp(2.1rem, 4vw + 1rem, 3.4rem);
  font-weight: 700;
  line-height: 1.2;
  color: #E6A63C;
  margin: 0 0 0.75rem;
}

.hero-name-sub {
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--taupe);
  max-width: 46ch;
  margin: 0;
}

.eyebrow {
  display: inline-block;
  color: var(--color-highlight);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

/* Brand tagline kicker, sitting between .eyebrow and the H1. Deliberately
   sentence case, lighter, and looser than .eyebrow so it reads as a line of
   voice rather than a second label, and never competes with the H1. */
.hero-tagline {
  color: var(--color-highlight);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0 0 0.75rem;
}

.hero p.lede {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  max-width: 60ch;
}

.hero-thread {
  margin-top: 4rem;
}

.hero-thread svg {
  width: 100%;
  height: auto;
}

.thread-line {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 6 10;
  animation: thread-flow 26s linear infinite;
}

.thread-node {
  fill: var(--color-card);
  stroke: var(--color-accent);
  stroke-width: 2;
}

.thread-node.is-today {
  fill: var(--color-accent);
}

.thread-label {
  fill: var(--color-text-muted);
  font-size: 13px;
  font-family: var(--font-sans);
}

@keyframes thread-flow {
  to {
    stroke-dashoffset: -640;
  }
}

@media (prefers-reduced-motion: reduce) {
  .thread-line {
    animation: none;
  }
}

/* ==========================================================================
   Sections / layout helpers
   ========================================================================== */

.section {
  padding: 4rem 0;
  border-top: 1px solid var(--color-card-border);
}

.section--flush {
  border-top: none;
}

.hero--compact {
  padding-bottom: 1rem;
}

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

.section-head p {
  color: var(--color-text-muted);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 800px) {
  .two-col {
    grid-template-columns: 1fr 1fr;
  }
}

/* ==========================================================================
   Cards / views grid
   ========================================================================== */

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

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

/* Four-up feature lists (Why page) balance as 2×2; the default three-column
   grid would leave a lone card stranded on the second row. */
@media (min-width: 700px) {
  .card-grid--two {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  background: var(--color-card);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.card h3 {
  color: var(--color-highlight);
  margin-bottom: 0.5rem;
}

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

/* ==========================================================================
   Numbered steps (How It Works)
   ========================================================================== */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.step {
  counter-increment: step;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  position: relative;
  padding-bottom: 2.25rem;
}

.step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 52px;
  bottom: 0;
  width: 2px;
  background: repeating-linear-gradient(
    to bottom,
    var(--color-accent) 0 6px,
    transparent 6px 14px
  );
}

.step-number {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--color-card);
  border: 2px solid var(--color-accent);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
  z-index: 1;
}

.step-body h3 {
  margin-bottom: 0.4rem;
}

.step-body p {
  color: var(--color-text-muted);
}

/* ==========================================================================
   Area chips / color swatches
   ========================================================================== */

.area-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-card);
  border: 1px solid var(--color-card-border);
  border-radius: 999px;
  padding: 0.35rem 0.9rem 0.35rem 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.area-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.area-dot--red { background: var(--area-red); }
.area-dot--green { background: var(--area-green); }
.area-dot--teal { background: var(--area-teal); }
.area-dot--blue { background: var(--area-blue); }
.area-dot--purple { background: var(--area-purple); }

.chip-row {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.stack-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0.5rem;
}

.stack-list .area-example-head {
  margin: 0;
}

/* ==========================================================================
   Example chains (vision -> yearly -> monthly -> weekly -> daily)
   ========================================================================== */

.persona-card {
  background: var(--color-card);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 2.5rem;
}

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

.area-example {
  margin-bottom: 3.5rem;
}

.area-example-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.area-example-head .area-dot {
  width: 16px;
  height: 16px;
}

.area-example-head h3 {
  margin: 0;
}

.chain {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-card-border);
}

.chain-step {
  background: var(--color-card);
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--color-card-border);
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1rem;
  align-items: start;
}

.chain-step:last-child {
  border-bottom: none;
  background: rgba(230, 166, 60, 0.06);
}

.chain-step-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  padding-top: 0.15rem;
}

.chain-step p {
  margin: 0;
  color: var(--color-text);
}

.chain-step .chain-meta {
  display: block;
  margin-top: 0.3rem;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

@media (max-width: 560px) {
  .chain-step {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

.chain--compact {
  border: none;
}

.chain--compact .chain-step {
  padding: 0.6rem 0;
  grid-template-columns: 110px 1fr;
  background: transparent;
}

.chain--compact .chain-step:last-child {
  padding-top: 0.6rem;
  border-bottom: none;
}

/* ==========================================================================
   Circle tracker mockup
   ========================================================================== */

.tracker-demo {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.tracker-note {
  margin: 0;
  max-width: 32ch;
}

.circle-tracker {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
}

.circle-tracker circle {
  fill: none;
  stroke-width: 8;
}

.circle-tracker .track {
  stroke: var(--color-card-border);
}

.circle-tracker .progress {
  stroke: var(--color-accent);
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

/* ==========================================================================
   View explainer (Detail / Thread / Bird's Eye)
   ========================================================================== */

.view-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 1rem;
}

/* ==========================================================================
   CTA banner
   ========================================================================== */

.cta-banner {
  background: var(--color-card);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
}

.cta-banner h2 {
  margin-bottom: 0.5rem;
}

.cta-banner p {
  color: var(--color-text-muted);
  max-width: 50ch;
  margin: 0 auto 0.5rem;
}

.cta-banner .btn-row {
  justify-content: center;
}

/* ==========================================================================
   Policy pages (long-form prose)
   ========================================================================== */

.policy-body {
  max-width: 68ch;
}

.policy-body h2 {
  font-size: 1.3rem;
  margin-top: 2.25rem;
}

.policy-body p {
  color: var(--color-text-muted);
}

.policy-body a {
  color: var(--color-accent);
}

/* ==========================================================================
   FAQ
   ========================================================================== */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--color-card);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius);
  padding: 0.25rem 1.25rem;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1.1rem 0;
  font-weight: 700;
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  color: var(--color-accent);
  font-size: 1.4rem;
  font-weight: 400;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item .faq-answer {
  padding-bottom: 1.25rem;
  color: var(--color-text-muted);
}

.faq-item .faq-answer p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--color-card-border);
  padding: 2.5rem 0;
  margin-top: 3rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
}

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

.footer-nav a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.footer-nav a:hover {
  color: var(--color-accent);
}

.footer-meta {
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.footer-meta a {
  color: var(--color-text-muted);
  text-decoration: underline;
}

.footer-meta a:hover {
  color: var(--color-accent);
}

/* ==========================================================================
   App view mockups (examples page)
   ========================================================================== */

.view-mockup-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3.5rem;
}

@media (min-width: 860px) {
  .view-mockup-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.view-mockup h3 {
  margin-bottom: 0.5rem;
}

.view-mockup__intro {
  color: var(--color-text-muted);
  max-width: 46ch;
  margin-bottom: 1.75rem;
}

/* -- phone frame -- */

.phone-mockup {
  width: 300px;
  max-width: 100%;
  margin: 0 auto;
  background: var(--color-card);
  border-radius: 34px;
  padding: 10px;
  border: 1px solid var(--color-card-border);
  box-shadow: 0 24px 48px -20px rgba(10, 10, 10, 0.65);
}

.phone-mockup__screen {
  background: var(--color-bg);
  border-radius: 24px;
  overflow: hidden;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.phone-mockup__notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 84px;
  height: 16px;
  background: var(--color-card);
  border-radius: 0 0 12px 12px;
  z-index: 2;
}

.phone-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 4px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
}

.phone-statusbar-icons {
  display: flex;
  align-items: center;
  gap: 5px;
}

.signal-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 9px;
}

.signal-bars span {
  width: 3px;
  display: block;
  background: var(--color-text-muted);
  border-radius: 1px;
}

.signal-bars span:nth-child(1) { height: 3px; }
.signal-bars span:nth-child(2) { height: 5px; }
.signal-bars span:nth-child(3) { height: 7px; }
.signal-bars span:nth-child(4) { height: 9px; }

.battery-icon {
  width: 18px;
  height: 9px;
  border: 1px solid var(--color-text-muted);
  border-radius: 2px;
  position: relative;
  display: inline-block;
}

.battery-icon::before {
  content: "";
  position: absolute;
  right: -3px;
  top: 2px;
  width: 2px;
  height: 5px;
  background: var(--color-text-muted);
  border-radius: 0 1px 1px 0;
}

.battery-icon::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  bottom: 1px;
  width: 70%;
  background: var(--color-text-muted);
  border-radius: 1px;
}

.phone-content {
  flex: 1;
  padding: 12px 18px 4px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.phone-home-indicator {
  width: 120px;
  height: 4px;
  background: var(--color-text-muted);
  opacity: 0.5;
  border-radius: 999px;
  margin: 12px auto 8px;
}

/* The mount point a real screen component (Today/DetailView/ThreadView/
   BirdView, via 34-mount.jsx) renders into — everything inside it from here
   down is real app markup styled entirely by the real app.css, not by this
   file. flex:1 + overflow-y:auto lets it scroll within the phone frame like
   an actual screen when content runs long. */
.phone-mount {
  flex: 1;
  overflow-y: auto;
}

.mount-note {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.85rem;
}

