/* ==========================================================================
   Teach Me Tech OC — stylesheet
   Hand-built. Warm, editorial, senior-first, WCAG 2.1 AA.
   Palette and type are intentionally restrained: one green identity,
   generous sizing, real hierarchy. No frameworks.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Color — verified for AA contrast on --cream (see /notes) */
  --cream:        #faf8f3;   /* page background (warm, not stark white) */
  --paper:        #ffffff;   /* cards */
  --sage-bg:      #e9f0e4;   /* soft green section tint */
  --sage-line:    #d7ded0;   /* hairline borders */
  --ink:          #22281f;   /* body text — ~13:1 on cream */
  --ink-soft:     #495144;   /* secondary text — ~7:1 on cream */
  --forest:       #2c5733;   /* primary brand green (buttons/links) */
  --forest-deep:  #21421f;   /* hover / headings */
  --forest-ink:   #1f3b23;   /* dark green headings on cream */
  --clay:         #a2541b;   /* warm accent, used sparingly */
  --focus:        #0b5cad;   /* focus ring — distinct from brand green */

  --maxw: 1120px;
  --prose: 66ch;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(20,30,20,.06), 0 8px 28px rgba(20,40,20,.07);
  --shadow-soft: 0 1px 2px rgba(20,30,20,.05);

  --step: clamp(1.6rem, 1.1rem + 1.6vw, 2.2rem);

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
}

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;          /* 18px base — senior-friendly */
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
strong { font-weight: 700; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--forest-ink);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
  font-optical-sizing: auto;
}
h1 { font-size: clamp(2.15rem, 1.5rem + 3vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 1.25rem + 1.8vw, 2.45rem); }
h3 { font-size: clamp(1.3rem, 1.1rem + 0.7vw, 1.6rem); }
h4 { font-size: 1.2rem; }
p  { margin: 0 0 1.1em; max-width: var(--prose); }
.lead { font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem); color: var(--ink-soft); line-height: 1.55; }

a { color: var(--forest); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--forest-deep); }
main a:not(.btn):not(.card-link) { text-decoration: underline; } /* don't rely on color alone */

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2.2rem); }
.section { padding-block: clamp(3rem, 2rem + 5vw, 5.5rem); }
.section--tint { background: var(--sage-bg); }
.section--forest { background: var(--forest-deep); color: #eef3ea; }
.section--forest h2, .section--forest h3 { color: #fff; }
.section--forest p { color: #dbe6d6; }
.narrow { max-width: 760px; }
.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .8rem;
  font-weight: 700;
  color: var(--clay);
  margin: 0 0 .8rem;
}
.section--forest .eyebrow { color: #e7b98c; }
.eyebrow .ico { width: 1.05em; height: 1.05em; vertical-align: -.12em; }
.center { text-align: center; }
.center p { margin-inline: auto; }

/* ---------- Skip link ---------- */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--forest-deep); color: #fff; padding: .8rem 1.2rem; border-radius: 0 0 8px 0;
  font-weight: 600;
}
.skip:focus { left: 0; }

/* ---------- Focus visibility (AA) ---------- */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 54px; padding: .7rem 1.5rem;
  font-family: var(--font-body); font-size: 1.075rem; font-weight: 600; line-height: 1.1;
  border-radius: 999px; border: 2px solid transparent; cursor: pointer;
  text-decoration: none; transition: background-color .15s ease, border-color .15s ease, transform .05s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--forest); color: #fff; border-color: var(--forest); }
