@layer reset, tokens, base, components, utilities;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
  img, iframe { max-width: 100%; display: block; }
  button, input, select, textarea { font: inherit; color: inherit; }
}

@layer tokens {
  :root {
    /* primitives (TPA Visual-Identity) */
    --p-green: #3DAE2A; --p-green-dark: #2F8B20; --p-green-deep: #256D18;
    --p-gray: #525356; --p-ink: #1A1A1A; --p-white: #fff;
    --p-tint: #EAF7E6; --p-lgray: #F4F4F4; --p-border: #D6D6D6; --p-error: #B0281A;
    /* semantic */
    --c-text: var(--p-ink); --c-muted: var(--p-gray); --c-surface: var(--p-white);
    --c-surface-alt: var(--p-lgray); --c-tint: var(--p-tint); --c-border: var(--p-border);
    --c-accent: var(--p-green); --c-btn: var(--p-green-dark); --c-btn-hover: var(--p-green-deep); --c-btn-shadow: rgba(0,0,0,.28);
    --c-link: var(--p-green-dark); --c-error: var(--p-error); --c-focus: var(--p-ink);
    --c-dark: var(--p-gray); --c-footer: var(--p-ink);
    --f-display: 'Montserrat', 'Open Sans', Arial, sans-serif;
    --f-body: Calibri, Carlito, 'Segoe UI', Arial, sans-serif;
    --space-section: 28px; --measure: 720px; --wide: 1040px;
    --radius: 10px;
  }
  @media (min-width: 780px) { :root { --space-section: 40px; } }
}

