:root {
  --paper: #f1eadb;
  --paper-2: #e7dcc9;
  --ink: #15252d;
  --muted: #5f6b6e;
  --orange: #f0642d;
  --blue: #236b82;
  --line: rgba(21,37,45,0.24);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body { margin: 0; overflow-x: hidden; background: radial-gradient(circle at 85% 10%, rgba(240,100,45,0.11), transparent 27%), var(--paper); color: var(--ink); font-family: var(--sans); }
button, input, select { font: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }
.skip-link { position: fixed; z-index: 100; top: 12px; left: 12px; padding: 12px 15px; background: var(--ink); color: var(--paper); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.page-orbits { position: fixed; z-index: -1; inset: 0; pointer-events: none; overflow: hidden; opacity: 0.23; }
.page-orbits i { position: absolute; width: 60vw; height: 60vw; border: 1px solid var(--orange); border-radius: 50%; }
.page-orbits i:nth-child(1) { top: -30vw; right: -22vw; animation: breathe 16s ease-in-out infinite alternate; }
.page-orbits i:nth-child(2) { bottom: -42vw; left: -24vw; border-color: var(--blue); animation: breathe 23s ease-in-out -8s infinite alternate-reverse; }
.page-orbits i:nth-child(3) { top: 45%; right: -50vw; border-style: dashed; border-color: var(--ink); animation: spin 80s linear infinite; }

.topbar, main > section, footer { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.topbar { min-height: 80px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; border-bottom: 1px solid var(--line); font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase; }
.topbar p { margin: 0; color: var(--muted); }
.topbar a { text-decoration: none; }
.topbar > a:last-child { justify-self: end; }
.brand { font-weight: 800; }
.brand span, .brand b, .topbar > a:last-child span { color: var(--orange); }

.hero { position: relative; min-height: calc(100svh - 80px); display: flex; flex-direction: column; justify-content: center; padding-block: 100px 72px; }
.kicker, .label { margin: 0; color: var(--blue); font-size: 0.67rem; font-weight: 850; letter-spacing: 0.2em; text-transform: uppercase; }
.hero h1 { position: relative; z-index: 1; margin: 18px 0 44px; font: 400 clamp(4.5rem, 11vw, 10rem)/0.8 var(--serif); letter-spacing: -0.075em; }
.hero h1 em { color: var(--orange); font-weight: inherit; }
.hero-copy { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 580px) auto; justify-content: space-between; align-items: end; gap: 40px; }
.hero-copy p { margin: 0; color: var(--muted); font-size: clamp(1rem, 1.7vw, 1.22rem); line-height: 1.75; }
.hero-copy a { width: fit-content; padding: 14px 0; border-bottom: 1px solid var(--orange); font-size: 0.7rem; font-weight: 850; letter-spacing: 0.15em; text-decoration: none; text-transform: uppercase; }
.hero-copy a span { margin-left: 24px; color: var(--orange); }
.hero-clock { position: absolute; top: 6%; right: -8%; width: min(52vw, 590px); aspect-ratio: 1; display: grid; place-items: center; opacity: 0.55; }
.hero-clock .ring { position: absolute; border: 1px solid var(--blue); border-radius: 50%; }
.ring--1 { inset: 3%; border-style: dashed !important; animation: spin 50s linear infinite; }
.ring--2 { inset: 17%; border-color: var(--orange) !important; animation: spin 35s linear infinite reverse; }
.ring--3 { inset: 34%; }
.hero-clock i { position: absolute; top: 50%; left: 50%; width: 42%; height: 1px; background: var(--orange); transform-origin: left; animation: spin 24s linear infinite; }
.hero-clock b { color: var(--blue); font: 400 3rem/1 var(--serif); }

.split { display: grid; grid-template-columns: minmax(170px, 0.48fr) minmax(0, 1.52fr); gap: 50px; padding-block: 110px; border-top: 1px solid var(--line); }
.split h2, .section-head h2 { margin: 0; font: 400 clamp(2.65rem, 5.8vw, 5.5rem)/0.95 var(--serif); letter-spacing: -0.05em; }
.split > div > p { max-width: 740px; color: var(--muted); font-size: 1.05rem; line-height: 1.8; }

.clock-lab, .forms { padding-block: 110px; border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: 1fr 0.58fr; align-items: end; gap: 42px; margin-bottom: 52px; }
.section-head .label { margin-bottom: 18px; }
.section-head > p { margin: 0; color: var(--muted); line-height: 1.7; }
.clock-grid { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); background: rgba(255,255,255,0.16); }
.dial-panel { display: flex; flex-direction: column; justify-content: center; padding: clamp(26px, 5vw, 58px); border-right: 1px solid var(--line); }
.dial { position: relative; width: min(100%, 430px); aspect-ratio: 1; margin-inline: auto; display: grid; place-items: center; }
.dial svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.dial circle { fill: none; stroke-width: 2; }
.track { stroke: rgba(21,37,45,0.14); }
.progress { stroke: var(--orange); stroke-linecap: round; stroke-dasharray: 653.45; stroke-dashoffset: 653.45; transition: stroke-dashoffset 1s linear; }
.dial::before, .dial::after { content: ""; position: absolute; border: 1px dashed rgba(35,107,130,0.34); border-radius: 50%; animation: spin 36s linear infinite; }
.dial::before { inset: 10%; }
.dial::after { inset: 20%; animation-direction: reverse; animation-duration: 24s; }
.dial-copy { position: relative; z-index: 1; text-align: center; }
.dial-copy span { display: block; color: var(--blue); font-size: 0.62rem; font-weight: 850; letter-spacing: 0.18em; }
.dial-copy strong { display: block; margin: 10px 0 7px; font: 400 clamp(2.7rem, 6vw, 5rem)/1 var(--serif); font-variant-numeric: tabular-nums; }
.dial-copy small { color: var(--muted); }
.clock-actions { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-top: 28px; }
.clock-actions button { min-height: 48px; border: 1px solid var(--line); padding: 10px 14px; background: transparent; color: var(--ink); cursor: pointer; }
.clock-actions .start { border-color: var(--ink); background: var(--ink); color: var(--paper); font-weight: 800; }
.clock-actions .return { border-color: var(--orange); background: var(--orange); color: var(--paper); font-weight: 800; }
.clock-actions .cancel { color: var(--muted); }
.clock-actions button:disabled { opacity: 0.38; cursor: not-allowed; }
.departure-card { padding: clamp(28px, 5vw, 58px); background: var(--paper-2); }
.field { margin-bottom: 34px; }
.field label { display: block; margin-bottom: 10px; font-size: 0.68rem; font-weight: 850; letter-spacing: 0.13em; text-transform: uppercase; }
.field label span { float: right; color: var(--muted); font-size: 0.56rem; font-weight: 500; }
select, input { width: 100%; min-height: 50px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 10px 2px; background: transparent; color: var(--ink); }
.field small { display: block; margin-top: 8px; color: var(--muted); line-height: 1.4; }
.pause-card { margin-top: 54px; padding: 24px; border: 1px solid var(--blue); background: rgba(241,234,219,0.66); }
.pause-card > p { margin: 0; color: var(--blue); font-size: 0.62rem; font-weight: 850; letter-spacing: 0.16em; text-transform: uppercase; }
.pause-card blockquote { min-height: 90px; margin: 40px 0; font: 400 1.65rem/1.35 var(--serif); }
.pause-card button { border: 0; padding: 0; background: transparent; color: var(--blue); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.status { min-height: 1.4em; color: var(--orange); }
.logbook { margin-top: 30px; border: 1px solid var(--line); }
.log-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.log-head h3 { margin: 0; font: 400 1.55rem/1 var(--serif); }
.log-head > div { display: flex; align-items: center; gap: 8px; }
.log-head span { margin-right: 8px; color: var(--blue); font-size: 0.62rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.log-head button { min-height: 38px; border: 1px solid var(--line); padding: 7px 10px; background: transparent; color: var(--ink); cursor: pointer; }
#log { margin: 0; padding: 0; list-style: none; }
#log li { display: grid; grid-template-columns: 110px 1fr auto; align-items: center; gap: 20px; padding: 18px 22px; border-top: 1px solid var(--line); }
#log li:first-child { border-top: 0; }
#log .duration { color: var(--orange); font: 400 1.4rem/1 var(--serif); font-variant-numeric: tabular-nums; }
#log strong { display: block; margin-bottom: 4px; }
#log small { color: var(--muted); }
#log time { color: var(--muted); font-size: 0.72rem; }
#log .empty { display: block; color: var(--muted); font-style: italic; }

.protocol ol { margin: 42px 0 0; padding: 0; list-style: none; counter-reset: step; }
.protocol li { display: grid; grid-template-columns: 58px 1fr; gap: 18px; padding: 22px 0; border-top: 1px solid var(--line); }
.protocol li > span { color: var(--orange); font: 400 1.25rem/1 var(--serif); }
.protocol h3 { margin: 0 0 6px; font: 400 1.45rem/1.2 var(--serif); }
.protocol li p { margin: 0; color: var(--muted); line-height: 1.65; }
.form-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); }
.form-grid article { min-height: 330px; padding: 25px; border-right: 1px solid var(--line); }
.form-grid article:last-child { border-right: 0; }
.mini-orbit { position: relative; width: 88px; aspect-ratio: 1; margin-bottom: 70px; border: 1px solid var(--blue); border-radius: 50%; }
.mini-orbit::after { content: ""; position: absolute; inset: 20%; border: 1px dashed var(--orange); border-radius: 50%; }
.mini-orbit i { position: absolute; top: 50%; left: 50%; width: 40%; height: 1px; background: var(--orange); transform-origin: left; transform: rotate(45deg); }
.form-grid article:nth-child(2) .mini-orbit i { transform: rotate(130deg); }
.form-grid article:nth-child(3) .mini-orbit i { transform: rotate(220deg); }
.form-grid article:nth-child(4) .mini-orbit i { transform: rotate(315deg); }
.form-grid small { color: var(--blue); font-weight: 850; letter-spacing: 0.16em; }
.form-grid h3 { margin: 12px 0; font: 400 1.55rem/1.1 var(--serif); }
.form-grid p { margin: 0; color: var(--muted); line-height: 1.6; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { padding: 20px 32px 20px 0; cursor: pointer; font-weight: 800; }
.faq details p { margin: 0 0 22px; color: var(--muted); line-height: 1.7; }
.closing { padding-block: 130px; border-top: 1px solid var(--line); text-align: center; }
.closing .label { margin-bottom: 20px; }
.closing h2 { margin: 0; font: 400 clamp(3.1rem, 7.6vw, 7rem)/0.9 var(--serif); letter-spacing: -0.06em; }
.closing > p { max-width: 620px; margin: 28px auto; color: var(--muted); line-height: 1.7; }
.closing > div { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; }
.closing span, .closing a { padding: 14px 17px; border: 1px solid var(--line); }
.closing span { color: var(--muted); cursor: not-allowed; }
.closing a { border-color: var(--orange); color: var(--orange); text-decoration: none; }
footer { min-height: 130px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.62rem; letter-spacing: 0.08em; }
footer p { color: var(--ink); font-weight: 850; }
footer a { justify-self: end; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { to { transform: translate(-8vw, 6vh) scale(1.12); } }
@media (max-width: 850px) {
  .topbar, main > section, footer { width: min(100% - 30px, 720px); }
  .topbar { grid-template-columns: 1fr 1fr; }
  .topbar p { display: none; }
  .split, .section-head { grid-template-columns: 1fr; gap: 24px; }
  .clock-grid { grid-template-columns: 1fr; }
  .dial-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid article:nth-child(2) { border-right: 0; }
  .form-grid article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .hero-copy { grid-template-columns: 1fr; align-items: start; }
  footer { grid-template-columns: 1fr; padding-block: 30px; }
  footer a { justify-self: start; }
}
@media (max-width: 520px) {
  .hero h1 { font-size: clamp(3.8rem, 20vw, 5.4rem); }
  .hero-clock { width: 78vw; opacity: 0.27; }
  .split, .clock-lab, .forms { padding-block: 78px; }
  .clock-actions { grid-template-columns: 1fr 1fr; }
  .clock-actions .cancel { grid-column: 1 / -1; }
  .log-head { align-items: flex-start; }
  .log-head > div { flex-wrap: wrap; justify-content: flex-end; }
  #log li { grid-template-columns: 90px 1fr; }
  #log time { grid-column: 2; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid article { border-right: 0; border-bottom: 1px solid var(--line); }
  .form-grid article:last-child { border-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
@media (prefers-contrast: more) {
  :root { --muted: #1a1a1a; --line: rgba(0,0,0,0.7); }
}
