/* =========================================================
   It's Your Idea — homepage
   Calm, scannable, no metaphor, on black. See DESIGN.md.

   Self-contained: the other 32 pages still run css/styles.css (dark navy),
   and this file must not reach them. It also styles the markup js/main.js and
   js/content.js inject at runtime, since this page loads neither styles.css
   nor content.css.
   ========================================================= */

:root {
  color-scheme: dark;

  /* Black, deliberately NOT navy — navy plus cyan is the arrangement this
     replaced. Neutral near-black, so the cyan is the only hue on the page. */
  --bg:          #0a0a0c;
  --panel:       #16161a;
  --line:        #2c2c34;
  --ink:         #f4f4f6;   /* 18.0:1 on --bg */
  --muted:       #8b8f96;   /* 6.09:1 on --bg, 5.56:1 on --panel */

  /* The logo's own cyan, now the site accent. Note the ink that goes ON it:
     white on this cyan is 2.67:1 and fails — filled controls take near-black. */
  --accent:       #00acd6;  /* 7.42:1 as text on --bg */
  --accent-bright:#22c3ea;  /* hover — brightens, never darkens, on a dark ground */
  --on-accent:    #0a0a0c;  /* 7.42:1 on --accent */

  --ok:          #3ddc84;
  --warn:        #f5b544;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;

  --maxw: 1160px;
  --gut:  24px;

  --s-xs: 8px;
  --s-sm: 14px;
  --s-md: 24px;
  --s-lg: 40px;
  --s-xl: 72px;
  --s-section: 112px;

  --sans: "Libre Franklin", Helvetica, Arial, sans-serif;

  /* the only shadow in the system */
  /* On black a shadow cannot be seen, so the one "lifted" object is raised
     by a lighter surface and a brighter edge instead. */
  --lift: 0 0 0 1px rgba(255,255,255,.05), 0 18px 40px -24px rgba(0,0,0,.9);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  /* clip, not hidden — hidden makes a scroll container and kills sticky */
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* height:auto is required — every img carries width/height for CLS, and without
   it the attribute height survives while max-width shrinks the width. */
img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-bright); text-decoration-thickness: 2px; }

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

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

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); }

/* ---------- type ---------- */

h1, h2, h3 { margin: 0; text-wrap: balance; }

.display {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 800; line-height: 1.05; letter-spacing: -.03em;
}
.headline {
  font-size: clamp(1.6rem, 2.6vw, 2.25rem);
  font-weight: 700; line-height: 1.15; letter-spacing: -.02em;
}
.title { font-size: 1.1875rem; font-weight: 700; line-height: 1.3; }
.lede { font-size: 1.25rem; line-height: 1.55; max-width: 58ch; color: var(--muted); }
p { max-width: 68ch; }
.small { font-size: .9375rem; line-height: 1.55; color: var(--muted); }
.label { font-size: .8125rem; font-weight: 600; line-height: 1.3; display: block; }

/* ---------- sections ---------- */

.band { padding: var(--s-section) 0; }
.band--panel { background: var(--panel); }
.band__head { max-width: 62ch; margin-bottom: var(--s-lg); }
.band__head p { margin: var(--s-sm) 0 0; color: var(--muted); }

/* ---------- header ---------- */

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.site-head__in {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-md); min-height: 72px;
}
.brand { display: inline-flex; text-decoration: none; }
/* The logo is white-on-transparent, so on a black ground it sits directly on the
   page — no plate, no recolour. This is the one place the dark ground makes the
   fixed brand asset easier rather than harder. */
.brand img { height: 26px; width: auto; }
.site-foot .brand img { height: 30px; }

.nav { display: flex; align-items: center; gap: var(--s-xs); }
.nav a {
  color: var(--ink); text-decoration: none; font-size: .9375rem; font-weight: 500;
  padding: 10px 12px; border-radius: var(--r-sm); white-space: nowrap;
}
.nav a:hover { background: var(--panel); color: var(--ink); }
/* .nav a out-specifies .btn, so the button's own colours have to be restated
   here or the label inherits ink and lands at 2.7:1 on the accent fill. */
.nav .btn { margin-left: var(--s-xs); color: var(--on-accent); background: var(--accent); }
.nav .btn:hover { color: var(--on-accent); background: var(--accent-bright); }

.nav-toggle {
  display: none; font: inherit; font-size: .9375rem; font-weight: 600;
  background: transparent; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 11px 15px; min-height: 46px; cursor: pointer;
}

/* ---------- controls ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: inherit; font-weight: 600; font-size: 1rem;
  padding: 16px 26px; min-height: 52px;
  border: 1px solid transparent; border-radius: var(--r-sm);
  background: var(--accent); color: var(--on-accent);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .14s linear, border-color .14s linear;
}
.btn:hover { background: var(--accent-bright); color: var(--on-accent); text-decoration: none; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn--secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--secondary:hover { background: var(--panel); color: var(--ink); }
.btn--block { width: 100%; }

label { display: block; }
.input {
  width: 100%; font: inherit; font-size: 1.0625rem;
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 14px 15px; min-height: 52px;
}
.input::placeholder { color: var(--muted); opacity: 1; }
textarea.input { min-height: 130px; resize: vertical; }

.actions { display: flex; gap: var(--s-sm); flex-wrap: wrap; }

/* ---------- 1. hero ---------- */

