/* Layout: a daylight masthead pairing the pitch with a working-style touch panel, then calm blue-grey sections;
   services as a 2-over-3 panel of tiles. One light look for every visitor (no dark mode, by the owner's choice). */
@font-face { font-family: "Chakra Petch"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/chakra-petch-600.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 100 700; font-style: normal; font-display: swap; src: url("/fonts/ibm-plex-sans.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fonts/ibm-plex-mono-500.woff2") format("woff2"); }

:root {
  --ground: #e9eef4;       /* page: soft blue-grey, not white */
  --sky: #d6e3f1;          /* masthead */
  --surface: #f6f8fb;      /* tiles and contact band */
  --ink: #14233a;          /* text, logo */
  --muted: #4c5b70;
  --line: #c9d4e1;
  --cobalt: #1f5bc0;       /* links, buttons */
  --cobalt-ink: #ffffff;
  --amber: #ef9a2f;        /* "lit" state, borrowed from touch panel buttons */
  --amber-ink: #241503;
  --bezel: #1b2433;
  --screen-a: #1e4370;
  --screen-b: #132c4b;
  --screen-fg: #f1f5fa;
  --screen-muted: #a9bdd5;
  --font-display: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --gutter-l: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font-body);
  -webkit-text-size-adjust: 100%;
}

.wrap { max-width: 70rem; margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }

a { color: var(--cobalt); }
a:focus-visible, .button:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 1.3rem + 3.2vw, 3.5rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.65rem, 1.3rem + 1.3vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0; }

.spec {
  font-family: var(--font-mono); font-weight: 500; font-size: 0.78rem;
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--cobalt);
}

/* Masthead */
.masthead {
  background:
    linear-gradient(rgba(31, 91, 192, 0.055) 1px, transparent 1px) 0 0 / 2rem 2rem,
    linear-gradient(90deg, rgba(31, 91, 192, 0.055) 1px, transparent 1px) 0 0 / 2rem 2rem,
    radial-gradient(60rem 30rem at 85% 20%, #e6eef8 0%, transparent 60%),
    linear-gradient(180deg, var(--sky) 0%, var(--ground) 100%);
  margin-top: calc(-1 * env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.2rem; }
.brand { color: var(--ink); display: inline-flex; }
.logo { height: 2.3rem; width: auto; display: block; }
.bar nav { display: flex; gap: 1.6rem; }
.bar nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; font-weight: 600; }
.bar nav a:hover, .bar nav a:focus-visible { color: var(--ink); }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 3.5rem; padding-block: 3rem 4.5rem; }
.hero-text { display: grid; gap: 1.4rem; min-width: 0; }
.badge {
  justify-self: start; display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-mono); font-weight: 500; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line); padding: 0.35rem 0.75rem;
}
.badge::before { content: ""; width: 0.5rem; height: 0.5rem; background: var(--amber); transform: rotate(45deg); }
.lede { color: var(--muted); font-size: 1.18rem; max-width: 34rem; }

