/* Dial Authenticator. One stylesheet, system fonts, no external requests. */

:root {
  --paper: #F6F2EA;
  --paper-2: #EEE7D9;
  --ink: #16181D;
  --ink-body: #2F3239;
  --ink-2: #4A4D55;
  --ink-3: #66686F;
  --rule: #DDD4C3;
  --rule-strong: #C2B59D;
  --brass: #7A5C24;
  --brass-light: #C9A96A;
  --on-ink: #D9D4CA;
  --on-ink-2: #BDB8AE;
  --on-ink-3: #8E8A82;
  --on-ink-rule: rgba(246, 242, 234, .14);

  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --max: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --header-h: 4.25rem;
}

/* Base */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-body);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(2.1rem, 4vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

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

strong { font-weight: 600; color: var(--ink); }

::selection { background: rgba(201, 169, 106, .45); color: var(--ink); }

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

[id] { scroll-margin-top: calc(var(--header-h) + 1.25rem); }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: .6rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font-size: .9rem;
  text-decoration: none;
  border-radius: 2px;
}
.skip-link:focus { top: 1rem; }

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 242, 234, .9);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.2rem;
  letter-spacing: .005em;
  text-decoration: none;
  white-space: nowrap;
}
.brand .mark { width: 28px; height: 28px; flex: none; }

.site-nav { display: flex; align-items: center; gap: 2.25rem; }

.nav-list {
  display: flex;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-list a {
  color: var(--ink-2);
  font-size: .9rem;
  text-decoration: none;
  transition: color .15s ease;
}
.nav-list a:hover { color: var(--ink); }

/* Buttons and links */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .85rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--sans);
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: .01em;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: #2B2F38; }
.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn-sm { padding: .5rem .95rem; font-size: .85rem; }
.btn-lg { padding: 1rem 1.75rem; font-size: 1rem; }

.link-arrow {
  padding-bottom: 2px;
  border-bottom: 1px solid var(--rule-strong);
  color: var(--ink);
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color .15s ease;
}
.link-arrow:hover { border-color: var(--ink); }

/* Labels */

.eyebrow,
.section-label {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin: 0 0 1.5rem;
  color: var(--brass);
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 2.25rem;
  height: 1px;
  background: currentColor;
}
.section-label span {
  display: inline-flex;
  align-items: center;
  gap: .9rem;
  color: var(--ink-3);
}
.section-label span::after {
  content: "";
  width: 1.5rem;
  height: 1px;
  background: var(--rule-strong);
}

/* Hero */

.hero { padding-top: clamp(3rem, 7vw, 5.5rem); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero h1 {
  margin-bottom: 1.75rem;
  font-size: clamp(3rem, 7.2vw, 5.75rem);
  line-height: .98;
  letter-spacing: -0.028em;
}
.hero h1 em { font-style: italic; }

.lead {
  max-width: 33rem;
  color: var(--ink-2);
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  line-height: 1.6;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 1.75rem;
  margin: 2.25rem 0 2rem;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  padding: .45rem .85rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: rgba(255, 255, 255, .4);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: .76rem;
  letter-spacing: .03em;
  line-height: 1.4;
}
.status-dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 0 3px rgba(122, 92, 36, .16);
}

.hero-figure { margin: 0; }
.hero-dial { width: 100%; height: auto; }
.dial-seconds {
  transform-origin: 0 0;
  animation: dial-seconds 60s steps(300) infinite;
}
@keyframes dial-seconds {
  from { transform: rotate(210deg); }
  to { transform: rotate(570deg); }
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem 2rem;
  margin: clamp(3rem, 6vw, 4.5rem) 0 0;
}
.facts > div {
  padding-top: 1rem;
  border-top: 1px solid var(--rule-strong);
}
.facts dt {
  margin-bottom: .45rem;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.facts dd {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.12rem;
  line-height: 1.4;
}

/* Sections */

.section { padding-block: clamp(4.5rem, 9vw, 7.5rem); }
.section-tint { background: var(--paper-2); }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.25rem clamp(2rem, 6vw, 5rem);
  align-items: end;
  margin-bottom: clamp(2.5rem, 5vw, 3.75rem);
}
.section-head .section-label { grid-column: 1 / -1; margin-bottom: 0; }
.section-head h2 { max-width: 16ch; }

.section-intro {
  max-width: 34rem;
  margin: 0;
  color: var(--ink-2);
  font-size: 1.08rem;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 2rem clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.split-head h2 { max-width: 13ch; }

.prose { max-width: 38rem; font-size: 1.08rem; }

/* How it works */

.answers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 0 0 clamp(3rem, 6vw, 4.5rem);
  padding: 0;
  list-style: none;
}
.answer {
  position: relative;
  padding: 1.75rem 1.75rem 2rem;
  border: 1px solid var(--rule);
  background: var(--paper);
}
.answer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  height: 3px;
  background: var(--ink-2);
}
.answer-found::before { background: var(--brass); }
.answer-unsure::before {
  background: repeating-linear-gradient(90deg, var(--ink-3) 0 10px, transparent 10px 16px);
}
.answer-tag {
  display: block;
  margin-bottom: 1.6rem;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.answer h3 { margin-bottom: .75rem; font-size: 1.55rem; line-height: 1.2; }
.answer p { color: var(--ink-2); font-size: 1rem; }

.notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem 2.5rem;
}
.notes > div { padding-top: 1.25rem; border-top: 1px solid var(--rule-strong); }
.notes h3 { margin-bottom: .6rem; font-size: 1.25rem; line-height: 1.3; }
.notes p { color: var(--ink-2); font-size: 1rem; }