.hero { padding: var(--s-xl) 0 var(--s-section); }
.hero__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr));
  gap: var(--s-xl); align-items: start;
}
.hero .lede { margin: var(--s-md) 0 0; }
.hero__points { list-style: none; margin: var(--s-lg) 0 0; padding: 0; max-width: 52ch; }
.hero__points li {
  padding: 11px 0 11px 26px; position: relative;
  border-bottom: 1px solid var(--line); font-size: .9375rem;
}
.hero__points li:last-child { border-bottom: 0; }
.hero__points li::before {
  content: ""; position: absolute; left: 2px; top: 20px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}

/* the one elevated object on the page */
.audit-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--lift);
  padding: var(--s-lg);
}
.audit-card__note { margin: var(--s-sm) 0 0; font-size: .875rem; color: var(--muted); }
.field { margin-bottom: var(--s-md); }
.field .label { margin-bottom: 7px; }
.field .label span { font-weight: 400; color: var(--muted); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- 2. the routes ---------- */

.routes { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-lg); }
.route {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s-lg); display: flex; flex-direction: column;
}
.route .title { margin-bottom: var(--s-xs); }
.route p { color: var(--muted); margin: 0 0 var(--s-md); font-size: .9375rem; }
.route ul { list-style: none; margin: 0 0 var(--s-lg); padding: 0; }
.route li {
  padding: 9px 0 9px 22px; position: relative;
  font-size: .9375rem; border-bottom: 1px solid var(--line);
}
.route li:last-child { border-bottom: 0; }
.route li::before {
  content: ""; position: absolute; left: 2px; top: 18px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--muted);
}
.route .actions { margin-top: auto; }

/* ---------- 3. the wall ---------- */

.wall { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-md); }
.wall a { display: block; text-decoration: none; color: var(--ink); }
.wall img {
  width: 100%; aspect-ratio: 16 / 11; object-fit: cover; object-position: top center;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel);
}
.wall b { display: block; margin-top: 10px; font-size: .9375rem; font-weight: 600; }
.wall span { display: block; font-size: .8125rem; color: var(--muted); }
.wall a:hover img { border-color: var(--muted); }
.wall a:hover b { color: var(--accent); }
.wall__foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-md); flex-wrap: wrap; margin-top: var(--s-lg);
}

/* ---------- 4. tools ---------- */

.tools { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-lg); }
.tool {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s-lg); display: flex; flex-direction: column;
}
/* object-fit is the guarantee, not the sizing: with width:auto alone, an image
   that hasn't decoded yet has no intrinsic width and stretches to the card. */
.tool img {
  height: 38px; width: auto; max-width: 200px;
  object-fit: contain; object-position: left center;
  margin-bottom: var(--s-md);
}
.tool p { color: var(--muted); margin: var(--s-xs) 0 var(--s-md); font-size: .9375rem; }
.tool ul { list-style: none; margin: 0 0 var(--s-lg); padding: 0; }
.tool li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .9375rem; }
.tool li:last-child { border-bottom: 0; }
.tool__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: var(--s-sm); flex-wrap: wrap; }
.price { font-weight: 700; font-size: 1.0625rem; }
.price span { font-weight: 400; font-size: .875rem; color: var(--muted); }

/* ---------- 5. steps ---------- */

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-md); }
.step { border-top: 2px solid var(--accent); padding-top: var(--s-sm); }
.step .label { color: var(--muted); margin-bottom: 6px; }
.step p { color: var(--muted); font-size: .9375rem; margin: 6px 0 var(--s-sm); }

/* ---------- 6. contact ---------- */

.contact { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-xl); align-items: start; }
.form-grid { display: grid; gap: var(--s-md); }
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-md); }
.note { font-size: .9375rem; margin: 0; }

/* ---------- footer ---------- */

.site-foot { border-top: 1px solid var(--line); padding: var(--s-xl) 0 var(--s-lg); }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: var(--s-lg); }
.foot-grid h2 { font-size: .8125rem; font-weight: 600; margin: 0 0 var(--s-sm); color: var(--muted); }
.foot-grid a { display: block; padding: 8px 0; font-size: .9375rem; color: var(--ink); text-decoration: none; }
.foot-grid a:hover { color: var(--accent); text-decoration: underline; }
.foot-blurb { color: var(--muted); font-size: .9375rem; max-width: 42ch; margin: var(--s-sm) 0 0; }
.foot-bar {
  margin-top: var(--s-lg); padding-top: var(--s-md); border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: var(--s-md); flex-wrap: wrap;
  font-size: .875rem; color: var(--muted);
}

