/* EdwardsApps site styles.
   Identity comes from the EdwardsApps brand: the charcoal tile-grid mark with
   one lit green tile, and the lowercase geometric wordmark. The site is
   light-dominant — coal appears only as the hero band and the closing
   band/footer, never as the page ground. Green is the accent: deep green on
   light surfaces, lime on coal. The one signature element is the tile row
   (two quiet tiles, one lit) that fronts every kicker. Everything else quiet. */

:root {
  /* Colour tokens */
  --coal: #12161D;       /* brand charcoal: dark bands, buttons on light */
  --coal-raise: #1D2530; /* hover surface for coal fills (blue channel kept high) */
  --ink: #191A1F;        /* body text on light */
  --paper: #F6F7F6;      /* page background */
  --panel: #E9EDE9;      /* quiet panels, placeholder slots */
  --line: #D5DAD5;       /* row separators */
  --muted: #555D66;      /* secondary text on light */
  --green: #488F00;      /* brand green: accents and large elements on light */
  --green-ink: #3A7300;  /* interactive green on light (AA for text) */
  --lime: #AAEC58;       /* brand lime: accents and CTAs on coal only */

  /* Type */
  --font-display: "Poppins", "Segoe UI", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --step-5: clamp(2.1rem, 1.1rem + 3.8vw, 3.4rem);   /* hero h1 */
  --step-4: clamp(1.55rem, 1.15rem + 1.6vw, 2.1rem); /* h2 */
  --step-3: 1.45rem;                                 /* product names */
  --step-2: 1.25rem;                                 /* h3 */
  --step-1: 1.2rem;                                  /* lede */
  --step-0: 1.0625rem;                               /* body: 17px */

  /* Layout */
  --wrap: 68rem;
  --pad: clamp(1.25rem, 4vw, 2rem);
}

/* Display face matches the wordmark; latin subset, ~8KB per weight. */
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/poppins-600.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/poppins-700.woff2") format("woff2");
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  overflow-x: clip;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--green); text-underline-offset: 0.15em; }
a:hover { color: var(--green-ink); text-decoration-thickness: 2px; }

