/* ==========================================================================
   Taha Connected — styles.css
   Tokens: BRAND-KIT.md (Clinical). 8px spacing scale. Mobile first.
   Breakpoints: 640px, 900px, 1120px.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Design tokens
   -------------------------------------------------------------------------- */

:root {
  /* Color */
  --ink: #0F172A;
  --muted: #475569;
  --primary: #1D4ED8;
  --primary-dark: #1E3A8A;
  --accent: #0F766E;
  --bg: #FFFFFF;
  --surface: #F8FAFC;
  --surface-alt: #F1F5F9;
  --border: #E2E8F0;
  --on-dark: #FFFFFF;
  --on-dark-muted: #CBD5E1;

  /* Type families */
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Type scale — 1.25 minor third, 16px base */
  --fs-xs: .8rem;
  --fs-sm: .875rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.375rem;
  --fs-2xl: clamp(1.5rem, 3vw, 1.75rem);
  --fs-3xl: clamp(1.875rem, 4vw, 2.25rem);
  --fs-4xl: clamp(2.25rem, 5vw, 3rem);
  --fs-hero: clamp(2.5rem, 6vw, 3.75rem);

  /* Line height / measure / tracking */
  --lh-display: 1.15;
  --lh-body: 1.6;
  --measure: 34em;
  --tracking-display: -.02em;

  /* Space — 8px base, multiples only */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 80px;
  --space-8: 112px;
  --section-y: clamp(4rem, 8vw, 7rem);
  --container: 1120px;
  --container-pad: 24px;

  /* Shape */
  --radius-card: 10px;
  --radius-btn: 8px;
  /* Squared to sit with the logo's 90-degree geometry. Was 999px. */
  --radius-pill: 4px;

  /* Brand angle. Measured off the sheared counters in the logo's A, which sit at
     24.6 degrees from vertical across all four segments. Use for skewX / clip-path
     on the one angled element per page. Never eyeball a different diagonal. */
  --shear: 24.6deg;
  --shadow-soft: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);

  /* Motion — hover/focus only, 150-200ms ease-out */
  --transition: 160ms ease-out;

  /* Layout */
  --tap-min: 44px;
}

/* --------------------------------------------------------------------------
   Reset
   -------------------------------------------------------------------------- */

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

* { margin: 0; }

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

body {
  min-height: 100svh;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: var(--lh-body);
  color: var(--ink);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-display);
  letter-spacing: var(--tracking-display);
}

p, h1, h2, h3, h4, li { overflow-wrap: break-word; }

img, picture, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

a { color: var(--primary); }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

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

html {
  scroll-behavior: smooth;               /* reduced-motion override lives in the reset */
  scroll-padding-top: 72px;              /* sticky header height + 8px */
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-2);
  z-index: 100;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-btn);
  background: var(--ink);
  color: var(--on-dark);
  font-weight: 600;
  text-decoration: none;
  transition: top var(--transition);
}

.skip-link:focus { top: var(--space-2); }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  min-height: var(--tap-min);
  padding: var(--space-1) var(--space-3);
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--transition), border-color var(--transition), color var(--transition);
}

.btn--primary {
  background-color: var(--primary);
  color: var(--on-dark);
}

.btn--primary:hover { background-color: var(--primary-dark); }

.btn--secondary {
  background-color: var(--bg);
  color: var(--ink);
  border-color: var(--border);
}

.btn--secondary:hover { border-color: var(--muted); }

.btn--sm {
  padding: var(--space-1) var(--space-2);
  font-size: var(--fs-sm);
}

.btn--lg {
  min-height: 56px;
  padding: var(--space-2) var(--space-4);
  font-size: var(--fs-lg);
}

/* --------------------------------------------------------------------------
   1. Header
   -------------------------------------------------------------------------- */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}

.header--scrolled { border-bottom-color: var(--border); }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: 64px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: var(--tap-min);
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: var(--tracking-display);
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

/* Mark inherits colour, so it flips to white on dark bands with no second asset. */
.wordmark__mark {
  width: auto;
  height: 44px;
  flex: none;
}

/* Name is hidden on small screens: the mark alone keeps the header uncrowded. */
.wordmark__text { display: none; }

/* Nav is hidden under 768px — see the media query at the foot of this block. */
.nav { display: none; }

.nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  color: var(--muted);
  font-size: var(--fs-base);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--transition);
}

