:root {
  --paper: #f2f0ea;
  --ink: #152218;
  --muted: #627064;
  --line: #ced2c9;
  --orange: #f05b37;
  --acid: #dbe86c;
  --white: #fbfaf6;
  --sans: Inter, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 87% 8%, rgba(219, 232, 108, .3), transparent 22rem),
    var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }

button { color: inherit; }

.site-header {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--ink);
  text-decoration: none;
  font-weight: 850;
  font-size: .84rem;
  letter-spacing: .08em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 25px;
  height: 25px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
  top: -4px;
  right: 0;
}

.privacy-note {
  text-transform: uppercase;
  font-size: .68rem;
  font-weight: 750;
  letter-spacing: .12em;
}

main { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }

.intro {
  min-height: calc(100vh - 150px);
  padding: 70px 0;
  display: grid;
  place-items: center;
}

.eyebrow, .section-label {
  margin: 0 0 22px;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-weight: 800;
  font-size: .68rem;
}

.eyebrow::before, .section-label::before {
  content: "";
  display: inline-block;
  vertical-align: middle;
  width: 32px;
  height: 2px;
  background: var(--orange);
  margin-right: 11px;
}

h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(4.4rem, 11vw, 9.4rem);
  line-height: .79;
  letter-spacing: -.075em;
  margin: 0;
}

h1 em { color: var(--orange); font-weight: 400; }

.brand .brand-title {
  margin: 0;
  font: inherit;
  letter-spacing: inherit;
}

.lede {
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.55;
  max-width: 560px;
  margin: 42px 0 48px;
}

.date-form { width: min(730px, 100%); }

.date-form > label {
  display: block;
  text-transform: uppercase;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
  margin-bottom: 10px;
}

.field-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }

.date-field { position: relative; }

input[type="date"] {
  appearance: none;
  width: 100%;
  min-height: 62px;
  background: rgba(255,255,255,.42);
  border: 1px solid #afb6aa;
  border-radius: 0;
  padding: 0 19px;
  color: var(--ink);
  font-size: 1rem;
  outline: none;
}

input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(21,34,24,.1); }

.field-row button {
  border: 0;
  background: var(--ink);
  color: white;
  padding: 0 27px;
  min-height: 62px;
  font-size: .75rem;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: .09em;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}

.field-row button span { font-size: 1.15rem; margin-left: 22px; }
.field-row button:hover { background: var(--orange); }
.field-row button:active { transform: translateY(1px); }

.form-error { color: #b73525; min-height: 21px; font-size: .8rem; margin: 8px 0 0; }

.calculator-description {
  margin: 2px 0 0;
  color: var(--muted);
  font: .85rem/1.5 var(--serif);
}

.results {
  border-top: 1px solid var(--line);
  padding: 82px 0 115px;
}

.results[hidden] { display: none; }

.result-heading { display: flex; justify-content: space-between; align-items: end; }
.result-heading .eyebrow { margin-bottom: 14px; }

h2 {
  font: 400 clamp(3rem, 6vw, 5.6rem)/1 var(--serif);
  letter-spacing: -.055em;
  margin: 0;
}

.reset-button {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  padding: 5px 0;
  text-transform: uppercase;
  font-weight: 800;
  font-size: .66rem;
  letter-spacing: .12em;
  cursor: pointer;
}

.hero-age {
  margin: 46px 0 80px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.hero-age > div { padding: 32px 28px 31px 0; }
.hero-age > div + div { border-left: 1px solid var(--line); padding-left: 38px; }

.hero-age strong {
  display: block;
  font: 400 clamp(4.2rem, 9vw, 7.5rem)/.9 var(--serif);
  letter-spacing: -.07em;
  font-variant-numeric: tabular-nums;
}

.hero-age span {
  display: block;
  margin-top: 15px;
  text-transform: uppercase;
  font-weight: 800;
  font-size: .68rem;
  letter-spacing: .16em;
  color: var(--muted);
}

.section-label { margin-bottom: 17px; }

.precision-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-bottom: 0;
}

.precision-card {
  position: relative;
  min-height: 200px;
  padding: 25px 27px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: rgba(255,255,255,.22);
}

.precision-card:nth-child(3n) { border-right: 0; }
.accent-card { background: var(--acid); }

.card-label {
  position: absolute;
  top: 23px;
  left: 27px;
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .13em;
  font-weight: 800;
}

.precision-card strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font: 400 clamp(2rem, 4.5vw, 4rem)/1 var(--serif);
  letter-spacing: -.045em;
  font-variant-numeric: tabular-nums;
}

.precision-card small {
  margin-top: 8px;
  color: var(--muted);
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.wide-card { grid-column: span 3; background: var(--ink); color: white; }
.wide-card strong { font-size: clamp(2.6rem, 7vw, 6.6rem); }
.wide-card small { color: #aeb7af; }

.live-dot {
  position: absolute;
  right: 28px;
  top: 26px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 0 rgba(240,91,55,.5);
  animation: pulse 1.8s infinite;
}

@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(240,91,55,0); } }

.next-birthday {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 22px;
  border: 1px solid var(--line);
  padding: 26px;
}

.next-birthday .card-label { position: static; }
.next-birthday p { margin: 7px 0 0; font: 1.2rem/1.4 var(--serif); }
.orbit-icon { width: 52px; height: 52px; border: 1px solid var(--ink); border-radius: 50%; display: grid; place-items: center; color: var(--orange); font-size: 1.25rem; flex: 0 0 auto; }

footer {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: .62rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: .1em;
}

footer span { color: var(--orange); padding: 0 5px; }

@media (max-width: 700px) {
  .site-header, main, footer { width: min(100% - 30px, 1180px); }
  .site-header { min-height: 72px; }
  .privacy-note { font-size: .62rem; }
  .intro { min-height: calc(100vh - 120px); padding: 55px 0; }
  h1 { font-size: clamp(4rem, 22vw, 6.7rem); }
  .lede { margin: 35px 0 38px; }
  .field-row { grid-template-columns: 1fr; }
  .field-row button { justify-content: center; }
  .results { padding: 65px 0 85px; }
  .hero-age { margin-bottom: 60px; }
  .hero-age > div { padding: 25px 10px 24px 0; }
  .hero-age > div + div { padding-left: 15px; }
  .hero-age strong { font-size: clamp(3.2rem, 18vw, 5rem); }
  .precision-grid { grid-template-columns: repeat(2, 1fr); }
  .precision-card { min-height: 165px; padding: 20px; }
  .precision-card:nth-child(3n) { border-right: 1px solid var(--line); }
  .precision-card:nth-child(2n) { border-right: 0; }
  .wide-card { grid-column: span 2; border-right: 0 !important; }
  .card-label { top: 20px; left: 20px; }
  footer { align-items: flex-start; gap: 18px; flex-direction: column; }
}

@media (max-width: 430px) {
  .result-heading { align-items: start; }
  .reset-button { margin-top: 15px; }
  .hero-age span { font-size: .56rem; letter-spacing: .1em; }
  .precision-card strong { font-size: 2rem; }
  .wide-card strong { font-size: 2.15rem; }
}

@media (max-width: 360px) {
  .privacy-note { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .live-dot { animation: none; }
}
