/* SurgicalCue website. One stylesheet for index.html and malta.html. */
@font-face {
  font-family: "Montserrat";
  src: url("fonts/montserrat.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink: #18312e;
  --night: #0f2321;
  --raised: #24443f;
  --teal: #42959b;
  --teal-deep: #316c70;
  --mint: #8acbaa;
  --cue: #ae2658;
  --paper: #f6faf8;
  --line: #d5e3df;
  --muted: #5b6f6c;
  --gutter: clamp(1.25rem, 5vw, 3.5rem);
  --measure: 34rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 "Montserrat", "Avenir Next", "Segoe UI", system-ui, sans-serif;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }

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

/* ---------- header ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 1.4rem; }
.brand img { width: 11.5rem; height: auto; }
.top nav { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.25rem); font-size: 0.9375rem; font-weight: 600; }
.top nav a { text-decoration: none; }
.top nav a:hover { text-decoration: underline; text-underline-offset: 0.3em; }

/* ---------- buttons ---------- */
.button {
  display: inline-block;
  padding: 0.85rem 1.5rem;
  border: 0;
  border-radius: 999px;
  background: var(--cue);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s;
}
.button:hover { background: #8f1d47; }
.button.quiet { background: var(--mint); color: var(--ink); }
.button.quiet:hover { background: #a5dcc0; }
.button:disabled { opacity: 0.55; cursor: default; }
.textlink { font-weight: 600; text-underline-offset: 0.3em; }

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  padding-block: clamp(2.5rem, 7vw, 6rem) clamp(3.5rem, 8vw, 7rem);
}
.hero h1 {
  font-size: clamp(2.5rem, 5.3vw, 4.25rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.lede { max-width: var(--measure); margin-top: 1.6rem; font-size: 1.25rem; line-height: 1.5; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; margin-top: 2.2rem; }
.award { max-width: var(--measure); margin-top: 2.4rem; padding-top: 1.1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9375rem; }
.award strong { color: var(--ink); }

.hero-copy > * { animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero-copy > :nth-child(2) { animation-delay: 0.08s; }
.hero-copy > :nth-child(3) { animation-delay: 0.16s; }
.hero-copy > :nth-child(4) { animation-delay: 0.24s; }
.hero-console { animation: rise 1s 0.2s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(1.25rem); } }

/* ---------- the console: the one animated moment on the page ---------- */
.console {
  width: 100%;
  height: auto;
  border-radius: 1.4rem;
  background: var(--night);
  box-shadow: 0 2.5rem 5rem -2rem rgba(24, 49, 46, 0.6), 0 0 0 0.45rem #1b3a36;
  font-family: inherit;
}
.console text { fill: #d5e3df; font-size: 13px; font-weight: 600; }
.console .bar-fill { transform-box: fill-box; transform-origin: left center; animation: fill 9s linear infinite; }
.console .clip { opacity: 0; animation: clip-in 9s ease-out infinite; }
.console .clip-2 { animation-delay: 0.14s; }
.console .clip-3 { animation-delay: 0.28s; }
.console .cue-ring { opacity: 0; transform-box: fill-box; transform-origin: center; animation: ring 9s ease-out infinite; }
.console .timer { opacity: 0; animation: timer 9s ease-out infinite; }
.console .tool { transform-box: fill-box; animation: sway 5s ease-in-out infinite alternate; }
.console .tool-a { transform-origin: 100% 100%; }
.console .tool-b { transform-origin: 100% 0; animation-duration: 6.5s; animation-direction: alternate-reverse; }
@keyframes fill {
  0% { transform: scaleX(0); opacity: 1; }
  38%, 92% { transform: scaleX(1); opacity: 1; }
  97%, 100% { transform: scaleX(1); opacity: 0; }
}
@keyframes clip-in {
  0%, 40% { opacity: 0; transform: translateX(-18px); }
  46%, 90% { opacity: 1; transform: none; }
  96%, 100% { opacity: 0; transform: none; }
}
@keyframes ring {
  0%, 38% { opacity: 0; transform: scale(1); }
  39% { opacity: 0.9; transform: scale(1); }
  52%, 100% { opacity: 0; transform: scale(3.4); }
}
@keyframes timer { 0%, 44% { opacity: 0; } 50%, 90% { opacity: 1; } 96%, 100% { opacity: 0; } }
@keyframes sway { from { transform: rotate(-1.5deg); } to { transform: rotate(2deg); } }
.hero-console figcaption { margin-top: 1rem; color: var(--muted); font-size: 0.8125rem; }

/* ---------- sections ---------- */
.band { padding-block: clamp(3.5rem, 8vw, 6.5rem); border-top: 1px solid var(--line); }
.band h2, .contact h2 {
  max-width: 24ch;
  text-wrap: balance;
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
}
.split { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 5rem); }
.split p { max-width: var(--measure); }
.split p + p { margin-top: 1rem; }

/* three steps: a real sequence, so it is numbered */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3.5rem); margin-top: 3rem; counter-reset: step; }
.steps li { counter-increment: step; padding-top: 1.2rem; border-top: 3px solid var(--ink); }
.steps li::before { content: counter(step); display: block; color: var(--teal-deep); font-size: 3.25rem; font-weight: 800; line-height: 1; letter-spacing: -0.04em; }
.steps h3 { margin-top: 0.9rem; font-size: 1.3125rem; font-weight: 700; }
.steps p { margin-top: 0.4rem; max-width: 30ch; }

.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.facts dt { color: var(--teal-deep); font-size: 2rem; font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; }
.facts dd { margin-top: 0.3rem; color: var(--muted); font-size: 0.9375rem; line-height: 1.4; }

.people { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2rem 2.5rem; margin-top: 3rem; }
.people li { grid-column: span 2; padding-top: 1rem; border-top: 1px solid var(--line); }
.people .founder { grid-column: span 3; border-top: 3px solid var(--ink); }
.people .founder strong { font-size: 1.4rem; }
.people strong { display: block; font-size: 1.125rem; font-weight: 700; line-height: 1.3; }
.people span { display: block; margin-top: 0.2rem; color: var(--muted); font-size: 0.9375rem; }

/* ---------- contact and sign-up ---------- */
.contact { background: var(--ink); color: #fff; }
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2.5rem, 6vw, 5rem); padding-block: clamp(3.5rem, 8vw, 6rem); }
.contact p { max-width: var(--measure); margin-top: 1.1rem; color: var(--line); }
.contact .button { margin-top: 1.8rem; }
.contact h3 { font-size: 1.3125rem; font-weight: 700; }

.signup label { display: block; margin-top: 1.1rem; font-size: 0.9375rem; font-weight: 600; }
.signup-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.5rem; }
.signup input[type="email"] {
  flex: 1 1 14rem;
  min-width: 0;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.signup .button { margin-top: 0; }
.signup .trap { position: absolute; left: -9999px; }
.signup-note, .signup-status { margin-top: 0.8rem; font-size: 0.875rem; }
.signup-note { color: var(--muted); }
.contact .signup-note { color: #a9c1bb; }
.signup-status { min-height: 1.4em; font-weight: 700; }
.signup-status[data-state="ok"] { color: var(--teal-deep); }
.contact .signup-status[data-state="ok"] { color: var(--mint); }
.signup-status[data-state="error"] { color: var(--cue); }
.contact .signup-status[data-state="error"] { color: #ffb3cd; }

.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; padding-block: 1.6rem; border-top: 1px solid var(--raised); color: #a9c1bb; font-size: 0.875rem; }
.foot img { width: 9rem; height: auto; }

/* ---------- the unlisted conference page ---------- */
.visit { padding-block: clamp(2rem, 6vw, 4.5rem) clamp(3rem, 8vw, 6rem); }
.visit > * { max-width: 40rem; }
.visit h1 { font-size: clamp(2.3rem, 6vw, 3.6rem); font-weight: 800; line-height: 1.04; letter-spacing: -0.03em; }
.visit .lede { margin-top: 1.2rem; }
.visit section { margin-top: 2.6rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.visit h2 { font-size: 1.4rem; font-weight: 700; }
.visit section > p { margin-top: 0.4rem; color: var(--muted); }
.visit section > .button { margin-top: 1.2rem; }

/* ---------- small screens ---------- */
@media (max-width: 56rem) {
  .hero, .split, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .steps p { max-width: var(--measure); }
  .people li, .people .founder { grid-column: 1 / -1; }
  .top nav a:not(.nav-contact) { display: none; }
}
@media (max-width: 30rem) {
  .facts { grid-template-columns: minmax(0, 1fr); }
  .brand img { width: 9.5rem; }
}

/* ---------- people who prefer no motion see the finished state ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-copy > *, .hero-console, .console * { animation: none !important; }
  .console .clip, .console .timer { opacity: 1; }
}
