/* 25th Hour Engineering — shared styles */

:root {
  --paper: #e4e6e4;
  --paper-deep: #d9dcd9;
  --ink: #14181c;
  --muted: #5e6763;
  --rule: #c5c8c5;
  --blue: #2438c9;
  --hour: #e8a233;

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --text: "Newsreader", Georgia, "Times New Roman", serif;

  --measure: 62ch;
  --gutter: clamp(1.25rem, 5vw, 4.5rem);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: clamp(1.0625rem, 0.98rem + 0.4vw, 1.1875rem);
  line-height: 1.66;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--hour); color: var(--ink); }

a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--blue); color: var(--blue); }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.shell {
  width: min(78rem, 100%);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--display);
  font-size: 0.9375rem;
  padding: 0.6rem 1rem;
  z-index: 10;
}
.skip:focus { left: 0.75rem; top: 0.75rem; }

/* ---------- masthead ---------- */

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-block: 1.75rem 0;
}

.wordmark {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.005em;
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 0.5ch;
}

.wordmark .hour-glyph { color: var(--blue); }

.masthead nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2.25rem);
  font-family: var(--display);
  font-size: 0.9375rem;
  font-weight: 500;
}

.masthead nav a { text-decoration: none; color: var(--muted); }
.masthead nav a:hover { color: var(--ink); }

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  padding-block: clamp(3.5rem, 9vw, 7rem) clamp(3rem, 7vw, 5.5rem);
}

.hero h1 {
  font-family: var(--display);
  font-weight: 600;
  font-variation-settings: "wdth" 112;
  font-size: clamp(2.6rem, 1.4rem + 4.6vw, 5.25rem);
  line-height: 0.96;
  letter-spacing: -0.022em;
  margin: 0 0 1.4rem;
  text-wrap: balance;
}

.hero p { max-width: 46ch; margin: 0 0 1.1rem; color: var(--muted); }
.hero p.lede { color: var(--ink); font-size: 1.12em; }

.dial-wrap { justify-self: center; width: min(100%, 25rem); }
.dial { width: 100%; height: auto; display: block; overflow: visible; }

.dial .tick { stroke: var(--ink); stroke-width: 1.25; opacity: 0.4; }
.dial .tick.major { opacity: 0.75; stroke-width: 1.75; }
.dial .ring { fill: none; stroke: var(--rule); stroke-width: 1; }
.dial .hub { fill: var(--ink); }

.dial .hand {
  stroke: var(--blue);
  stroke-width: 2.25;
  stroke-linecap: round;
  transform-origin: 160px 160px;
  transform: rotate(7.5deg);
}

.dial .extra { stroke: var(--hour); stroke-width: 3; stroke-linecap: round; }
.dial .extra-dot { fill: var(--hour); }
.dial .extra-label {
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  fill: var(--ink);
}
.dial .dial-num {
  font-family: var(--display);
  font-weight: 500;
  font-size: 11px;
  fill: var(--muted);
}

@media (prefers-reduced-motion: no-preference) {
  .dial .hand { animation: sweep 2.3s cubic-bezier(0.16, 0.9, 0.2, 1) 0.35s both; }
  .dial .extra,
  .dial .extra-dot,
  .dial .extra-label { animation: arrive 0.9s ease-out 2.2s both; }
}

@keyframes sweep {
  from { transform: rotate(-352.5deg); }
  to   { transform: rotate(7.5deg); }
}

@keyframes arrive {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---------- sections ---------- */

.band { border-top: 1px solid var(--rule); padding-block: clamp(3rem, 7vw, 5.5rem); }

h2 {
  font-family: var(--display);
  font-weight: 600;
  font-variation-settings: "wdth" 108;
  font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.6rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin: 0 0 1.25rem;
}

h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.005em;
  margin: 0 0 0.4rem;
}

.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1.05em; }
.prose p:last-child { margin-bottom: 0; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
}

.split > h2 { margin-bottom: 0; }

/* ---------- ledger ---------- */

.ledger > div {
  display: grid;
  grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
  gap: clamp(0.75rem, 4vw, 3rem);
  padding-block: 1.6rem;
  border-top: 1px solid var(--rule);
}

.ledger > div:first-child { border-top: none; padding-top: 0.25rem; }
.ledger p { margin: 0; color: var(--muted); max-width: 54ch; }

/* ---------- creed ---------- */