/* Status */

.section-ink { background: var(--ink); color: var(--on-ink); }
.section-ink h2,
.section-ink h3 { color: var(--paper); }
.section-ink .section-label { color: var(--brass-light); }
.section-ink .section-label span { color: var(--on-ink-3); }
.section-ink .section-label span::after { background: var(--on-ink-rule); }
.section-ink .section-intro { color: var(--on-ink-2); }
.section-ink :focus-visible { outline-color: var(--brass-light); }
.stages {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--on-ink-rule);
}
.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 8.5rem;
  gap: .75rem 2rem;
  align-items: baseline;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--on-ink-rule);
}
.stage-body {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: .4rem 2.5rem;
  align-items: baseline;
}
.stage h3 { font-size: 1.4rem; line-height: 1.25; }
.stage p { max-width: 36rem; color: var(--on-ink-2); }
.stage-status {
  justify-self: end;
  padding: .3rem .7rem;
  border: 1px solid rgba(246, 242, 234, .2);
  border-radius: 999px;
  color: var(--on-ink-3);
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.stage.is-done .stage-status { color: var(--on-ink); border-color: rgba(246, 242, 234, .32); }
.stage.is-current .stage-status { border-color: var(--brass-light); background: var(--brass-light); color: var(--ink); }
.stage.is-next .stage-status { border-color: var(--brass-light); color: var(--brass-light); }

/* Questions */

.faq { border-top: 1px solid var(--rule-strong); }
.faq details { border-bottom: 1px solid var(--rule-strong); }
.faq summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.4rem 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.9vw, 1.4rem);
  line-height: 1.3;
  text-wrap: balance;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.5px 100% no-repeat;
}
.faq details[open] summary::after {
  background:
    linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat;
}
.faq summary:hover { color: var(--brass); }
.faq-answer { max-width: 40rem; padding: 0 2.5rem 1.6rem 0; }

/* Contact */

.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 2rem clamp(2rem, 6vw, 5rem);
  align-items: end;
  padding: clamp(2.25rem, 6vw, 4.5rem);
  border: 1px solid var(--rule);
  background: var(--paper-2);
}
.contact-copy h2 { max-width: 15ch; margin-bottom: 1.25rem; }
.contact-copy p:not(.section-label) { max-width: 36rem; color: var(--ink-2); }
.contact-small {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: .76rem;
  letter-spacing: .04em;
}
.contact-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}
.contact-email {
  color: var(--ink-2);
  font-size: .95rem;
  text-decoration: none;
  border-bottom: 1px solid var(--rule-strong);
  overflow-wrap: anywhere;
}
.contact-email:hover { color: var(--ink); border-color: var(--ink); }

/* Footer */

.site-footer {
  padding: clamp(3rem, 6vw, 4.5rem) 0 2.5rem;
  background: var(--ink);
  color: var(--on-ink-2);
  font-size: .92rem;
}
.site-footer :focus-visible { outline-color: var(--brass-light); }
.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem 4rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--on-ink-rule);
}
.footer-brand .brand { margin-bottom: .9rem; color: var(--paper); }
.footer-brand p { max-width: 22rem; }
.footer-nav ul {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(3, auto);
  gap: .55rem 3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-nav a { color: var(--on-ink-2); text-decoration: none; }
.footer-nav a:hover { color: var(--paper); }
.footer-legal {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 1rem 3rem;
  padding-top: 2rem;
  color: var(--on-ink-3);
  font-size: .8rem;
  line-height: 1.6;
}
.footer-legal p:last-child { justify-self: end; }

/* 404 */

.notfound {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: calc(100vh - var(--header-h) - 12rem);
  padding-block: 5rem;
}
.notfound h1 { margin-bottom: 1rem; font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 1.02; }
.notfound p:not(.section-label) { margin-bottom: 2rem; color: var(--ink-2); font-size: 1.1rem; }

/* Responsive */

@media (min-width: 961px) {
  .split-head { position: sticky; top: calc(var(--header-h) + 2.5rem); }
}

@media (max-width: 960px) {
  .nav-list { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figure { width: 100%; max-width: 540px; margin-inline: auto; }
  .section-head { grid-template-columns: 1fr; align-items: start; }
  .split { grid-template-columns: 1fr; }
  .split-head h2 { max-width: 18ch; }
  .answers, .notes { grid-template-columns: 1fr; }
  .notes { gap: 1.75rem; }
  .stage-body { grid-template-columns: 1fr; }
  .contact-panel { grid-template-columns: 1fr; align-items: start; }
}

@media (max-width: 640px) {
  :root { --header-h: 3.75rem; }
  body { font-size: 1rem; }
  .brand { font-size: 1.05rem; }
  .brand .mark { width: 24px; height: 24px; }
  .facts { grid-template-columns: 1fr; gap: 1rem; }
  .stage { grid-template-columns: 1fr; }
  .stage-status { justify-self: start; }
  .faq-answer { padding-right: 0; }
  .footer-legal { grid-template-columns: 1fr; }
  .footer-legal p:last-child { justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .dial-seconds { animation: none; }
  * { transition: none !important; }
}

@media print {
  .site-header, .skip-link { display: none; }
  .section-ink, .site-footer { background: none; color: var(--ink); }
  .section-ink h2, .section-ink h3 { color: var(--ink); }
  .faq details > .faq-answer { display: block; }
}
