@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --ink: #0b0b0b;
  --paper: #fff;
  --soft: #efefed;
  --muted: #4d4d4d;
  --rule: #c9c9c9;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --page-gutter: 14px;
  font-family: 'DM Sans', Arial, sans-serif;
  color: var(--ink);
  background: var(--soft);
  font-synthesis: none;
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--soft); }
main { margin-inline: var(--page-gutter); }
button, input { font: inherit; }
button { cursor: pointer; touch-action: manipulation; transition: transform 140ms var(--ease-out), background-color 180ms ease, color 180ms ease; }
button:active:not(:disabled) { transform: scale(.985); }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
.hidden { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.skip-link { position: absolute; left: 18px; top: -100px; z-index: 20; padding: 12px 16px; background: var(--paper); color: var(--ink); font-weight: 800; }
.skip-link:focus { top: 15px; }
.topbar { height: 48px; margin: var(--page-gutter) var(--page-gutter) 0; border-bottom: 2px solid #090909; border-radius: 16px 16px 0 0; background: rgba(255,255,255,.9); box-shadow: 0 6px 0 #090909; position: relative; z-index: 3; }
.topbar-inner { width: 100%; max-width: 1280px; height: 100%; margin: 0 auto; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { font: 700 1rem/1 Inter, Arial, sans-serif; letter-spacing: -.02em; text-decoration: none; white-space: nowrap; }
.section-kicker, .story-bottom, .results-rail, .scan-form label, .lead-form label, .restart { font-size: .875rem; font-weight: 800; letter-spacing: .1em; }
.email-button { display: inline-flex; justify-content: center; align-items: center; min-height: 34px; padding: .4rem .75rem; border: 2px solid #090909; border-radius: 8px; background: #090909; color: var(--paper); box-shadow: 4px 4px 0 #ef4444; font: 600 .75rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; text-decoration: none; white-space: nowrap; transition: transform 160ms ease, box-shadow 160ms ease; }
.email-button:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 #ef4444; }
.email-button:focus-visible { outline: 3px solid var(--ink); outline-offset: 5px; }

.hero { min-height: calc(100svh - 62px); display: grid; place-items: center; padding: 40px clamp(22px, 4vw, 72px); background: var(--paper); overflow: hidden; border-bottom: 1px solid var(--rule); }
.hero-inner { width: 100%; text-align: center; }
.hero h1, .waiting h2, .story h2, .cta h2 { font-family: Inter, Arial, sans-serif; font-weight: 900; letter-spacing: -.085em; line-height: .88; margin: 0; text-transform: uppercase; }
.hero h1 { font-size: clamp(4.3rem, 7.5vw, 12rem); line-height: .95; letter-spacing: -.065em; text-wrap: balance; }
.hero .scan-form { width: min(100%, 650px); margin: clamp(38px, 6vh, 70px) auto 0; text-align: left; }
.hero .input-row { border: 2px solid var(--ink); }
.hero .input-row input { min-height: 68px; border: 0; padding: 15px 22px; font: 700 clamp(1rem, 1.5vw, 1.25rem)/1.2 Inter, Arial, sans-serif; letter-spacing: .01em; }
.hero .input-row input::placeholder { color: #777; opacity: 1; }
.hero .input-row button { display: grid; place-items: center; width: 70px; padding: 0; border: 0; border-left: 2px solid var(--ink); font: 400 2rem/1 Inter, Arial, sans-serif; }
.hero .input-row button:hover { background: #333; color: var(--paper); }
.hero .input-row button[aria-busy="true"] span { display: none; }
.hero .form-message { color: var(--ink); min-height: 0; margin: 10px 0 0; text-align: center; }
.hero .form-message:empty { display: none; }
.scan-form, .lead-form { max-width: 790px; }
.scan-form label, .lead-form label { display: block; margin-bottom: 12px; }
.input-row { display: flex; }
.input-row input { background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 0; min-width: 0; flex: 1; padding: 19px 22px; font-size: 1.15rem; }
.input-row button { border: 2px solid var(--ink); background: var(--ink); color: var(--paper); padding: 18px 26px; font-size: .9rem; font-weight: 900; letter-spacing: .06em; white-space: nowrap; }
.input-row button:hover { background: var(--paper); color: var(--ink); }
.input-row button:disabled { opacity: .55; cursor: wait; }
.scan-form .input-row button[aria-busy="true"]::after { content: ''; display: inline-block; width: 12px; height: 12px; margin-left: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: middle; animation: spin .7s linear infinite; }
.form-message { font-size: .88rem; color: #d4d4d4; margin: 10px 0 0; min-height: 1.5em; }

.section-kicker { margin: 0 0 28px; }
.waiting h2 span, .story-next h2 span, .cta h2 span { color: inherit; }

.waiting { min-height: 90svh; background: var(--ink); color: var(--paper); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 60px 22px; }
.waiting h2 { font-size: clamp(3.5rem, 8vw, 9rem); }
.waiting > p:not(.section-kicker) { font-size: 1.3rem; }
.waiting-note { max-width: 600px; font-size: .95rem !important; line-height: 1.5; }
.waiting-ring { width: 60px; height: 60px; border: 7px solid var(--paper); border-top-color: #777; border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 40px; }
.waiting.is-error .waiting-ring { display: none; }
.retry-button { border: 2px solid var(--paper); background: var(--paper); color: var(--ink); padding: 18px 34px; margin-top: 25px; font-size: .9rem; font-weight: 900; letter-spacing: .06em; }
.retry-button:hover { background: var(--ink); color: var(--paper); }
@keyframes spin { to { transform: rotate(360deg); } }

.results-rail { height: 50px; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 0 clamp(22px, 4vw, 72px); background: var(--ink); color: var(--paper); position: sticky; top: 0; z-index: 5; font-variant-numeric: tabular-nums; }
.results-rail span:first-child { max-width: 65%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.results-rail span:last-child { text-align: right; white-space: nowrap; }
.story { min-height: 100svh; padding: 80px clamp(22px, 4vw, 72px) 25px; display: flex; align-items: center; scroll-margin-top: 50px; }
.story-inner { width: 100%; max-width: 1550px; margin: auto; transform: translateY(12px); transition: transform 420ms var(--ease-out); }
.story.visible .story-inner { transform: translateY(0); }
.story .section-kicker { margin-bottom: 28px; }
.story h2 { font-size: clamp(3.5rem, 8.5vw, 10rem); max-width: 1450px; }
.story-copy { font-size: clamp(1.15rem, 2vw, 1.8rem); line-height: 1.35; max-width: 800px; margin: 36px 0 80px; }
.story-bottom { display: flex; justify-content: space-between; border-top: 1px solid currentColor; padding-top: 17px; }
.score-line { display: flex; align-items: baseline; gap: 20px; }
.score-line strong { font: 900 clamp(10rem, 33vw, 38rem)/.82 Inter, Arial, sans-serif; letter-spacing: -.105em; font-variant-numeric: tabular-nums; }
.score-line span { font-size: clamp(1.2rem, 3vw, 3rem); font-weight: 900; }
.story-score { background: var(--ink); color: var(--paper); }
.story-score h2 { margin-top: 22px; }
#score-title:focus { outline: none; }
.story-kex { background: var(--paper); color: var(--ink); }
.story-kex h2 { margin-top: 22px; }
.story-https { background: var(--ink); color: var(--paper); }
.story-ssh { background: var(--soft); color: var(--ink); }
.story-surface { background: var(--ink); color: var(--paper); }
.story-hosts { background: var(--paper); color: var(--ink); }
.story-ports { background: var(--ink); color: var(--paper); }
.story-next { background: var(--paper); color: var(--ink); }
.story-figure { font: 900 clamp(9rem, 29vw, 31rem)/.9 Inter, Arial, sans-serif; letter-spacing: -.1em; margin: 0 0 25px; font-variant-numeric: tabular-nums; }
.playlist-heading, .port-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; }
.playlist-heading h2, .port-heading h2 { font-size: clamp(3.6rem, 8vw, 9rem); }
.playlist-heading > strong, .port-heading > strong { font: 900 clamp(5rem, 16vw, 16rem)/.8 Inter, Arial, sans-serif; letter-spacing: -.1em; font-variant-numeric: tabular-nums; }
.playlist-copy { margin: 32px 0 52px; }
.host-list { margin: 0 0 70px; padding: 0; list-style: none; border-top: 2px solid currentColor; }
.host-list li { display: grid; grid-template-columns: 55px minmax(0, 1fr) minmax(140px, 240px) 90px; gap: 20px; align-items: center; min-height: 84px; padding: 17px 0; border-bottom: 1px solid #aaa; }
.host-index, .host-ratio, .host-status, .port-type, .port-observed { font: 700 .75rem/1.35 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; }
.host-name { min-width: 0; overflow-wrap: anywhere; font: 800 clamp(1rem, 1.8vw, 1.5rem)/1.1 Inter, Arial, sans-serif; letter-spacing: -.04em; }
.host-measure { display: flex; flex-direction: column; gap: 8px; }
.host-track { height: 6px; background: #d0d0d0; }
.host-track > span { display: block; height: 100%; background: var(--ink); }
.host-status { text-align: right; color: var(--muted); }
.port-heading { justify-content: flex-start; gap: clamp(25px, 5vw, 90px); }
.port-heading > strong { font-size: clamp(8rem, 25vw, 27rem); }
.story-ports .story-copy { margin: 28px 0 45px; }
.port-list { margin-bottom: 24px; border-top: 2px solid currentColor; }
.port-row { display: grid; grid-template-columns: 110px 110px 1fr; gap: 20px; align-items: center; min-height: 62px; border-bottom: 1px solid #777; }
.port-number { font: 900 clamp(1.5rem, 3vw, 2.3rem)/1 Inter, Arial, sans-serif; letter-spacing: -.05em; }
.port-observed { text-align: right; color: #d0d0d0; }
.scope-note { max-width: 770px; margin: 0 0 60px; color: #d0d0d0; font-size: 1rem; line-height: 1.45; }
.story-next h2 { font-size: clamp(3.5rem, 8vw, 9.5rem); }
.issue-list { max-width: 1000px; margin-bottom: 60px; border-top: 2px solid currentColor; }
.issue-list > div { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; border-bottom: 1px solid #aaa; padding: 18px 0; }
.issue-list strong { text-transform: uppercase; font-size: 1.05rem; }
.issue-list span { line-height: 1.4; color: var(--muted); }

.cta { min-height: 100svh; background: var(--ink); color: var(--paper); padding: clamp(85px, 13vh, 150px) clamp(22px, 4vw, 72px); display: flex; flex-direction: column; justify-content: center; scroll-margin-top: 50px; }
.cta h2 { font-size: clamp(3.6rem, 8.6vw, 10rem); letter-spacing: -.045em; line-height: .94; }
.cta > p:not(.section-kicker) { font-size: clamp(1.1rem, 1.8vw, 1.6rem); line-height: 1.4; max-width: 740px; margin: 38px 0 45px; }
.lead-form .input-row input { border-color: var(--paper); }
.lead-form .input-row button { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.lead-form .input-row button:hover { background: var(--ink); color: var(--paper); }
.lead-form > p { min-height: 1.4em; font-size: .95rem; }
.privacy-note { color: #d2d2d2; font-size: .875rem; line-height: 1.4; margin: 12px 0 0; }
.honeypot { position: absolute; left: -9999px; }
.restart { margin-top: 35px; text-underline-offset: 5px; width: max-content; }

@media (max-width: 700px) {
  :root { --page-gutter: 8px; }
  .topbar-inner { padding: 0 16px; }
  .hero { min-height: calc(100svh - 56px); }
  .hero h1 { font-size: clamp(2.2rem, 9vw, 4.8rem); }
  .input-row { flex-direction: column; }
  .input-row button { text-align: left; min-height: 60px; }
  .hero .input-row { flex-direction: row; }
  .hero .input-row input { min-height: 60px; padding: 13px 15px; }
  .hero .input-row button { min-height: 60px; width: 60px; flex: none; }
  .story h2 { font-size: clamp(3.2rem, 10vw, 5.5rem); }
  .score-line strong { font-size: clamp(7.5rem, 35vw, 17rem); }
  .story-figure { font-size: clamp(8rem, 43vw, 17rem); }
  .story-copy { margin: 30px 0 55px; }
  .playlist-heading, .port-heading { align-items: flex-start; }
  .playlist-heading { flex-direction: column-reverse; gap: 18px; }
  .playlist-heading > strong { align-self: flex-end; font-size: clamp(4.5rem, 18vw, 8rem); }
  .port-heading > strong { font-size: clamp(6rem, 27vw, 13rem); }
  .host-list li { grid-template-columns: 28px minmax(0, 1fr) 70px; gap: 10px; min-height: 76px; }
  .host-measure { grid-column: 2 / 3; grid-row: 2; }
  .host-status { grid-column: 3; grid-row: 1 / 3; font-size: .65rem; }
  .port-row { grid-template-columns: 78px 65px 1fr; gap: 10px; }
  .port-observed { font-size: .66rem; }
  .issue-list > div { grid-template-columns: 1fr; gap: 8px; }
  .cta h2 { font-size: clamp(2rem, 8vw, 5.5rem); }
  .results-rail { font-size: .75rem; }
  .results-rail span:first-child { max-width: 51%; }
  .story-bottom { font-size: .75rem; }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  button, .story-inner { transition: none; }
  .story-inner { transform: none; }
  .waiting-ring, .scan-form .input-row button[aria-busy="true"]::after { animation: none; }
}