.creed {
  font-family: var(--display);
  font-weight: 500;
  font-variation-settings: "wdth" 104;
  font-size: clamp(1.6rem, 1rem + 2.4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.018em;
  max-width: 24ch;
  margin: 0;
}

.creed .mark { color: var(--hour); }

/* ---------- contact ---------- */

.contact-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
  font-family: var(--display);
  font-size: 0.9375rem;
  color: var(--muted);
}

.contact-list strong { font-weight: 600; color: var(--ink); font-size: 1.0625rem; }

.mailto {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  color: var(--blue);
  text-decoration: none;
  border-bottom: 2px solid var(--blue);
  padding-bottom: 2px;
}
.mailto:hover { background: var(--blue); color: var(--paper); border-bottom-color: transparent; }

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

footer {
  border-top: 1px solid var(--rule);
  background: var(--paper-deep);
  padding-block: clamp(2.25rem, 5vw, 3.5rem);
  font-family: var(--display);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 2rem clamp(1.5rem, 5vw, 4rem);
  align-items: start;
}

footer p { margin: 0 0 0.6rem; color: var(--muted); max-width: 48ch; }
footer nav { display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; }
footer a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule); }
footer a:hover { border-bottom-color: var(--blue); }
.entity { color: var(--ink); }

/* ---------- legal pages ---------- */

.legal { padding-block: clamp(2.5rem, 6vw, 4rem) clamp(3rem, 7vw, 5rem); }

.legal h1 {
  font-family: var(--display);
  font-weight: 600;
  font-variation-settings: "wdth" 110;
  font-size: clamp(2.1rem, 1.5rem + 2.4vw, 3.25rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

.effective {
  font-family: var(--display);
  font-size: 0.9375rem;
  color: var(--muted);
  margin: 0 0 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
  max-width: var(--measure);
}

.legal section { max-width: var(--measure); margin-bottom: 2.5rem; }

.legal h2 {
  font-size: clamp(1.25rem, 1.05rem + 0.6vw, 1.5rem);
  margin-bottom: 0.65rem;
}

.legal p, .legal li { margin: 0 0 0.9em; }
.legal ul { padding-left: 1.2em; margin: 0 0 1em; }
.legal li { margin-bottom: 0.45em; }
.legal li::marker { color: var(--muted); }

.callout {
  border-left: 2px solid var(--blue);
  padding: 0.15rem 0 0.15rem 1.15rem;
  margin: 0 0 1.5rem;
}

.toc {
  list-style: none;
  padding: 0;
  margin: 0 0 3rem;
  max-width: var(--measure);
  columns: 2;
  column-gap: 2rem;
  font-family: var(--display);
  font-size: 0.9375rem;
}
.toc li { margin-bottom: 0.4rem; break-inside: avoid; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--blue); }

.legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.25rem;
  font-size: 0.9375rem;
}
.legal th, .legal td {
  text-align: left;
  vertical-align: top;
  padding: 0.7rem 1rem 0.7rem 0;
  border-bottom: 1px solid var(--rule);
}
.legal th {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--ink);
}
.legal td { color: var(--muted); }

/* ---------- responsive ---------- */

@media (max-width: 62rem) {
  .hero { grid-template-columns: 1fr; gap: 2.5rem; }
  .dial-wrap { order: -1; width: min(100%, 19rem); justify-self: start; }
  .split, .foot-grid { grid-template-columns: 1fr; }
  .ledger > div { grid-template-columns: 1fr; gap: 0.35rem; }
}

@media (max-width: 34rem) {
  .toc { columns: 1; }
  .masthead nav { gap: 1.1rem; }
  .legal table, .legal thead, .legal tbody, .legal tr, .legal th, .legal td { display: block; }
  .legal th { border-bottom: none; padding-bottom: 0.2rem; }
}

.legal h3 { margin: 1.75rem 0 0.5rem; font-size: 1.0625rem; }
.legal h3 + ul { margin-top: 0.25rem; }

/* ---------- support contact card ---------- */

.contact-card {
  margin: 0 0 1rem;
  display: grid;
  gap: 1.5rem clamp(1.5rem, 5vw, 3.5rem);
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}
.contact-card > div { border-top: 1px solid var(--rule); padding-top: 0.9rem; }
.contact-card dt {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.45rem;
}
.contact-card dd { margin: 0; color: var(--muted); line-height: 1.55; }
.contact-card dd a { color: var(--blue); text-decoration: none; border-bottom: 1px solid var(--rule); }
.contact-card dd a:hover { border-bottom-color: var(--blue); }