.nav__link:hover { color: var(--ink); }

/* --------------------------------------------------------------------------
   2. Hero
   -------------------------------------------------------------------------- */

.hero { padding-block: var(--space-5) var(--space-6); }

.hero__eyebrow {
  margin-bottom: var(--space-2);
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.hero__title {
  font-size: var(--fs-hero);
  text-wrap: balance;
}

.hero__sub {
  max-width: var(--measure);
  margin-top: var(--space-3);
  color: var(--muted);
  font-size: var(--fs-lg);
}

.hero__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.hero__actions .btn { width: 100%; }

.hero__micro {
  margin-top: var(--space-2);
  color: var(--muted);
  font-size: var(--fs-sm);
}

/* Wireframe is desktop-only — it costs mobile height and says nothing there. */
.hero__visual { display: none; }

/* --------------------------------------------------------------------------
   14. Sticky mobile CTA bar
   -------------------------------------------------------------------------- */

.cta-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 60;
  display: flex;
  background-color: var(--primary);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.cta-bar__item {
  flex: 1 1 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  min-height: 56px;
  padding: var(--space-1) var(--space-2);
  color: var(--on-dark);
  font-size: var(--fs-base);
  font-weight: 600;
  text-decoration: none;
}

.cta-bar__item + .cta-bar__item { border-left: 1px solid rgba(255, 255, 255, .28); }

.cta-bar__item:focus-visible {
  outline: 2px solid var(--on-dark);
  outline-offset: -6px;
}

/* Keep the bar from covering the end of the page. */
@media (max-width: 767.98px) {
  body { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }
}

/* --------------------------------------------------------------------------
   Breakpoints
   -------------------------------------------------------------------------- */

@media (min-width: 640px) {
  .wordmark__text { display: inline; }

  .hero__actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .hero__actions .btn { width: auto; }
}

/* 768px is the nav / sticky-bar switch: when the nav appears, the bar retires. */
@media (min-width: 768px) {
  .nav { display: block; }
  .cta-bar { display: none; }
}

@media (min-width: 900px) {
  .hero { padding-block: var(--space-6) var(--space-8); }

  .hero__inner {
    display: grid;
    /* Content column stays wide enough to hold both CTAs on one row. A long real
       phone number may still wrap them; the stacked state is a valid fallback. */
    grid-template-columns: 1.15fr .85fr;
    gap: var(--space-5);
    align-items: center;
  }

  .hero__visual {
    display: flex;
    justify-content: center;
  }

  .phone {
    width: 100%;
    max-width: 260px;
    height: auto;
    filter: drop-shadow(0 1px 2px rgba(15, 23, 42, .06)) drop-shadow(0 8px 24px rgba(15, 23, 42, .06));
  }
}

/* --------------------------------------------------------------------------
   Section shells
   -------------------------------------------------------------------------- */

.pains,
.gets,
.steps,
.pricing,
.offer { padding-block: var(--section-y); }

.pains,
.steps { background-color: var(--surface); }

.section__title {
  margin-bottom: var(--space-4);
  font-size: var(--fs-3xl);
  text-wrap: balance;
}

.check {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: .2em;          /* optical alignment to the cap line, not spacing */
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   3. Sound familiar
   -------------------------------------------------------------------------- */

.pains__list {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.pain {
  padding: var(--space-3);
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}

.pain__quote {
  margin-bottom: var(--space-1);
  font-size: var(--fs-xl);
}

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

.pains__note {
  margin-top: var(--space-3);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   4. Founding offer  (dark band 1 of 2)
   -------------------------------------------------------------------------- */

.offer {
  background-color: var(--ink);
  color: var(--on-dark);
}

.offer__inner { max-width: 46rem; }

/* Focus ring must flip on dark: --primary is only 2.66:1 against --ink. */
.offer :focus-visible { outline-color: var(--on-dark); }

/* The one angled element on the page. Skew is the brand angle, taken from the
   logo's sheared A; the inner span counter-skews so the text stays upright.
   Hard corners on purpose here \u2014 a rounded parallelogram reads as a mistake. */
.offer__badge {
  display: inline-block;
  margin-bottom: var(--space-3);
  padding: var(--space-1) var(--space-3);
  background-color: var(--primary);
  border-radius: 0;
  transform: skewX(calc(-1 * var(--shear)));
}

.offer__badge-text {
  display: inline-block;
  color: var(--on-dark);
  font-size: var(--fs-sm);
  font-weight: 600;
  transform: skewX(var(--shear));
}

.offer__title {
  font-size: var(--fs-4xl);
  text-wrap: balance;
}

.offer__body { margin-top: var(--space-3); }

.offer__body p + p { margin-top: var(--space-2); }

.offer__body p {
  max-width: var(--measure);
  color: var(--on-dark-muted);
  font-size: var(--fs-lg);
}

.offer .btn { margin-top: var(--space-4); }

.offer__micro {
  margin-top: var(--space-2);
  color: var(--on-dark-muted);
  font-size: var(--fs-sm);
}

/* Offer switch. The script in <head> sets html.holiday until the cutoff date.
   Without it, or without JavaScript, the holiday offer hides and the regular wording shows. */
html:not(.holiday) [data-offer="holiday"],
html.holiday [data-offer="regular"] { display: none; }

/* --------------------------------------------------------------------------
   5. What you get
   -------------------------------------------------------------------------- */

.gets__list {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.get {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
  font-size: var(--fs-lg);
}

/* --------------------------------------------------------------------------
   6. How it works
   -------------------------------------------------------------------------- */

.steps__list {
  display: grid;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.step__num {
  display: block;
  height: 40px;
  width: auto;
  margin-bottom: var(--space-2);
  color: var(--primary);
}

.step__title {
  margin-bottom: var(--space-1);
  font-size: var(--fs-xl);
}

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

/* --------------------------------------------------------------------------
   7. Pricing
   -------------------------------------------------------------------------- */

.pricing__cards {
  display: grid;
  gap: var(--space-3);
}

.plan {
  padding: var(--space-4);
  background-color: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}

/* Inset ring instead of a thicker border, so the featured card does not shift
   its own contents by a pixel relative to the other one. */
.plan--featured {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 2px var(--primary);
}

.plan__name { font-size: var(--fs-2xl); }

.plan__price {
  margin-top: var(--space-1);
  margin-bottom: var(--space-3);
  color: var(--muted);
  font-size: var(--fs-lg);
}

.plan__price strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
}

.plan__list {
  display: grid;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}

.plan__item {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
}

.pricing__explainer {
  max-width: var(--measure);
  margin-top: var(--space-4);
  padding: var(--space-3);
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}

.pricing__explainer-title {
  margin-bottom: var(--space-1);
  font-size: var(--fs-lg);
}

.pricing__explainer p { color: var(--muted); }

/* --------------------------------------------------------------------------
   Buttons on dark bands
   -------------------------------------------------------------------------- */

/* --primary on --ink is 2.66:1, under the 3:1 floor for a UI component. */
.btn--on-dark {
  background-color: var(--on-dark);
  color: var(--ink);
}

.btn--on-dark:hover { background-color: var(--on-dark-muted); }

/* --------------------------------------------------------------------------
   Breakpoints for sections 3-7
   -------------------------------------------------------------------------- */

@media (min-width: 640px) {
  .gets__list { grid-template-columns: 1fr 1fr; column-gap: var(--space-4); }
  .pricing__cards { grid-template-columns: 1fr 1fr; }
  .step__num { height: 48px; }
}

@media (min-width: 900px) {
  .pains__list { grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
  .steps__list { grid-template-columns: repeat(4, 1fr); gap: var(--space-3); }
  .pricing__cards { gap: var(--space-4); }
  .step__num { height: 56px; }
}

/* --------------------------------------------------------------------------
   8. Work  (hidden until real builds exist)
   -------------------------------------------------------------------------- */

.work {
  padding-block: var(--section-y);
  background-color: var(--bg);
  border-top: 1px solid var(--border);
}

.work__list {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.project {
  padding: var(--space-3);
  background-color: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}

.project__shot {
  width: 100%;
  height: auto;
  margin-bottom: var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
}

.project__name { font-size: var(--fs-xl); }

.project__trade {
  color: var(--accent);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.project__desc {
  margin-top: var(--space-1);
  color: var(--muted);
}

.project__link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   9. About
   -------------------------------------------------------------------------- */

.about {
  padding-block: var(--section-y);
  background-color: var(--surface);
}

.about__inner {
  display: grid;
  gap: var(--space-4);
}

/* Slot, not a broken image: no request fires until a real photo replaces it. */
.about__headshot {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 5;
  background-color: var(--surface-alt);
  border: 1px dashed var(--border);
  border-radius: var(--radius-card);
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.about__story {
  max-width: var(--measure);
  color: var(--muted);
  font-size: var(--fs-lg);
}

.about__story + .about__story { margin-top: var(--space-2); }

.about__quote {
  max-width: var(--measure);
  margin-top: var(--space-3);
  padding-left: var(--space-3);
  border-left: 4px solid var(--primary);
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  line-height: var(--lh-display);
  letter-spacing: var(--tracking-display);
}

/* --------------------------------------------------------------------------
   10. FAQ
   -------------------------------------------------------------------------- */

.faq { padding-block: var(--section-y); }

.faq__list {
  display: grid;
  gap: var(--space-1);
  max-width: 48rem;
}

.faq__item {
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}

.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: var(--tap-min);
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: var(--tracking-display);
  cursor: pointer;
  list-style: none;
}

.faq__q::-webkit-details-marker { display: none; }

/* Chevron drawn in CSS so the accordion needs no icon markup and no JS. */
.faq__q::after {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform var(--transition);
}

.faq__item[open] > .faq__q::after { transform: rotate(-135deg) translate(-2px, -2px); }

.faq__a {
  padding: 0 var(--space-3) var(--space-3);
  color: var(--muted);
}

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

/* --------------------------------------------------------------------------
   11. Final CTA  (dark band 2 of 2)
   -------------------------------------------------------------------------- */

.final {
  padding-block: var(--section-y);
  background-color: var(--ink);
  color: var(--on-dark);
  text-align: center;
}

.final :focus-visible { outline-color: var(--on-dark); }

.final__title {
  font-size: var(--fs-4xl);
  text-wrap: balance;
}

.final__sub {
  max-width: var(--measure);
  margin: var(--space-2) auto 0;
  color: var(--on-dark-muted);
  font-size: var(--fs-lg);
}

.final__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.final__actions .btn { width: 100%; }

.btn--ghost-dark {
  background-color: transparent;
  color: var(--on-dark);
  border-color: var(--on-dark-muted);
}

.btn--ghost-dark:hover { border-color: var(--on-dark); }

/* --------------------------------------------------------------------------
   12. Contact form
   -------------------------------------------------------------------------- */

.contact { padding-block: var(--section-y); }

.contact__inner { max-width: 40rem; }

.contact .section__title { margin-bottom: var(--space-1); }

.contact__lead {
  margin-bottom: var(--space-3);
  color: var(--muted);
  font-size: var(--fs-lg);
}

/* Netlify honeypot: must exist in the DOM and stay off-screen, not display:none. */
.form__hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.form__field { margin-bottom: var(--space-3); }

.form__label {
  display: block;
  margin-bottom: var(--space-1);
  font-weight: 600;
}

.form__control {
  display: block;
  width: 100%;
  min-height: var(--tap-min);
  padding: var(--space-1) var(--space-2);
  background-color: var(--bg);
  /* --border is 1.23:1 on white. A field edge is a UI component boundary and
     needs 3:1, so form controls use --muted (7.58:1) rather than the hairline
     that decorative card edges use. This audience needs to see where to type. */
  border: 1px solid var(--muted);
  border-radius: var(--radius-btn);
  color: var(--ink);
  font-size: var(--fs-base);
  transition: border-color var(--transition);
}

.form__control:hover { border-color: var(--ink); }

.form__control--area {
  min-height: 120px;
  resize: vertical;
}

.form__submit { width: 100%; }

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */

.footer {
  padding-block: var(--space-5);
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  font-size: var(--fs-sm);
}

.footer__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
  color: var(--muted);
}

/* Separators sit in the text run, so they take the text colour, not a hairline. */
.footer__dot { color: var(--muted); }

/* tel: and mailto: in the footer are real tap targets, not decoration. */
.footer__meta a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
}

.footer__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
  padding: 0;
  list-style: none;
}

.footer__list a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

.footer__list a:hover { color: var(--ink); }

.footer__copy {
  margin-top: var(--space-1);
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Breakpoints for sections 8-13
   -------------------------------------------------------------------------- */

@media (min-width: 640px) {
  .final__actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .final__actions .btn { width: auto; }

  .form__submit { width: auto; }
}

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

  .about__inner:has(.about__figure) {
    grid-template-columns: 320px 1fr;
    gap: var(--space-6);
    align-items: start;
  }
}