@layer base {
  body { font-family: var(--f-body); font-size: 1.125rem; line-height: 1.6; color: var(--c-text); background: var(--c-surface); }
  h1, h2, h3 { font-family: var(--f-display); font-weight: 800; line-height: 1.18; color: inherit; }
  h1 { font-size: clamp(1.9rem, 6.2vw, 3.1rem); letter-spacing: -.5px; }
  h2 { font-size: clamp(1.45rem, 4.2vw, 2.1rem); letter-spacing: -.3px; margin-bottom: .6em; }
  h3 { font-size: clamp(1.15rem, 2.6vw, 1.35rem); margin-bottom: .4em; }
  p { margin-bottom: 1em; } p:last-child { margin-bottom: 0; }
  a { color: var(--c-link); }
  ul, ol { padding-left: 1.3em; margin-bottom: 1em; }
  li { margin-bottom: .4em; }
  :focus-visible { outline: 3px solid var(--c-focus); outline-offset: 3px; border-radius: 2px; }
  .skip { position: absolute; left: -999px; top: 0; background: #fff; color: #000; padding: 10px 14px; z-index: 100; }
  .skip:focus { left: 8px; top: 8px; }
}

@layer components {
  .wrap { max-width: var(--wide); margin: 0 auto; padding: 0 20px; }
  .measure { max-width: var(--measure); margin: 0 auto; }
  .sec { padding: var(--space-section) 0; }
  .sec--alt { background: var(--c-surface-alt); }
  .sec--tint { background: var(--c-tint); }
  .sec--dark { background: var(--c-dark); color: #fff; }
  .sec--dark a { color: #fff; }

  .hdr { background: #fff; border-bottom: 1px solid var(--c-surface-alt); padding: 10px 20px; }
  .hdr .wrap { display: flex; align-items: center; padding: 0; }
  .logo { width: 48px; height: 48px; }

  /* hero: gray field with a soft green glow layer behind the type */
  .hero { position: relative; isolation: isolate; background: var(--c-dark); color: #fff; padding: 34px 0 40px; overflow: hidden; }
  .hero::before { content: ""; position: absolute; inset: -30% -20% auto auto; width: 90%; aspect-ratio: 1; z-index: -1;
    background: radial-gradient(closest-side, rgba(61,174,42,.38), rgba(61,174,42,0)); }
  .hero::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 6px; background: var(--c-accent); }
  .hero .lede { font-size: 1.15rem; max-width: 40em; margin-top: 16px; color: #F4F4F4; }
  .eyebrow { font-family: var(--f-display); font-size: .75rem; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; display: block; margin-bottom: 10px; color: var(--c-muted); }
  .hero .eyebrow { color: #cfe9c9; }

  .btn { display: block; width: 100%; min-height: 56px; padding: 16px 24px; font-family: var(--f-display); font-weight: 800; font-size: 1.2rem;
    text-align: center; text-decoration: none; border: 0; border-radius: 8px; cursor: pointer; background: var(--c-btn); color: #fff;
    box-shadow: 0 4px 0 var(--c-btn-shadow); transition: background .15s, transform .08s; }
  .btn:hover { background: var(--c-btn-hover); transform: translateY(1px); color: #fff; }
  .btn--ghost { background: #fff; color: var(--p-ink); border: 2px solid var(--c-border); box-shadow: none; }
  .btn--ghost:hover { background: var(--c-surface-alt); color: var(--p-ink); }
  .btn[aria-disabled="true"] { background: #8a8b8e; box-shadow: none; cursor: not-allowed; transform: none; }
  .btn-row { display: flex; gap: 12px; flex-direction: column; }
  @media (min-width: 560px) { .btn { width: auto; min-width: 280px; display: inline-block; } .btn-row { flex-direction: row; } .btn.btn--full { width: 100%; display: block; } }
  .micro { font-size: .9rem; color: var(--c-muted); margin-top: 10px; }
  .hero .micro { color: #e4e4e4; }
  .fine { font-size: .8rem; line-height: 1.55; color: var(--c-muted); }

  .video { position: relative; aspect-ratio: 16 / 9; background: #1f2022; border-radius: var(--radius); overflow: hidden; box-shadow: 0 14px 40px rgba(0,0,0,.35); }
  .video iframe, .video button, .video .poster { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
  .poster { display: grid; place-content: center; text-align: center; gap: 8px; color: #fff; padding: 20px;
    background: linear-gradient(135deg, #3b3c3e, #525356 60%, #2f8b20); font-family: var(--f-display); font-weight: 800; font-size: clamp(1.1rem, 4vw, 1.6rem); }
  .poster small { font-family: var(--f-body); font-weight: 400; font-size: 1rem; opacity: .9; }
  .video button.play { cursor: pointer; border: 0; background: transparent; }
  .play-icon { width: 76px; height: 76px; border-radius: 50%; background: var(--c-accent); margin: 0 auto; display: grid; place-items: center; }
  .play-icon::after { content: ""; border-style: solid; border-width: 13px 0 13px 22px; border-color: transparent transparent transparent #fff; margin-left: 5px; }

  /* the one engineered peak: hours math builds line by line on scroll */
  .math { display: grid; gap: 10px; margin: 20px 0; font-family: var(--f-display); font-weight: 800; }
  .math div { font-size: clamp(1.2rem, 4.5vw, 1.8rem); padding: 12px 18px; border-left: 6px solid var(--c-accent); background: #fff; border-radius: 6px; }
  .math div:last-child { background: var(--c-btn); color: #fff; border-left-color: var(--p-green-deep); font-size: clamp(1.4rem, 5.2vw, 2.2rem); }
  .js .math div { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
  .js .math.in div { opacity: 1; transform: none; }
  .js .math.in div:nth-child(2) { transition-delay: .25s; } .js .math.in div:nth-child(3) { transition-delay: .5s; } .js .math.in div:nth-child(4) { transition-delay: .75s; }
  @media (prefers-reduced-motion: reduce) { .js .math div { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

  .cards { display: grid; gap: 16px; margin: 20px 0; }
  @media (min-width: 780px) { .cards--3 { grid-template-columns: repeat(3, 1fr); } .cards--2 { grid-template-columns: 1fr 1fr; } }
  .card { background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius); padding: 20px; }
  .card--quote { border-left: 5px solid var(--c-accent); }
  .card blockquote { font-style: italic; margin-bottom: 10px; }
  .card cite { font-family: var(--f-display); font-size: .8rem; font-weight: 700; font-style: normal; color: var(--c-muted); }

  table.plan { width: 100%; border-collapse: collapse; font-size: .98rem; margin: 16px 0; }
  .plan th, .plan td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--c-border); vertical-align: top; }
  .plan th { font-family: var(--f-display); font-size: .78rem; text-transform: uppercase; letter-spacing: .8px; color: var(--c-muted); }
  .tablewrap { overflow-x: auto; }

  .ticks { list-style: none; padding: 0; }
  .ticks li { position: relative; padding-left: 32px; }
  .ticks li::before { content: ""; position: absolute; left: 0; top: .25em; width: 20px; height: 20px; border-radius: 50%; background: var(--c-accent); }
  .ticks li::after { content: ""; position: absolute; left: 7px; top: .42em; width: 5px; height: 10px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
  .ticks--x li::before { background: var(--c-muted); } .ticks--x li::after { border: 0; content: "\00D7"; color: #fff; transform: none; left: 5px; top: .1em; font-weight: 800; }

  .faq details { border-bottom: 1px solid var(--c-border); padding: 14px 0; }
  .faq summary { font-family: var(--f-display); font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 14px; min-height: 28px; }
  .faq summary::-webkit-details-marker { display: none; }
  .faq summary::after { content: "+"; color: var(--c-accent); font-size: 1.6rem; line-height: 1; font-weight: 800; }
  .faq details[open] summary::after { content: "\2212"; }
  .faq .a { padding-top: 10px; }

  .offer { background: #fff; border: 2px solid var(--c-accent); border-radius: 12px; padding: 22px; }
  .offer .price { font-family: var(--f-display); font-weight: 800; font-size: 1.5rem; }
  .guarantee { background: #fff; border: 2px solid var(--c-accent); border-radius: 12px; padding: 22px; }

  /* forms */
  .form { background: #fff; border: 1px solid var(--c-border); border-radius: 12px; padding: 20px; box-shadow: 0 8px 30px rgba(0,0,0,.08); }
  .field { margin-bottom: 16px; }
  .field label, .field legend, .lab { display: block; font-family: var(--f-display); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--c-muted); margin-bottom: 6px; }
  .field input[type=text], .field input[type=email], .field input[type=tel], .field select, .field textarea {
    width: 100%; min-height: 48px; padding: 12px 14px; font-size: 1rem; border: 1px solid #8a8b8e; border-radius: 7px; background: #fff; }
  .field textarea { min-height: 110px; resize: vertical; }
  .field .help { font-size: .9rem; color: var(--c-muted); margin-top: 5px; }
  .field .err { display: none; color: var(--c-error); font-size: .95rem; margin-top: 5px; font-weight: 700; }
  .field.invalid .err { display: block; }
  .field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--c-error); border-width: 2px; }
  .row2 { display: grid; gap: 0 14px; } @media (min-width: 520px) { .row2 { grid-template-columns: 1fr 1fr; } }
  fieldset { border: 0; min-width: 0; }
  .opts { display: grid; gap: 8px; }
  .opt { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--c-border); border-radius: 8px; padding: 12px 14px; cursor: pointer; min-height: 48px; background: #fff; }
  .opt:has(input:checked) { border-color: var(--c-accent); background: var(--c-tint); box-shadow: inset 0 0 0 1px var(--c-accent); }
  .opt:has(input:focus-visible) { outline: 3px solid var(--c-focus); outline-offset: 2px; }
  .opt input { width: 22px; height: 22px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--p-green-dark); }
  .opt span { text-transform: none; letter-spacing: 0; font-family: var(--f-body); font-size: 1rem; font-weight: 400; color: var(--c-text); }
  .consent .opt { align-items: flex-start; }
  .consent .opt span { font-size: .92rem; line-height: 1.5; }
  .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
  .progress { margin-bottom: 20px; }
  .progress .lbl { font-family: var(--f-display); font-weight: 700; font-size: .85rem; margin-bottom: 8px; display: block; }
  .bar { height: 10px; background: var(--c-border); border-radius: 6px; overflow: hidden; }
  .bar i { display: block; height: 100%; width: 25%; background: var(--c-accent); transition: width .3s ease; }
  .step[hidden] { display: none; }
  .step > h2 { font-size: 1.35rem; }
  .status { min-height: 1.4em; margin-top: 12px; font-weight: 700; }
  .status.err { color: var(--c-error); }
  .notice { background: var(--c-tint); border-left: 5px solid var(--c-accent); padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; }

  .embed { background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius); overflow: hidden; }
  .embed iframe { width: 100%; min-height: 900px; border: 0; }
  .embed--none { padding: 28px 20px; text-align: center; color: var(--c-muted); }
  .face { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 3px solid var(--c-accent); }
  mark.todo { background: #fff3b0; color: #1a1a1a; padding: 0 3px; border-radius: 3px; }

  .ftr { background: var(--c-footer); color: #fff; padding: 30px 20px; font-size: .85rem; line-height: 1.8; text-align: center; }
  .ftr a { color: #fff; display: inline-block; padding: 4px 6px; }
  .ftr .fine { color: #d7d7d7; max-width: 760px; margin: 12px auto; }

  /* ---- AI consulting funnel additions ---- */
  .err { color: var(--c-error); font-weight: 700; font-size: .95rem; margin-top: 6px; }
  .step [data-pick-err] { display: none; }
  .step.invalid [data-pick-err] { display: block; }
  .step .field { margin-top: 16px; }
  .step .help { font-size: .95rem; color: var(--c-muted); margin: -.2em 0 12px; }
  .step .nav { margin-top: 20px; }
  .step .nav .btn { min-width: 0; }
  @media (min-width: 560px) { .step .nav .btn { min-width: 160px; } }
  .consent { margin: 20px 0; padding: 0; }
  .consent .opts { margin-top: 10px; }
  .disc { font-size: 1rem; line-height: 1.55; color: var(--c-text); background: var(--c-surface-alt); border-radius: 8px; padding: 12px 14px; margin: 14px 0; }
  .math-label { margin: 0 0 6px; color: var(--c-muted); }
  .quote { border-left: 5px solid var(--c-accent); padding-left: 14px; font-style: italic; margin: 8px 0 14px; }
  .who { display: flex; gap: 16px; align-items: center; }
  .who .face { flex: 0 0 auto; }
  .r-label { font-family: var(--f-display); font-size: 1.3rem; color: var(--c-link); margin-bottom: .4em; }
  .price { font-family: var(--f-display); font-weight: 800; font-size: 1.6rem; }
  .guarantee h2 { font-size: 1.3rem; }
  .notice p { margin: 0; }
  .js .plan-block { display: none; }
  .js .plan-block.on { display: block; }
  .embed[data-cal] { min-height: 760px; }
  #survey:focus { outline: none; }
  .sec--tint .form { margin-top: 20px; }
}

@layer utilities {
  .center { text-align: center; } .mt { margin-top: 20px; } .mt2 { margin-top: 32px; }
  .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  [hidden] { display: none !important; }
}