/* Lime stays a coal-band colour, even for text selection. */
::selection { background: var(--green-ink); color: #fff; }
.site-header ::selection,
.hero ::selection,
.band-contact ::selection,
.site-footer ::selection { background: var(--lime); color: var(--coal); }

:focus-visible { outline: 3px solid var(--green-ink); outline-offset: 2px; }
.site-header :focus-visible,
.hero :focus-visible,
.band-contact :focus-visible,
.site-footer :focus-visible { outline-color: var(--lime); }

@media (prefers-reduced-motion: no-preference) {
  a, .button, .nav-toggle { transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease; }
}

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.measure { max-width: 62ch; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 10;
  background: var(--lime);
  color: var(--coal);
  padding: 0.6em 1em;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ---- Header (sits on the hero's coal band) ---- */

.site-header { background: var(--coal); }

.nav {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 1.1rem var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand { display: inline-block; line-height: 0; }
.brand img { display: block; height: 32px; width: auto; }

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 2px; text-underline-offset: 0.3em; }

.nav-links .nav-cta {
  border: 2px solid rgba(255, 255, 255, 0.6);
  padding: 0.35em 0.85em;
}
.nav-links .nav-cta:hover { background: var(--coal-raise); text-decoration: none; }

.nav-toggle {
  display: none;
  font: 600 0.95rem var(--font-body);
  color: #fff;
  background: none;
  border: 2px solid rgba(255, 255, 255, 0.6);
  padding: 0.35em 0.85em;
  cursor: pointer;
}
.nav-toggle:hover { background: var(--coal-raise); }

/* ---- Hero: the page's one coal band (top) ---- */

.hero {
  background: var(--coal);
  color: #fff;
  padding: 3.5rem 0 4.5rem;
}
.hero h1 {
  font-size: var(--step-5);
  line-height: 1.12;
  max-width: 26ch;
  margin: 0.5rem 0 0;
}
.hero .lede {
  font-size: var(--step-1);
  color: rgba(255, 255, 255, 0.85);
  max-width: 58ch;
  margin-top: 1.4rem;
}
.hero a { color: #fff; text-decoration-color: var(--lime); }

/* ---- The signature: a tile row, one lit ---- */

.kicker {
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.5rem;
}
.kicker::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2.5px;
  background: var(--ink);
  box-shadow: 14px 0 0 var(--ink), 28px 0 0 var(--green);
  margin-right: 44px;
  vertical-align: 0.08em;
}
.hero .kicker { color: rgba(255, 255, 255, 0.75); }
.hero .kicker::before {
  background: #fff;
  box-shadow: 14px 0 0 #fff, 28px 0 0 var(--lime);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

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

.button {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.7em 1.4em;
  border-radius: 8px;
  text-decoration: none;
  border: 2px solid transparent;
}

.button-primary { background: var(--coal); color: #fff; }
.button-primary:hover { background: var(--coal-raise); color: #fff; }

.button-ghost { border-color: var(--coal); color: var(--ink); }
.button-ghost:hover { background: var(--panel); color: var(--ink); }

/* On coal the primary CTA is the lit tile: lime with coal text. */
.hero .button-primary,
.button-accent { background: var(--lime); color: var(--coal); }
.hero .button-primary:hover,
.button-accent:hover { background: #fff; color: var(--coal); }

.hero .button-ghost { border-color: rgba(255, 255, 255, 0.7); color: #fff; }
.hero .button-ghost:hover { background: var(--coal-raise); color: #fff; }

.band-contact .button-accent { margin-top: 0.75rem; }

/* ---- Sections ---- */

.section { padding: 3.5rem 0; }
.section-alt { background: var(--panel); }

.sheet-head { font-size: var(--step-4); max-width: 26ch; }

h3 { font-weight: 600; font-size: var(--step-2); }

/* ---- Product / feature rows ---- */

.daybook {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}
.daybook > li { padding: 1.9rem 0; }
.daybook > li + li { border-top: 1px solid var(--line); }
.daybook > li:first-child { padding-top: 0.5rem; }

.daybook-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  flex-wrap: wrap;
}
.daybook h3 { font-weight: 700; font-size: var(--step-3); margin-bottom: 0.35em; }
.daybook h3 a { text-decoration: none; }
.daybook h3 a:hover { color: var(--green-ink); text-decoration: underline; text-decoration-color: var(--green); text-decoration-thickness: 2px; }
.daybook-tag {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  margin: 0;
}
.daybook p { max-width: 62ch; }

/* Product rows carry their app icon. */
.product-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.4rem;
  align-items: start;
}
.product-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  display: block;
}

/* App icon atop each product page hero. */
.app-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  display: block;
  margin-bottom: 1.1rem;
}

/* Feature rows: text one side, screenshot slot the other. */
.daybook-features > li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem 2.5rem;
  align-items: center;
  padding: 2.4rem 0;
}

.feature-shot {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.shot-link { display: block; line-height: 0; }
.shot-link .feature-shot { cursor: zoom-in; }

/* Enlarged screenshot dialog. Must stay position:fixed — an absolutely
   positioned dialog sits in document space, so focusing it on open scrolls
   the page away from where the reader was. */
.shot-lightbox {
  position: fixed;
  inset: 0;
  margin: auto;
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(94vw, 1400px);
  max-height: 94vh;
  overflow: visible;
}
.shot-lightbox::backdrop { background: rgba(18, 22, 29, 0.88); }
.shot-frame { position: relative; }
.shot-lightbox img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 90vh;
  border-radius: 8px;
}
.shot-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: var(--coal);
  /* Ring keeps the button legible whatever the screenshot puts behind it. */
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.shot-close:hover { background: var(--coal-raise); }
.shot-lightbox :focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }

/* QCI section: two register shots side by side. */
.qci-shots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}
@media (max-width: 46em) {
  .qci-shots { grid-template-columns: 1fr; }
}

/* ---- Checklists (Almoner, services) ---- */

.checklist {
  list-style: none;
  margin: 1.25rem 0;
  padding: 0;
}
.checklist li {
  position: relative;
  padding-left: 1.7rem;
  margin: 0.7rem 0;
  max-width: 62ch;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 9px;
  height: 9px;
  border-radius: 2.5px;
  background: var(--green);
}

/* ---- Contact band: closes the page into the footer's coal ---- */

.band-contact {
  background: var(--coal);
  color: #fff;
  padding: 4rem 0;
}
.band-contact h2 {
  font-size: var(--step-4);
  color: #fff;
}
.band-contact p { color: rgba(255, 255, 255, 0.85); }
.band-contact a { color: #fff; text-decoration-color: var(--lime); }
.band-contact a.button-accent { text-decoration: none; color: var(--coal); }

/* ---- Footer ---- */

/* Every page ends in a coal element (contact band, or the 404's hero), so the
   footer joins it seamlessly — no border. */
.site-footer {
  background: var(--coal);
  color: #fff;
  padding: 3rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 1.5rem;
}
.footer-brand img { display: block; height: 26px; width: auto; margin-bottom: 0.9rem; }
.footer-brand p { color: rgba(255, 255, 255, 0.75); max-width: 34ch; }

.site-footer h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 0.8em;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0.45em 0; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover,
.site-footer a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--lime); }

.fineprint {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  margin: 0;
}

/* ---- Mobile ---- */

@media (max-width: 46em) {
  /* The collapse is a JS enhancement (html.js set inline in each <head>):
     without JS the menu renders expanded and no dead toggle appears. */
  .js .nav-toggle { display: block; }
  .nav { flex-wrap: wrap; }
  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    width: 100%;
    padding: 0.75rem 0 0.5rem;
  }
  .js .nav-links { display: none; }
  .js .nav-links.is-open { display: flex; }
  .nav-links a { display: inline-block; padding: 0.4em 0; }
  .nav-links .nav-cta { margin-top: 0.4rem; }

  .daybook-features > li { grid-template-columns: 1fr; }
  .product-icon { width: 56px; height: 56px; border-radius: 12px; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .section { padding: 2.75rem 0; }
  .hero { padding: 2.5rem 0 3.5rem; }
}
