/* ==========================================================================
   Coebly LLC — shared stylesheet
   Mobile-first. No JavaScript anywhere on this site; no inline styles.
   Palette derived from the logo mark.
   ========================================================================== */

:root {
  --ink: #0F0C2E;
  --mint: #7BD9A8;
  --sky: #7CC5F2;
  --paper: #F4F6FB;
  --white: #FFFFFF;
  --text-dark: #14122B;
  --text-light: #EAF2FA;

  /* Derived tones. Every pair below clears WCAG AA on its own surface. */
  --muted-dark: #4A5568;   /* 6.96:1 on paper, 7.53:1 on white */
  --muted-light: #A9B6C9;  /* 9.19:1 on ink */
  --sky-dark: #17638F;     /* 6.04:1 on paper, 6.53:1 on white */
  --hairline: #DDE3EE;

  --accent-gradient: linear-gradient(90deg, var(--mint) 0%, var(--sky) 100%);

  /* Focus ring colour is re-declared per surface so it always passes AA. */
  --focus: var(--sky-dark);

  --measure: 65ch;
  --radius: 6px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}

/* --------------------------------------------------------------- reset -- */

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-dark);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p {
  margin: 0 0 1.15em;
}

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

a {
  color: var(--sky-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

img {
  max-width: 100%;
}

/* ------------------------------------------------------- focus states -- */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

/* The skip link is a body child, so the ink header's --focus never reaches it.
   Its ring is offset onto the ink header behind, so it needs the light sky
   (10:1 on ink) rather than the inherited sky-dark (2.89:1 — fails SC 1.4.11). */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--white);
  color: var(--sky-dark);
  font-weight: 600;
  --focus: var(--sky);
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* ------------------------------------------------------------ layout -- */

.wrap {
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.prose {
  max-width: var(--measure);
}

.section {
  padding: 3rem 0;
}

.section-paper {
  background: var(--paper);
  color: var(--text-dark);
}

.section-white {
  background: var(--white);
  color: var(--text-dark);
}

/* Surfaces painted in ink re-point the focus ring at the light sky tone. */
.surface-ink {
  background: var(--ink);
  color: var(--text-light);
  --focus: var(--sky);
}

.surface-ink a {
  color: var(--sky);
}

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

.site-header {
  background: var(--ink);
  color: var(--text-light);
  --focus: var(--sky);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex: none;
}

/* The logo carries the company name, so no wordmark text sits beside it.
   Fallback: if assets/logo.png is ever missing, the <img> box still holds
   its space and reads as the COEBLY wordmark rather than a broken image.
   Two belts, one pair of braces:
     1. The img element itself is typeset, so a browser that paints alt text
        for a broken image (Firefox) shows "COEBLY" letter-spaced in light text.
     2. Chromium and WebKit paint ::after only on a *broken* image, so the
        ink block below hides the broken-image glyph and prints the wordmark.
   When the logo loads, neither path is visible. */
.brand-logo {
  position: relative;
  display: block;
  width: 92px;
  height: 30px;
  object-fit: contain;
  object-position: left center;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-variant: small-caps;
  color: var(--text-light);
  overflow: hidden;
}

.brand-logo::after {
  content: "COEBLY";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background: var(--ink);
  color: var(--text-light);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
  font-size: 0.9375rem;
}

.site-nav a {
  color: var(--text-light);
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover {
  border-bottom-color: var(--sky);
}

/* -------------------------------------------------------------- hero -- */

.hero {
  padding: 3rem 0 2.5rem;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 3.25rem);
  margin-bottom: 0.6em;
}

.hero-sub {
  font-size: clamp(1.0625rem, 2.4vw, 1.25rem);
  line-height: 1.6;
  color: var(--text-light);
  max-width: var(--measure);
}

.hero-paper {
  background: var(--paper);
  color: var(--text-dark);
  padding: 2.75rem 0 2.5rem;
}

.hero-paper .hero-sub {
  color: var(--text-dark);
}

/* The one thin gradient rule under the dark hero. */
.hero-rule {
  height: 3px;
  border: 0;
  margin: 0;
  background: var(--accent-gradient);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  margin-top: 1.75rem;
}

/* ----------------------------------------------------------- buttons -- */

.btn {
  display: inline-block;
  padding: 0.8rem 1.4rem;
  border: 0;
  border-radius: var(--radius);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent-gradient);
  color: var(--ink);
}

.btn-primary:hover {
  filter: saturate(1.15) brightness(1.04);
}

.link-secondary {
  font-weight: 600;
  color: var(--sky-dark);
}

.surface-ink .link-secondary,
.site-header .link-secondary {
  color: var(--sky);
}

/* ------------------------------------------------------------- cards -- */

.card-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 1.75rem 1.5rem;
}

.card h2 {
  font-size: 1.3125rem;
}

.card p {
  color: var(--muted-dark);
  max-width: var(--measure);
}

.card-actions {
  margin-top: auto;
  padding-top: 1.5rem;
}

/* --------------------------------------------------------- headings -- */

.section h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  max-width: var(--measure);
}

.section-lead {
  color: var(--muted-dark);
  max-width: var(--measure);
}

/* -------------------------------------------------------- how it works -- */

