/* groundedsecurity.io — one page, read in under a minute.
   No webfonts, no script, no third-party requests. */

:root {
  --paper:  #fbfaf7;
  --ink:    #17170f;
  --soft:   #5a5a50;
  --mute:   #6e6e63;   /* 4.94:1 on --paper. #85857a was 3.57:1 and failed AA */
  --rule:   #e0ddd2;
  --accent: #1d6b46;

  --pad: 1.5rem;
  --top: 4.5rem;

  --serif: Charter, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #12140f; --ink: #f3f2ea; --soft: #b3b5a8;
    --mute: #83867a; --rule: #2b2e26; --accent: #62c496;
  }
}
:root[data-theme="dark"] {
  --paper: #12140f; --ink: #f3f2ea; --soft: #b3b5a8;
  --mute: #83867a; --rule: #2b2e26; --accent: #62c496;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.62;
  overflow-wrap: break-word;
}

.page { max-width: 34rem; margin: 0 auto; padding: var(--top) var(--pad) 5rem; }

a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* masthead: lockup on the left, theme toggle on the right */
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 1.5rem; }
.lockup { display: flex; align-items: center; gap: 0.85rem; margin: 0; text-decoration: none; color: inherit; min-width: 0; }
.mark { display: block; width: 40px; height: 40px; flex: 0 0 auto; overflow: visible; }
.mark path { fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: square; }
.lockup .nm {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(1.4rem, 1.25rem + 0.6vw, 1.7rem);
  line-height: 1;
  letter-spacing: -0.021em;
  margin: 0;
}
a.lockup:hover .nm { color: var(--accent); }

/* theme toggle: quiet, but findable. Hidden until theme.js reveals it. */
.theme {
  flex: 0 0 auto;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
  background: none;
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 0.32rem 0.55rem;
  cursor: pointer;
  line-height: 1;
}
.theme:hover { color: var(--ink); border-color: var(--mute); }
.theme:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* the tagline, now a subhead under the name */
.tagline {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 1.1rem + 0.55vw, 1.4rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.014em;
  margin: 0 0 0.85rem;
  text-wrap: balance;
}

.who { color: var(--soft); margin: 0; }

h2 {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 0 0 0.9rem;
}

section { margin-top: 3.25rem; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 650; }

/* prices */
.price { display: flex; justify-content: space-between; align-items: baseline; gap: 1.25rem; padding: 0.7rem 0; border-top: 1px solid var(--rule); }
.price:last-of-type { border-bottom: 1px solid var(--rule); }
.price .n { min-width: 0; }
.price .n small { display: block; color: var(--mute); font-size: 0.875rem; line-height: 1.45; margin-top: 0.1rem; }
.price .v { font-family: var(--serif); font-size: 1.125rem; font-weight: 600; color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
.price .v.q { font-family: var(--sans); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.after { font-size: 0.9375rem; color: var(--mute); margin-top: 0.9rem; }

/* contact + footer */
.mail { font-size: 1.125rem; margin-bottom: 0.8rem; }
footer { margin-top: 2.5rem; font-size: 0.8125rem; color: var(--mute); }
footer p { margin: 0 0 0.3rem; }

/* ---- narrow: the container has stopped having margins ---- */
@media (max-width: 34rem) {
  .mark { width: 34px; height: 34px; }
  .lockup { gap: 0.7rem; }
}

/* ---- phones ---- */
@media (max-width: 30rem) {
  :root { --pad: 1.15rem; --top: 3rem; }
  section { margin-top: 2.75rem; }
  .price { gap: 0.85rem; padding: 0.8rem 0; }
  .price .v { font-size: 1.0625rem; }
  .tagline { letter-spacing: -0.01em; }
}

/* ---- very small phones: 320px still has to work ---- */
@media (max-width: 22rem) {
  :root { --pad: 0.95rem; }
  .theme { padding: 0.28rem 0.4rem; letter-spacing: 0.06em; }
  .price { gap: 0.6rem; }
  .price .n small { font-size: 0.84rem; }
}

/* ---- short viewports, mostly phones in landscape ---- */
@media (max-height: 30rem) {
  :root { --top: 2.25rem; }
}

@media print {
  :root { --paper:#fff; --ink:#000; --soft:#333; --mute:#555; --rule:#ccc; --accent:#000; }
  .page { max-width: none; padding: 0; }
  a { text-decoration: none; }
  section, .price { break-inside: avoid; }
  .theme { display: none; }
  .page a[href^="mailto"]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
