/* EMS shell — homepage styling.
   A deliberately simple directory for the site's tools and learning resources. Header/footer use
   the same identity as the calculator, while the responsive card grid can grow as features launch.
   Tokens mirror app.css deliberately — if a third surface appears, lift them into one shared file
   rather than copying them again. Always-light, like the simulator. */

:root {
  color-scheme: light;
  --brand-green: #00b22d;   /* sampled from the EMS logo */
  --green-deep: #0a6b52;    /* simulator's --teal-deep; WCAG-AA with white text */
  --green-darker: #085240;
  --footer-bg: #123a2c;     /* deep green, in the simulator's family rather than the legacy olive */
  --footer-bar: #0d2b21;
  --bg: #f5f7f6;
  --surface: #ffffff;
  --text: #21303b;
  --muted: #5b6670;         /* WCAG-AA on white */
  --line: #e3e8ec;
  --green-soft: #eaf8ef;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 35, 63, 0.06), 0 6px 20px rgba(16, 35, 63, 0.05);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* One compact scale for every current and future EMS surface. */
  --ems-gutter: 24px;
  --ems-gutter-compact: 16px;
  --ems-space-1: 8px;
  --ems-space-2: 12px;
  --ems-space-3: 16px;
  --ems-space-4: 24px;
  --ems-text-small: 0.8rem;
  --ems-text-body: 1rem;
  --ems-text-section: 1.25rem;
  --ems-text-page: 2rem;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;         /* footer sits at the bottom on a short page */
}

main { flex: 1 0 auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Keyboard users must always be able to see where they are (design philosophy §43). */
a:focus-visible, .skip:focus-visible {
  outline: 2px solid var(--green-deep);
  outline-offset: 3px;
  border-radius: 4px;
}
.site-footer a:focus-visible { outline-color: #fff; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 10;
  background: var(--surface); color: var(--green-deep);
  padding: 10px 16px; font-weight: 600;
}
.skip:focus { left: 12px; top: 12px; }

.wrap { width: min(1120px, calc(100% - 48px)); margin: 0 auto; }

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

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 84px;
  padding: 0 28px;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(22px, 3vw, 42px);
  margin-left: 32px;
}
.site-nav a {
  position: relative;
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--green-deep); }
.site-nav a[aria-current="page"] { color: var(--green-deep); }
.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -10px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--brand-green);
}
.brand { text-decoration: none; color: var(--green-deep); }
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.08;
}
.brand-lockup img {
  display: block;
  width: 46px;
  height: 46px;
  flex: none;
}

/* ---------- main ---------- */

.features {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 84px);
  min-height: 760px;
  padding: clamp(36px, 5vw, 58px) 0 clamp(42px, 6vw, 68px);
}

.features-title {
  max-width: 980px;
  margin: 0 auto clamp(26px, 3vw, 36px);
  color: var(--text);
  text-align: center;
}
.features-title::before {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: var(--brand-green);
}
.features-title-primary {
  display: block;
  font-size: clamp(1.65rem, 2.7vw, 2.25rem);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.025em;
  white-space: nowrap;
}
.features-title-support {
  display: block;
  margin-top: 8px;
  color: var(--green-deep);
  font-size: clamp(1.05rem, 1.55vw, 1.3rem);
  font-weight: 550;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 20px;
}

@media (max-width: 760px) {
  .features {
    display: block;
    height: auto;
    min-height: 0;
  }
  .features-title-primary { white-space: normal; }
}