.steps {
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 1.5rem;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 3rem;
  max-width: var(--measure);
  color: var(--muted-dark);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1em;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--text-light);
  font-size: 0.9375rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.steps h3 {
  font-size: 1.125rem;
  color: var(--text-dark);
  margin-bottom: 0.35em;
}

/* ----------------------------------------------------------- callout -- */

.callout {
  margin: 2.5rem 0 0;
  padding: 1.5rem 1.5rem 1.5rem 1.25rem;
  background: var(--paper);
  border-left: 4px solid var(--mint);
  border-radius: 0 var(--radius) var(--radius) 0;
  max-width: var(--measure);
}

.callout-lead {
  font-size: clamp(1.25rem, 3.2vw, 1.5rem);
  line-height: 1.4;
  font-weight: 600;
  color: var(--text-dark);
  letter-spacing: -0.01em;
}

.callout-sub {
  font-size: 1.0625rem;
  color: var(--muted-dark);
  margin-bottom: 0;
}

/* --------------------------------------------------------- labor math -- */
/* "Do the math" hours-anchor near the demo CTA. White card on the paper
   contact section; sky left border to stay distinct from the mint review
   callout. States the status quo's cost — promises nothing. */

.labor-math {
  max-width: var(--measure);
  margin: 2rem 0 0;
  padding: 1.5rem 1.5rem 1.5rem 1.25rem;
  background: var(--paper);
  border-left: 4px solid var(--sky);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.labor-math-lead {
  margin: 0 0 0.5rem;
  font-size: clamp(1.0625rem, 2.4vw, 1.1875rem);
  color: var(--text-dark);
}

.labor-math-note {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--muted-dark);
}

/* --------------------------------------------------------------- faq -- */

.faq {
  margin-top: 2rem;
  max-width: var(--measure);
  border-top: 1px solid var(--hairline);
}

.faq details {
  border-bottom: 1px solid var(--hairline);
}

.faq summary {
  cursor: pointer;
  padding: 1.1rem 0;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-dark);
}

.faq summary:hover {
  color: var(--sky-dark);
}

.faq details p {
  margin: 0 0 1.25rem;
  color: var(--muted-dark);
  max-width: var(--measure);
}

/* ------------------------------------------------------------- video -- */

/* The demo is a vertical (9:16) Short — it fills a phone naturally, so the
   frame matches its ratio and is capped on desktop so it doesn't tower. */
.video-frame {
  position: relative;
  width: 100%;
  max-width: 22rem;
  aspect-ratio: 9 / 16;
  margin: 2rem 0 1.25rem;
  background: var(--ink);
  border-radius: 10px;
  overflow: hidden;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 1.5rem;
  text-align: center;
  background: var(--ink);
  color: var(--text-light);
  --focus: var(--sky);
}

.video-placeholder-text {
  margin: 0;
  font-size: clamp(1.0625rem, 3vw, 1.375rem);
  font-weight: 600;
  color: var(--text-light);
}

.video-placeholder-sub {
  margin: -0.5rem 0 0;
  font-size: 0.9375rem;
  color: var(--muted-light);
  max-width: 40ch;
}

.video-caption {
  color: var(--muted-dark);
  font-size: 0.9375rem;
  max-width: var(--measure);
}

/* -------------------------------------------------------------- form -- */

.form {
  margin-top: 2rem;
  max-width: 34rem;
}

.form-label {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0 0 1.15rem;
}

.field label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-dark);
}

.field input,
.field textarea {
  font: inherit;
  font-size: 1rem;
  color: var(--text-dark);
  background: var(--white);
  border: 1px solid var(--muted-dark);
  border-radius: var(--radius);
  padding: 0.7rem 0.75rem;
  width: 100%;
}

.field textarea {
  min-height: 8rem;
  resize: vertical;
}

/* Honeypot. Bots fill it in; people never see it. */
.hp {
  display: none;
}

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

.site-footer {
  background: var(--ink);
  color: var(--text-light);
  --focus: var(--sky);
  padding: 2.5rem 0;
  font-size: 0.9375rem;
}

.footer-note {
  color: var(--text-light);
  max-width: var(--measure);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(234, 242, 250, 0.18);
}

.footer-meta {
  color: var(--muted-light);
  max-width: var(--measure);
  margin: 0;
}

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

/* -------------------------------------------------------- ≥ 48em -- */

@media (min-width: 48em) {
  body {
    font-size: 1.125rem;
  }

  .wrap {
    padding: 0 2rem;
  }

  .section {
    padding: 4.5rem 0;
  }

  .header-inner {
    padding-top: 1.1rem;
    padding-bottom: 1.1rem;
  }

  .brand-logo {
    width: 122px;
    height: 40px;
    font-size: 0.9375rem;
  }

  .brand-logo::after {
    font-size: 0.9375rem;
  }

  .site-nav {
    gap: 2rem;
    font-size: 1rem;
  }

  .hero {
    padding: 5rem 0 4rem;
  }

  .hero-paper {
    padding: 4.5rem 0 4rem;
  }

  .card-grid-2 {
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
  }

  .card {
    padding: 2.25rem 2rem;
  }

  .callout {
    padding: 2rem 2rem 2rem 1.75rem;
  }

  .steps {
    gap: 2rem;
  }
}

/* --------------------------------------------------- reduced motion -- */

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