/* =========================================================
   Markup injected at runtime by js/content.js and js/main.js
   ========================================================= */

.audit-result { margin-top: var(--s-md); border-top: 1px solid var(--line); padding-top: var(--s-md); }
.audit-result__loading {
  display: flex; align-items: center; gap: 10px;
  font-size: .9375rem; color: var(--muted);
}
.spinner {
  width: 15px; height: 15px; border: 2px solid var(--line);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin .8s linear infinite; flex: 0 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.audit-result__header { margin-bottom: var(--s-md); }
.audit-result__header h2 { font-size: 1.0625rem; font-weight: 700; margin: 4px 0 0; word-break: break-word; }
.audit-result__error p { font-size: .9375rem; color: var(--warn); font-weight: 600; margin: 0; }

.prose { font-size: .9375rem; line-height: 1.65; }
.prose h2 { font-size: 1.0625rem; font-weight: 700; margin: var(--s-md) 0 var(--s-xs); }
.prose h3 { font-size: .9375rem; font-weight: 700; margin: var(--s-md) 0 var(--s-xs); }
.prose p { margin: 0 0 var(--s-sm); }
.prose ul { margin: 0 0 var(--s-sm); padding-left: 20px; }
.prose li { margin: 0 0 6px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: var(--s-md) 0; }

.iyi-convert { margin-top: var(--s-lg); padding-top: var(--s-md); border-top: 1px solid var(--line); }
.iyi-convert__title { font-size: 1.0625rem; font-weight: 700; margin: 0 0 var(--s-sm); }
.iyi-convert__bullets { list-style: none; margin: 0 0 var(--s-md); padding: 0; }
.iyi-convert__bullets li { padding: 8px 0 8px 22px; position: relative; font-size: .9375rem; border-bottom: 1px solid var(--line); }
.iyi-convert__bullets li::before { content: ""; position: absolute; left: 2px; top: 17px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.iyi-convert__actions { display: flex; gap: var(--s-sm); flex-wrap: wrap; }
.iyi-convert__alt { font-size: .875rem; color: var(--muted); margin: var(--s-sm) 0 0; }

.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-md); }
.news-card { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--bg); }
.news-card:hover { border-color: var(--muted); text-decoration: none; }
.news-card__img { aspect-ratio: 16 / 9; overflow: hidden; background: var(--panel); }
.news-card__img img { width: 100%; height: 100%; object-fit: cover; }
.news-card__body { padding: var(--s-md); display: flex; flex-direction: column; gap: 7px; flex: 1; }
.news-card__date { font-size: .8125rem; color: var(--muted); }
.news-card__title { font-size: 1.0625rem; font-weight: 700; margin: 0; }
.news-card__excerpt { font-size: .9375rem; color: var(--muted); margin: 0; }
.news-card__read { margin-top: auto; padding-top: var(--s-xs); font-size: .9375rem; font-weight: 600; color: var(--accent); }

/* main.js appends this backdrop and toggles .is-open. Styled here because this
   page does not load css/styles.css, where the original lives. */
.nav-scrim {
  position: fixed; inset: 0; z-index: 45;
  background: rgba(0,0,0,.62);
  opacity: 0; visibility: hidden;
  transition: opacity .18s linear, visibility 0s linear .18s;
}
.nav-scrim.is-open { opacity: 1; visibility: visible; transition: opacity .18s linear; }

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1000px) {
  .wall { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr 1fr; }
  .foot-grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--panel); border-bottom: 1px solid var(--line);
    padding: var(--s-sm) var(--gut) var(--s-md);
    max-height: calc(100dvh - 100%); overflow-y: auto; overscroll-behavior: contain;
    box-shadow: var(--lift);
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity .18s linear, transform .18s linear, visibility 0s linear .18s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity .18s linear, transform .18s linear; }
  .nav a { padding: 13px 0; min-height: 48px; display: flex; align-items: center; border-bottom: 1px solid var(--line); }
  .nav .btn { margin: var(--s-sm) 0 0; justify-content: center; border-bottom: 0; }
  .nav-toggle { display: inline-flex; align-items: center; }
  .routes, .tools, .contact { grid-template-columns: 1fr; gap: var(--s-lg); }
  .news-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  :root { --s-section: 72px; --s-xl: 48px; }
  .wall { grid-template-columns: repeat(2, 1fr); }
  .btn { width: 100%; }
  .actions .btn, .tool__foot .btn { width: 100%; }
}

@media (max-width: 600px) {
  :root { --gut: 28px; }   /* nothing runs to the screen edge */
  .steps { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .form-2 { grid-template-columns: 1fr; }
  .audit-card { padding: var(--s-md); }
}

/* =========================================================
   Reduced motion — decorative motion off, loading indicators stay
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .nav, .nav-scrim, .news-card, .wall a img { transition: none !important; }
  /* .spinner keeps running: it reports that work is in progress. */
}