.button {
  display: inline-block; justify-self: start; padding: 0.85rem 1.35rem;
  background: var(--cobalt); color: var(--cobalt-ink);
  font-weight: 600; text-decoration: none; border-radius: 3px;
  box-shadow: 0 1px 0 rgba(20, 35, 58, 0.15);
  overflow-wrap: anywhere;
}
.button:hover { background: #1a4fa8; }

/* The example touch panel */
.demo { margin: 0; display: grid; gap: 0.7rem; justify-items: center; min-width: 0; }
.bezel {
  width: 100%; max-width: 31rem; padding: 0.85rem; border-radius: 1.1rem; background: var(--bezel);
  box-shadow: 0 24px 48px -20px rgba(20, 35, 58, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.screen {
  border-radius: 0.45rem; padding: 0.9rem; display: grid; gap: 0.7rem;
  background: linear-gradient(160deg, var(--screen-a), var(--screen-b));
  color: var(--screen-fg);
}
.scr-top { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--font-display); font-size: 1.05rem; }
.scr-top .time { font-family: var(--font-mono); font-size: 0.8rem; color: var(--screen-muted); }
.keys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.key {
  transition: background-color 0.35s ease, border-color 0.35s ease, color 0.35s ease;
  display: grid; gap: 0.1rem; padding: 0.65rem 0.7rem; border-radius: 0.4rem; min-width: 0;
  background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.12);
}
.key b { font-weight: 600; font-size: 0.92rem; }
.key span { font-family: var(--font-mono); font-size: 0.72rem; color: var(--screen-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.key.on { background: var(--amber); border-color: var(--amber); color: var(--amber-ink); }
.key .level { display: block; height: 3px; margin-top: 0.35rem; border-radius: 2px; background: rgba(255, 255, 255, 0.15); overflow: hidden; }
.key .level::before { content: ""; display: block; height: 100%; width: var(--lvl, 20%); background: var(--amber); transition: width 0.6s ease; }
.key.on span { color: var(--amber-ink); opacity: 0.8; }
.scenes { display: flex; gap: 0.5rem; }
.scene {
  font: inherit; cursor: pointer; background: transparent; transition: background-color 0.25s ease, color 0.25s ease;
  flex: 1; text-align: center; padding: 0.45rem 0.3rem; border-radius: 999px; font-size: 0.82rem; font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2); color: var(--screen-fg);
}
.scene:hover { border-color: var(--screen-fg); }
.scene:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.scene.on { background: var(--screen-fg); color: var(--screen-b); border-color: var(--screen-fg); }
.demo figcaption { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }

/* The logo's two halves slide together once, on load */
.logo .m-outline, .logo .m-solid { transform-box: fill-box; }
@media (prefers-reduced-motion: no-preference) {
  .logo .m-outline { animation: from-top-left 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .logo .m-solid { animation: from-bottom-right 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s both; }
  .logo .m-word { animation: fade-in 0.6s ease 0.55s both; }
}
@keyframes from-top-left { from { transform: translate(-28%, -28%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes from-bottom-right { from { transform: translate(28%, 28%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Sections */
.section { padding-block: 4.5rem; }
.section-head { display: grid; gap: 0.7rem; margin-bottom: 2.2rem; max-width: 40rem; }
.section-head p { color: var(--muted); }

.tiles {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 4px; overflow: hidden;
}
.tile { grid-column: span 2; background: var(--surface); padding: 1.6rem 1.5rem 1.7rem; display: grid; align-content: start; gap: 0.6rem; min-width: 0; }
.tile.wide { grid-column: span 3; }
.tile p { color: var(--muted); }
.tile { transition: background-color 0.2s ease; }
.tile:hover { background: #fbfcfe; }
.icon {
  width: 2.6rem; height: 2.6rem; padding: 0.55rem; margin-bottom: 0.3rem;
  background: var(--sky); color: var(--cobalt); border-radius: 3px;
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: square; stroke-linejoin: miter;
}
.tile:hover .spec { color: var(--ink); }

.process { background: var(--surface); border-block: 1px solid var(--line); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; position: relative; }
.steps::before {
  content: ""; position: absolute; left: 1.25rem; right: 1.25rem; top: 1.25rem; height: 2px;
  background: linear-gradient(90deg, var(--cobalt), var(--amber));
}
.steps li { display: grid; gap: 0.65rem; align-content: start; position: relative; min-width: 0; }
.steps p { color: var(--muted); }
.step-no {
  width: 2.5rem; height: 2.5rem; display: grid; place-items: center; margin-bottom: 0.4rem;
  background: var(--surface); border: 2px solid var(--cobalt); color: var(--cobalt);
  font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; line-height: 1; transform: rotate(45deg);
}
.step-no > span { transform: rotate(-45deg); }
.steps li:last-child .step-no { border-color: var(--amber); color: var(--ink); background: var(--amber); }

.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3.5rem; align-items: start; }
.about-text { display: grid; gap: 1.1rem; align-content: start; }
.code { margin: 0; border-radius: 6px; overflow: hidden; background: var(--screen-b); border: 1px solid var(--bezel); min-width: 0;
  box-shadow: 0 18px 36px -24px rgba(20, 35, 58, 0.5); }
.code-bar { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0.9rem; background: var(--bezel);
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--screen-muted); }
.code-bar span:last-child { color: var(--amber); }
.code pre { margin: 0; padding: 1rem 1.1rem 1.2rem; overflow-x: auto; font-family: var(--font-mono); font-size: 0.8rem; line-height: 1.6; color: var(--screen-fg); }
.code .k { color: #f2b25f; }
.code .s { color: #9fd8b0; }
.code .n { color: #c9a8f0; }
.code .f { color: #8cc4f5; }
.code .c { color: var(--screen-muted); font-style: italic; }

.facts { margin-top: 0.6rem; display: grid; gap: 1.8rem; align-content: start; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 1.6rem 1.6rem 1.8rem; }
.facts div { display: grid; gap: 0.7rem; }
.facts ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.55rem; }
.facts li { padding-left: 1.15rem; position: relative; color: var(--muted); }
.facts li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 0.45rem; height: 0.45rem; background: var(--amber); transform: rotate(45deg); }

.contact { background: var(--sky); border-top: 1px solid var(--line); position: relative; overflow: hidden; }
.contact .wrap { position: relative; }
.contact-mark { position: absolute; right: -2rem; top: -3.5rem; width: 15rem; height: auto; color: var(--ink); opacity: 0.07; pointer-events: none; }
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem; margin-bottom: 2rem; max-width: 52rem; }
.contact-grid div { display: grid; gap: 0.6rem; align-content: start; }
.contact-grid p { color: var(--muted); }
.email { justify-self: start; display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; min-width: 0; }
button.button { font: inherit; font-weight: 600; border: 0; cursor: pointer; }
.copy {
  font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; padding: 0.55rem 0.9rem; border-radius: 3px;
  background: transparent; color: var(--cobalt); border: 1px solid var(--cobalt);
}
.copy:hover { background: var(--surface); }
.copy:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; }
.reach { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; }
.reach .place { color: var(--muted); }

footer { background: var(--sky); padding-block: 1.6rem; color: var(--muted); font-size: 0.875rem; border-top: 1px solid var(--line); }

@media (max-width: 56rem) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.2rem 2rem; }
  .steps::before { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; padding-block: 2rem 3.5rem; }
  .about { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile, .tile.wide { grid-column: span 1; }
  .tile.first { grid-column: span 2; }
}
@media (max-width: 36rem) {
  .steps { grid-template-columns: minmax(0, 1fr); }
  .tiles, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .tile.first { grid-column: span 1; }
  .contact-grid { gap: 1.8rem; }
  .bar nav { gap: 1.1rem; }
  .logo { height: 1.9rem; }
  .section { padding-block: 3.25rem; }
  .bezel { padding: 0.6rem; border-radius: 0.9rem; }
  .screen { padding: 0.7rem; }
  .key { padding: 0.55rem; }
  .contact-mark { width: 10rem; right: -2.5rem; }
}
@media (max-width: 26rem) {
  .bar nav { display: none; }
}
