/*
 * HuiDots main site — production stylesheet.
 *
 * Design tokens sourced from `huidots_tokens.json` v5.1.0 Direction A
 * (canonical brand spec; HDO-550; Owner-accepted 2026-09-14).
 * HDO-665 split the Direction A green into two roles:
 *   --green       brand-graphic accent  (preserved #7BC143)
 *   --green-text  foreground-text role  (#3F7A1B, a11y-derived for Paper)
 * CSS cannot natively import JSON, so the canonical values are pre-bundled
 * below and documented at the `:root` declaration. The JSON file remains
 * the single source of truth; any future token change must land there first
 * and then be mirrored into this block by the Web Engineer.
 *
 * HuiDots palette · Direction A v5.1.0:
 *   HuiDots Teal    #00A79D
 *   HuiDots Navy    #0D1117
 *   HuiDots Green   #7BC143   ← brand-graphic accent (HDO-665)
 *   HuiDots Green-T #3F7A1B   ← foreground-text role, a11y-derived (HDO-665)
 *   Paper           #FBFBFB   ← page surface
 *   Ink Soft        #2A3142
 *   HuiDots Mint    #B9E1D5
 *   HuiDots Lime    #D7E869
 *   Cinnabar        #B73E3E
 *   Saffron         #D89545
 *   Porcelain       #3A6FB5
 */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  /* Color tokens — synced with huidots_tokens.json v4 Direction A */
  --ink: #10231f;          /* derived body-text colour (kept for legacy contrast tuning) */
  --paper: #FBFBFB;        /* canonical HuiDots Paper, was #f5f2ea */
  --white: #fffdf8;        /* warm white card surface (derived from Paper) */
  --mint: #B9E1D5;         /* HuiDots Mint */
  --green: #7BC143;        /* canonical HuiDots Green, brand-graphic role (HDO-665 split, was #155d4e) */
  --green-text: #3F7A1B;   /* a11y-derived foreground-text green (HDO-665 split; 5.06:1 on Paper) */
  --lime: #D7E869;         /* HuiDots Lime */
  --teal: #00A79D;         /* canonical HuiDots Teal */
  --line: rgba(16, 35, 31, .18); /* hairline divider, derived from ink */

  /* Layout tokens */
  --max: 1180px;           /* max content width */
  --space-section: 100px;  /* vertical section padding */

  /* Typography tokens */
  --font-display: Manrope, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --type-display-size: clamp(2.7rem, 5vw, 4.6rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
}
.skip-link { position: absolute; left: -999px; top: 8px; background: #fff; padding: .7rem; z-index: 20; }
.skip-link:focus { left: 8px; }
.site-header {
  height: 88px;
  max-width: var(--max);
  margin: auto;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand img { display: block; width: 150px; height: auto; }
.site-header nav { display: flex; gap: 30px; }
.site-header a, footer a { color: inherit; text-decoration: none; font-weight: 600; }
.site-header nav a:hover, footer a:hover { text-decoration: underline; text-underline-offset: 5px; }
.hero {
  max-width: var(--max);
  min-height: 660px;
  margin: auto;
  padding: 78px 28px 88px;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: 48px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .17em;
  font-size: .76rem;
  font-weight: 700;
  color: var(--green-text);
  margin: 0 0 18px;
}
.hero h1, .section h2 {
  font-family: var(--font-display);
  letter-spacing: -.055em;
  line-height: .98;
  margin: 0;
}
.hero h1 { font-size: clamp(3.3rem, 7.4vw, 6.8rem); font-weight: 600; }
.hero h1 em { font-style: normal; color: var(--green-text); }
.lede {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  max-width: 620px;
  margin: 30px 0 34px;
  color: #3c4d48;
}
.button, .app-card > a, .coming-soon {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  text-decoration: none;
  font-weight: 700;
}
.button { padding: 15px 22px; background: var(--ink); color: white; border-radius: 4px; }
.button:hover { background: var(--green); }
.hero-art {
  display: grid;
  place-items: center;
  min-height: 400px;
  background: var(--mint);
  border-radius: 48% 52% 45% 55% / 52% 42% 58% 48%;
  overflow: hidden;
}
.hero-art img { width: 72%; height: auto; }
.section { max-width: var(--max); margin: auto; padding: var(--space-section) 28px; }
.apps { border-top: 1px solid var(--line); }
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 48px;
}
.section h2 { font-size: var(--type-display-size); font-weight: 600; }
.app-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.app-card {
  min-height: 430px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.app-card:hover { transform: translateY(-4px); box-shadow: 0 15px 35px rgba(16, 35, 31, .09); }
.app-mark { height: 120px; display: flex; align-items: center; }
.app-mark img { max-width: 175px; max-height: 90px; width: auto; height: auto; }
.placeholder-mark img { width: 60px; }
.app-type {
  margin: 14px 0 4px;
  color: var(--green-text);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 700;
}
.app-card h3 {
  font: 600 2.1rem var(--font-display);
  letter-spacing: -.04em;
  margin: 0;
}
.app-card > p:not(.app-type) { color: #4b5b57; margin: 14px 0 28px; }
.app-card > a, .coming-soon {
  color: var(--ink);
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  justify-content: space-between;
}
.app-card > a:hover { color: var(--green); }
.coming-soon { color: #697671; }
.about {
  background: var(--ink);
  color: white;
  max-width: none;
  padding-left: max(28px, calc((100vw - var(--max)) / 2 + 28px));
  padding-right: max(28px, calc((100vw - var(--max)) / 2 + 28px));
  display: grid;
  grid-template-columns: .7fr 1.3fr;
  gap: 70px;
}
.about .eyebrow { color: var(--lime); }
.about p:last-child { font-size: 1.22rem; max-width: 670px; color: #c7d2cd; }
.contact { display: grid; grid-template-columns: .8fr 1.2fr; gap: 90px; }
.contact-copy > p:last-child { max-width: 390px; color: #53615d; font-size: 1.08rem; }
form { display: grid; gap: 20px; }
.field { display: grid; gap: 7px; }
.field label {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
}
input, textarea {
  border: 0;
  border-bottom: 1px solid #73807b;
  background: transparent;
  border-radius: 0;
  padding: 12px 3px;
  font: inherit;
  color: inherit;
  resize: vertical;
}
input:focus, textarea:focus {
  outline: 2px solid var(--green);
  outline-offset: 4px;
  border-color: transparent;
}
button {
  justify-self: start;
  border: 0;
  background: var(--green);
  color: var(--ink);                     /* HDO-713: was `white` (2.2:1 fail); now --ink on --green = ~7:1 PASS-AA */
  padding: 15px 23px;
  font: 700 1rem inherit;
  border-radius: 4px;
  cursor: pointer;
}
button:hover {
  background: var(--ink);
  color: white;                          /* HDO-713: explicit override — was implicit via button{color: white} */
}
button:disabled { opacity: .65; cursor: wait; }
.trap { position: absolute; left: -9999px; }
#form-status { min-height: 1.5em; margin: 0; font-weight: 600; }
.success { color: #0c6a45; }
.error { color: #9c2e24; }
footer {
  max-width: var(--max);
  margin: auto;
  padding: 35px 28px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 40px;
  align-items: center;
  border-top: 1px solid var(--line);
  font-size: .87rem;
}
footer img { width: 115px; height: auto; }
footer nav { display: flex; gap: 22px; }
@media (max-width: 800px) {
  .site-header nav { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 55px; min-height: auto; }
  .hero-art { min-height: 300px; grid-row: 1; }
  .section-heading { display: block; }
  .app-grid { grid-template-columns: 1fr; }
  .app-card { min-height: 360px; }
  .about, .contact { grid-template-columns: 1fr; gap: 38px; }
  .contact { padding-top: 75px; }
  footer { grid-template-columns: 1fr; gap: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .app-card { transition: none; }
}