.btn--primary:hover { background: var(--forest-deep); border-color: var(--forest-deep); color:#fff; }
.btn--ghost { background: transparent; color: var(--forest-deep); border-color: var(--forest); }
.btn--ghost:hover { background: rgba(44,87,51,.08); color: var(--forest-deep); }
.btn--onforest { background:#fff; color: var(--forest-deep); border-color:#fff; }
.btn--onforest:hover { background:#eef3ea; color: var(--forest-deep); }
.btn .ico { width: 1.25em; height: 1.25em; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: .9rem; align-items: center; }

/* ---------- Header / nav ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(250,248,243,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--sage-line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 74px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand img { height: 42px; width: auto; }
.brand .brand-txt { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; color: var(--forest-ink); letter-spacing: -.01em; }

.nav-toggle {
  display: none;
  align-items: center; gap: .5rem;
  background: var(--paper); border: 2px solid var(--sage-line); color: var(--forest-deep);
  border-radius: 10px; min-height: 48px; padding: 0 .9rem; font-weight: 600; font-size: 1rem; cursor: pointer;
}
.nav-toggle .ico { width: 1.4em; height: 1.4em; }

.main-nav ul { list-style: none; display: flex; align-items: center; gap: .15rem; margin: 0; padding: 0; }
.main-nav a {
  display: inline-flex; align-items: center; min-height: 46px; padding: .35rem .62rem; white-space: nowrap;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1rem; border-radius: 8px;
}
.main-nav a:hover { background: rgba(44,87,51,.08); color: var(--forest-deep); }
.main-nav a[aria-current="page"] { color: var(--forest-deep); box-shadow: inset 0 -3px 0 var(--clay); border-radius: 3px; }
.main-nav .nav-cta { margin-left: .4rem; }
.main-nav .nav-cta a { background: var(--forest); color:#fff; padding-inline: 1.1rem; }
.main-nav .nav-cta a:hover { background: var(--forest-deep); color:#fff; }

@media (max-width: 1160px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--cream); border-bottom: 1px solid var(--sage-line);
    padding: .6rem clamp(1.1rem,4vw,2.2rem) 1.1rem;
    box-shadow: var(--shadow);
  }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: .15rem; }
  .main-nav a { min-height: 54px; font-size: 1.12rem; padding-inline: .6rem; }
  .main-nav .nav-cta { margin-left: 0; margin-top: .4rem; }
  .main-nav .nav-cta a { justify-content: center; }
  /* JS-enhanced collapse */
  .js .main-nav[hidden] { display: none; }
  .js .main-nav { display: block; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(1.5rem, 3vw, 3.2rem); align-items: center; padding-block: clamp(2.6rem, 2rem + 4vw, 5rem); }
.hero h1 { margin-bottom: .35em; }
.hero .lead { margin-bottom: 1.6rem; }
.hero-trust { margin-top: 1.4rem; font-size: 1rem; color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; }
.hero-trust span { display: inline-flex; align-items: center; gap: .4rem; }
.hero-trust .ico { width: 1.15em; height: 1.15em; color: var(--forest); }
.hero-art {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(150deg, #35673d, #21421f);
  box-shadow: var(--shadow); aspect-ratio: 4 / 3;
}
.hero-art img { width: 100%; height: 100%; object-fit: cover; }
.hero-art--plain { display: grid; place-items: center; }
.hero-art--photo { aspect-ratio: 1100 / 614; background: none; }

/* Full-bleed page hero: image spans full width; copy sits directly on the photo
   over a gradient scrim that is dark only under the words and fades away across
   the image so the photo (and the people in it) read through clearly. */
.phero { position: relative; isolation: isolate; overflow: hidden; background: var(--forest-deep); }
.phero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.phero--flip .phero-img { transform: scaleX(-1); }

/* Default scrim = copy on the LEFT: dark hugs the left where the text is,
   then fades to fully transparent well before the right side of the photo. */
.phero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg,
    rgba(13,25,16,.93) 0%,
    rgba(13,25,16,.90) 34%,
    rgba(13,25,16,.60) 48%,
    rgba(13,25,16,.16) 62%,
    rgba(13,25,16,0)   74%);
}
/* Copy on the RIGHT: for photos whose people sit on the left, mirror the scrim. */
.phero--right::after {
  background: linear-gradient(270deg,
    rgba(13,25,16,.93) 0%,
    rgba(13,25,16,.90) 34%,
    rgba(13,25,16,.60) 48%,
    rgba(13,25,16,.16) 62%,
    rgba(13,25,16,0)   74%);
}

.phero-inner { display: flex; align-items: center; min-height: clamp(420px, 58vh, 600px); padding-block: clamp(2.6rem, 5vw, 4.2rem); }
.phero--right .phero-inner { justify-content: flex-end; }

/* The copy block: no box, no fill, text straight on the image. */
.phero-copy { color: #fff; max-width: 31rem; }
.phero-copy .eyebrow { color: #f0c39a; }
.phero-copy h1 { color: #fff; text-shadow: 0 2px 20px rgba(0,0,0,.45); }
.phero-copy .lead { color: #eef3ea; margin-bottom: 1.4rem; text-shadow: 0 1px 12px rgba(0,0,0,.42); }
.phero-copy .hero-trust { color: #dbe8d5; margin-top: 1.3rem; }
.phero-copy .hero-trust .ico { color: #cbe6c2; }
.phero-copy .btn--primary { background: #fff; color: var(--forest-deep); border-color: #fff; }
.phero-copy .btn--primary:hover { background: #eef3ea; color: var(--forest-deep); border-color: #eef3ea; }
.phero-copy .btn--ghost { color: #fff; border-color: rgba(255,255,255,.85); }
.phero-copy .btn--ghost:hover { background: rgba(255,255,255,.16); color: #fff; }

/* On phones: stack it. Photo becomes a band on top, copy sits on a solid
   dark panel beneath it, so contrast never depends on the image. */
@media (max-width: 720px) {
  .phero { isolation: auto; }
  .phero::after, .phero--right::after { display: none; }
  .phero-img { position: relative; inset: auto; z-index: auto; width: 100%; height: clamp(200px, 46vw, 300px); }
  .phero-inner { display: block; min-height: 0; padding-block: 0; }
  .phero--right .phero-inner { justify-content: flex-start; }
  .phero-copy { max-width: none; background: #122316; padding: clamp(1.4rem, 5vw, 1.9rem); border-radius: 0 0 16px 16px; }
}
.hero-card-body { padding: 1.7rem 1.6rem; }
.hero-card-title { font-family: var(--font-display); font-size: 1.2rem; color: #fff; margin: 0 0 1rem; max-width: none; }
.hero-card-list { margin: 0; }
.hero-art .hero-card-list li { color: #eef3ea; }
.hero-art .hero-card-list .ico { color: #bfe0b6; }
.hero-card-foot {
  display: flex; align-items: center; gap: .5rem;
  margin: 1.2rem 0 0; padding-top: .95rem; max-width: none;
  border-top: 1px solid rgba(255,255,255,.2);
  color: #d6e6cf; font-size: .95rem; font-weight: 600;
}
.hero-card-foot .ico { width: 1.15em; height: 1.15em; color: #bfe0b6; flex: none; }
@media (max-width: 800px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { order: -1; aspect-ratio: 16 / 10; }
}

/* ---------- Generic grids ---------- */
.grid { display: grid; gap: 1.4rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ---------- Cards / services ---------- */
.card {
  background: var(--paper); border: 1px solid var(--sage-line); border-radius: var(--radius);
  padding: 1.5rem 1.4rem; box-shadow: var(--shadow-soft);
}
.card h3 { margin-bottom: .35rem; }
.card p { margin-bottom: 0; color: var(--ink-soft); font-size: 1.02rem; }
.card .ico-badge {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: var(--sage-bg); color: var(--forest-deep); margin-bottom: 1rem;
}
.card .ico-badge .ico { width: 26px; height: 26px; }

/* ---------- Steps ---------- */
.steps { counter-reset: step; }
.step { position: relative; padding-left: 3.4rem; }
.step .num {
  position: absolute; left: 0; top: 0;
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: var(--forest); color: #fff; font-family: var(--font-display); font-weight: 600;
  display: grid; place-items: center; font-size: 1.2rem;
}
.step h3 { margin-bottom: .25rem; }
.step p { color: var(--ink-soft); margin-bottom: 0; }

/* ---------- Feature band (image + text) ---------- */
.band { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.4rem, 3vw, 3rem); align-items: center; }
.band--reverse .band-media { order: 2; }
.band-media img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; object-fit: cover; }
.band-media figure { margin: 0; }
.band-media figcaption { font-size: .92rem; color: var(--ink-soft); margin-top: .5rem; }
@media (max-width: 760px) { .band { grid-template-columns: 1fr; } .band--reverse .band-media { order: 0; } }

/* ---------- Keep-guide highlight ---------- */
.pull {
  border-left: 4px solid var(--clay); padding: .3rem 0 .3rem 1.2rem; margin: 1.5rem 0;
  font-family: var(--font-display); font-size: clamp(1.25rem, 1.1rem + .6vw, 1.6rem); color: var(--forest-ink); line-height: 1.35;
}

/* ---------- Testimonials ---------- */
.quote { background: var(--paper); border: 1px solid var(--sage-line); border-radius: var(--radius); padding: 1.6rem 1.5rem; box-shadow: var(--shadow-soft); }
.quote blockquote { margin: 0 0 1rem; font-size: 1.12rem; line-height: 1.55; color: var(--ink); }
.quote .cite { font-weight: 600; color: var(--forest-deep); font-style: normal; }
.stars { color: var(--clay); letter-spacing: 2px; margin-bottom: .7rem; }
.stars span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Service-area chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: .55rem; list-style: none; padding: 0; margin: 1rem 0 0; }
.chips li { background: var(--paper); border: 1px solid var(--sage-line); border-radius: 999px; padding: .45rem 1rem; font-weight: 600; color: var(--forest-deep); font-size: 1rem; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; }
.faq details { border: 1px solid var(--sage-line); border-radius: var(--radius-sm); background: var(--paper); margin-bottom: .8rem; box-shadow: var(--shadow-soft); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.1rem 1.3rem; font-weight: 600; font-size: 1.15rem; color: var(--forest-ink);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 56px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chev { transition: transform .2s ease; flex: none; width: 1.3em; height: 1.3em; color: var(--forest); }
.faq details[open] summary .chev { transform: rotate(180deg); }
.faq .faq-body { padding: 0 1.3rem 1.3rem; }
.faq .faq-body p { color: var(--ink-soft); margin-bottom: .6em; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band .phone { font-family: var(--font-display); font-size: clamp(1.8rem, 1.4rem + 2vw, 2.8rem); color: #fff; text-decoration: none; display: inline-block; margin: .3rem 0 1rem; }
.cta-band .phone:hover { text-decoration: underline; }

/* ---------- Contact blocks ---------- */
.contact-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
@media (max-width: 620px){ .contact-cards { grid-template-columns: 1fr; } }
.contact-card { background: var(--paper); border: 1px solid var(--sage-line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow-soft); }
.contact-card .ico-badge { width: 52px; height: 52px; border-radius: 12px; background: var(--sage-bg); color: var(--forest-deep); display: grid; place-items:center; margin-bottom: 1rem; }
.contact-card .ico-badge .ico { width: 28px; height: 28px; }
.contact-card .big { font-size: 1.35rem; font-weight: 700; color: var(--forest-deep); text-decoration: none; }
.contact-card .big:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { background: #1b3320; color: #d8e4d3; padding-block: 3rem 2rem; margin-top: 0; }
.site-footer a { color: #eaf2e6; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
@media (max-width: 760px){ .footer-grid { grid-template-columns: 1fr; gap: 1.6rem; } }
.site-footer h2 { color: #fff; font-family: var(--font-body); font-size: .85rem; font-weight: 700; line-height: 1.3; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 .9rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .5rem; }
.footer-brand img { height: 42px; width: auto; margin-bottom: .9rem; background:#fff; border-radius:10px; padding: 8px 12px; box-sizing: content-box; }
.footer-brand p { color: #bcd0b6; font-size: 1rem; }
.footer-contact a { text-decoration: none; font-weight: 600; }
.footer-social { display: flex; gap: .6rem; margin-top: .3rem; }
.footer-social a { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.25); border-radius: 10px; }
.footer-social .ico { width: 20px; height: 20px; color:#eaf2e6; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.16); margin-top: 2rem; padding-top: 1.3rem; display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; justify-content: space-between; font-size: .92rem; color: #a9c0a4; }
.footer-bottom a { color: #cfe0ca; }

/* ---------- Icons (inline SVG sprite) ---------- */
.ico { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: inline-block; vertical-align: middle; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.stack > * + * { margin-top: 1.1rem; }
.visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
.icon-list { list-style: none; padding: 0; margin: 1rem 0; }
.icon-list li { display: flex; gap: .7rem; align-items: flex-start; margin-bottom: .75rem; color: var(--ink); }
.icon-list .ico { width: 1.4em; height: 1.4em; color: var(--forest); flex: none; margin-top: .18em; }