.feature-card {
  display: flex;
  flex-direction: column;
  min-height: 280px;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  color: inherit;
}
.feature-card-live {
  border-top: 3px solid var(--brand-green);
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.feature-card-live:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(16, 35, 63, 0.07), 0 10px 28px rgba(16, 35, 63, 0.09);
}
.feature-card-soon {
  border-color: #bfc6c2;
  border-style: dashed;
  background: #eef1ef;
  box-shadow: none;
  opacity: 0.66;
  filter: saturate(0.35);
}
.feature-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 24px;
  border-radius: 12px;
  background: var(--green-soft);
  color: var(--green-deep);
  font-size: 1.15rem;
  font-weight: 750;
}
.feature-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.feature-card-live .feature-icon {
  background: var(--green-deep);
  color: #fff;
  box-shadow: 0 5px 14px rgba(10, 107, 82, 0.2);
}
.feature-card-soon .feature-icon {
  background: #d9ddda;
  color: #56615b;
}
.feature-copy { max-width: 46ch; }
.feature-card h2 {
  margin: 0 0 9px;
  font-size: 1.25rem;
  font-weight: 650;
  color: var(--green-deep);
  letter-spacing: -0.005em;
}
.feature-card p { margin: 0; color: var(--muted); font-size: 0.98rem; }
.feature-points {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--muted);
  font-size: 0.98rem;
}
.feature-points li + li { margin-top: 7px; }
.useful-tools-list a {
  color: var(--green-deep);
  font-weight: 650;
  text-underline-offset: 3px;
}
.useful-tools-list a:hover { color: var(--green-darker); }
.feature-qualifications {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 18px;
  margin-top: 12px;
  font-size: 0.88rem;
}
.feature-qualifications li + li { margin-top: 0; }
.feature-status {
  position: absolute;
  top: 24px;
  right: 24px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef1ef;
  color: #536058;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

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

.site-footer {
  flex-shrink: 0;
  background: var(--footer-bg);
  color: #fff;
  margin-top: auto;
}
.footer-inner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: clamp(32px, 4vw, 72px);
  row-gap: 32px;
  width: 100%;
  padding: 46px 28px 38px;
}
.footer-lockup {
  margin: 0;
  color: #fff;
}
.footer-line {
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.94rem;
  max-width: 34ch;
}
.footer-col h2 {
  margin: 0 0 14px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 9px; font-size: 0.94rem; color: rgba(255, 255, 255, 0.86); }
.footer-col a { color: rgba(255, 255, 255, 0.86); text-decoration: none; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-status {
  margin-left: 5px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--footer-bar);
}
.footer-bar p {
  margin: 0;
  padding: 15px 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.68);
}
.footer-bar .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}
.footer-bar .company-details {
  max-width: 82ch;
  text-align: right;
  font-size: 0.75rem;
}
.footer-bar .wrap { width: 100%; padding-left: 28px; padding-right: 28px; }

/* ---------- information pages ---------- */

.info-main { background: var(--bg); }
.info-page {
  width: min(760px, calc(100% - 48px));
  margin: 0 auto;
  padding: clamp(46px, 7vw, 78px) 0 clamp(64px, 9vw, 100px);
}
.info-page .eyebrow {
  margin: 0 0 8px;
  color: var(--green-deep);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.info-page h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.info-page .lede { margin: 0 0 38px; color: var(--muted); font-size: 1.08rem; }
.info-page h2 { margin: 34px 0 10px; color: var(--green-deep); font-size: 1.2rem; }
.info-page p, .info-page li { color: var(--muted); }
.info-page ul { padding-left: 1.25rem; }
.info-page a { color: var(--green-deep); }
.info-page .updated { margin-top: 42px; font-size: 0.84rem; }

@media (prefers-reduced-motion: reduce) {
  .feature-card-live, .feature-card-live:hover { transition: none; transform: none; }
}

@media (max-width: 860px) {
  .footer-inner { grid-template-columns: repeat(3, 1fr); gap: 30px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bar .wrap { display: block; }
  .footer-bar .company-details { padding-top: 0; text-align: left; }
}

@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  .header-inner { min-height: 0; padding: 14px 16px; flex-wrap: wrap; gap: 12px; }
  .brand-lockup { gap: 12px; font-size: 1.15rem; }
  .brand-lockup img { width: 40px; height: 40px; }
  .site-nav { width: 100%; justify-content: space-between; gap: 12px; margin-left: 0; }
  .site-nav a { font-size: 0.82rem; }
  .site-nav a[aria-current="page"]::after { bottom: -7px; }
  .features { min-height: 0; padding-top: 38px; padding-bottom: 52px; }
  .features-title { min-height: 137px; margin-bottom: 24px; font-size: 1.45rem; }
  .features-title::before { width: 34px; margin-bottom: 12px; }
  .feature-grid { grid-template-columns: 1fr; gap: 14px; }
  .feature-card { min-height: 296px; padding: 24px; }
  .feature-status { top: 20px; right: 20px; }
  .footer-inner { grid-template-columns: 1fr; padding: 34px 16px 28px; }
  .footer-bar .wrap { padding-left: 16px; padding-right: 16px; }
  .info-page { width: calc(100% - 32px); padding-top: 38px; }
}

@media (max-width: 380px) {
  .wrap { width: calc(100% - 24px); }
  .brand-lockup img { width: 36px; height: 36px; }
  .brand-lockup span { display: none; }
  .site-nav { margin-left: 12px; }
  .feature-card { padding: 21px; }
  .feature-status { top: 18px; right: 18px; font-size: 0.66rem; }
  .feature-qualifications { grid-template-columns: 1fr; }
}

/* Shared EMS responsive layout foundation. */
