/* Maxima Advisors: stacked sheets with keycap tabs.
   Ink on white and chalk, one tangerine used as a fill only.
   Red Hat Display for text, Red Hat Mono on keys and labels. */

:root {
  --ink: #16161a;
  --tangerine: #f47b20;
  --tangerine-deep: #d9620c;
  --white: #ffffff;
  --chalk: #f2f2ef;
  --cap: #e7e7e3;
  --cap-top: #f6f6f3;
  --skirt: #c8c8c1;
  --rule: #d6d6d0;
  --muted: #55555c;
  --display: "Red Hat Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Red Hat Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --wrap: 1180px;
  --gutter: 16px;
  --tab-h: 56px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.0625rem;
  line-height: 1.62;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--tangerine); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--tangerine-deep); text-decoration-thickness: 3px; }

:focus-visible { outline: 3px solid var(--tangerine); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 0.6em; }
h1 { font-size: clamp(2.1rem, 6vw, 4.1rem); letter-spacing: -0.028em; }
h2 { font-size: clamp(1.55rem, 3.4vw, 2.35rem); }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: 0; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
li { margin-bottom: 0.35em; }
strong { font-weight: 700; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
input.mono { font-family: var(--mono); font-weight: 600; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--ink); color: var(--white); padding: 10px 14px; }
.skip:focus { left: 8px; }

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

/* ---------- Keys ---------- */

.key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.3em;
  height: 2.3em;
  padding: 0 0.7em 0.14em;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--ink);
  background: linear-gradient(180deg, var(--cap-top), var(--cap));
  border-radius: 0.42em;
  box-shadow:
    inset 0 -0.2em 0 var(--skirt),
    inset 0 0 0 1px rgba(22, 22, 26, 0.06),
    0 1px 0 #b7b7b0,
    0 0.2em 0.5em rgba(22, 22, 26, 0.10);
  white-space: nowrap;
  text-decoration: none;
}
.key-sm { font-size: 0.75rem; }
.key.hot { background: linear-gradient(180deg, #f8893a, var(--tangerine)); box-shadow: inset 0 -0.2em 0 #c95c0c, 0 1px 0 #b85408, 0 0.2em 0.5em rgba(22, 22, 26, 0.14); }
.key.dark { color: var(--chalk); background: linear-gradient(180deg, #2a2a30, var(--ink)); box-shadow: inset 0 -0.2em 0 #000, 0 1px 0 #000, 0 0.2em 0.5em rgba(22, 22, 26, 0.2); }

/* ---------- Top bar ---------- */

.top { background: var(--white); border-bottom: 1px solid var(--rule); position: relative; z-index: 20; }
.top-in { max-width: var(--wrap); margin: 0 auto; padding: 12px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; min-height: 44px; }
.brand .mark { width: 36px; height: 36px; }
.brand-name { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; }
.menu { display: none; background: none; border: 0; padding: 4px; cursor: pointer; min-height: 44px; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.nav li { margin: 0; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-weight: 700; font-size: 0.97rem; text-decoration: none; border-radius: 6px; }
.nav a:hover { background: var(--chalk); }
.nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--tangerine); border-radius: 0; }

/* ---------- Sheets ---------- */

.sheet {
  position: relative;
  z-index: 1;
  background: var(--white);
  border-top: 1px solid var(--ink);
  box-shadow: 0 -10px 24px -18px rgba(22, 22, 26, 0.35);
}
.sheet.alt { background: var(--chalk); }

.tabrow {
  position: sticky;
  top: 0;
  z-index: 2;
  height: var(--tab-h);
  background: inherit;
  display: flex;
  align-items: center;
}
.tabrow .wrap { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tab { gap: 0.6em; }
.tab i { width: 0.55em; height: 0.55em; border-radius: 50%; background: var(--tangerine); display: inline-block; }
.tab-note { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); letter-spacing: 0.02em; }

.sheet-in { padding: 20px 0 64px; }
.grid { display: grid; grid-template-columns: 1fr; gap: 12px 40px; }
.side-label { font-family: var(--mono); font-size: 0.82rem; font-weight: 500; color: var(--muted); letter-spacing: 0.02em; margin: 0; }
.body > :last-child { margin-bottom: 0; }
.lead { font-size: clamp(1.12rem, 2vw, 1.32rem); line-height: 1.5; max-width: 40em; }
.muted { color: var(--muted); }
.small { font-size: 0.92rem; }

@media (min-width: 900px) {
  :root { --gutter: 32px; }
  .grid { grid-template-columns: repeat(12, 1fr); }
  .grid > .side-label { grid-column: 1 / span 3; padding-top: 0.55em; }
  .grid > .body { grid-column: 4 / span 8; }
  .grid > .wide { grid-column: 1 / -1; }
  .sheet-in { padding: 28px 0 96px; }
}

/* ---------- Hero ---------- */

.hero .sheet-in { padding-top: 12px; }
.hero h1 { max-width: 15em; }
.typed { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.3em 0.55em; margin: 34px 0 30px; font-size: clamp(1.35rem, 7.8vw, 3.3rem); }
.typed .word { display: inline-flex; gap: 0.14em; }
.typed .key { font-size: 1em; height: 1.42em; min-width: 1.18em; padding: 0 0.12em 0.16em; border-radius: 0.2em; font-weight: 600; box-shadow: inset 0 -0.13em 0 var(--skirt), inset 0 0 0 1px rgba(22, 22, 26, 0.06), 0 1px 0 #b7b7b0, 0 0.1em 0.3em rgba(22, 22, 26, 0.12); }
.typed .key.hot { padding: 0 0.3em 0.16em; box-shadow: inset 0 -0.13em 0 #c95c0c, 0 1px 0 #b85408, 0 0.1em 0.3em rgba(22, 22, 26, 0.16); }
.typed .key.dark { font-size: 0.42em; height: 3.38em; padding: 0 0.8em 0.34em; box-shadow: inset 0 -0.26em 0 #000, 0 1px 0 #000, 0 0.2em 0.6em rgba(22, 22, 26, 0.2); }
.typed-cap { font-family: var(--mono); font-size: 0.86rem; color: var(--muted); margin: -14px 0 26px; }

@media (prefers-reduced-motion: no-preference) {
  .typed.run .key { animation: press 0.22s ease-in-out both; animation-delay: calc(var(--i) * 110ms + 250ms); }
}
@keyframes press {
  0% { transform: translateY(0); }
  45% { transform: translateY(0.08em); box-shadow: inset 0 -0.04em 0 var(--skirt), 0 0 0 #b7b7b0; filter: brightness(0.96); }
  100% { transform: translateY(0); }
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.btn {
  display: inline-flex; align-items: center; gap: 0.7em; min-height: 48px; padding: 0 20px 2px;
  font-family: var(--display); font-weight: 700; font-size: 1rem;
  color: var(--white); background: var(--ink); border: 0; border-radius: 8px;
  box-shadow: inset 0 -3px 0 #000;
  text-decoration: none; cursor: pointer;
}
.btn:hover { color: var(--ink); background: var(--tangerine); box-shadow: inset 0 -3px 0 #c95c0c; }
.btn.ghost { color: var(--ink); background: var(--cap); box-shadow: inset 0 -3px 0 var(--skirt); }
.btn.ghost:hover { background: var(--tangerine); box-shadow: inset 0 -3px 0 #c95c0c; }
.btn .kbd { font-family: var(--mono); font-size: 0.85em; opacity: 0.8; }
.btn:disabled { opacity: 0.6; cursor: wait; }

.more { display: inline-flex; align-items: center; gap: 0.5em; min-height: 44px; font-weight: 700; }

/* ---------- Lists of rows (who, pairs) ---------- */

.rows { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.rows > li { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; align-items: start; align-content: start; padding: 20px 0; margin: 0; border-top: 1px solid var(--rule); }
.rows > li:first-child { border-top: 0; padding-top: 4px; }
.rows .key { margin-top: 0.1em; }
.rows h3 { margin: 0 0 0.2em; }
.rows p { margin: 0; }

/* The function-key strip */
.fkeys { list-style: none; padding: 0; margin: 0 0 8px; display: grid; grid-template-columns: 1fr; gap: 14px; counter-reset: none; }
.fkeys > li { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; align-items: start; align-content: start; }
.fkeys .key { font-size: 0.95rem; min-width: 3em; height: 2.6em; }
.fkeys h3 { margin: 0.2em 0 0.15em; }
.fkeys p { margin: 0; }
@media (min-width: 900px) {
  .fkeys.strip { grid-template-columns: repeat(5, 1fr); gap: 22px; }
  .fkeys.strip > li { grid-template-columns: 1fr; }
  .fkeys.strip .key { justify-self: start; }
}

/* Two-up answers */
.pairs { display: grid; grid-template-columns: 1fr; gap: 28px 40px; }
.pairs h3 { margin-bottom: 0.35em; }
.pairs p:last-child { margin-bottom: 0; }
@media (min-width: 760px) { .pairs { grid-template-columns: 1fr 1fr; } }

/* ---------- About ---------- */

.portrait { margin: 0 0 12px; max-width: 360px; }
.portrait img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border: 1px solid var(--ink); }
.portrait figcaption { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 14px; font-size: 0.95rem; }
.portrait figcaption span { color: var(--muted); }
.person { display: grid; grid-template-columns: 1fr; gap: 24px 40px; align-items: start; }
@media (min-width: 900px) { .person { grid-template-columns: 300px 1fr; } }
.thumb { width: 96px; height: 96px; object-fit: cover; border: 1px solid var(--ink); }

/* ---------- Contact form ---------- */

.cols { display: grid; grid-template-columns: 1fr; gap: 40px; }
@media (min-width: 960px) { .cols { grid-template-columns: 7fr 4fr; gap: 64px; } }
.fields { display: grid; gap: 18px; }
.pair2 { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .pair2 { grid-template-columns: 1fr 1fr; } }
label { display: block; font-weight: 700; margin-bottom: 6px; }
.opt { font-weight: 500; color: var(--muted); }
input, select, textarea {
  width: 100%; min-height: 48px; padding: 10px 12px;
  font: inherit; color: var(--ink); background: var(--white);
  border: 1px solid #8f8f8a; border-radius: 6px;
}
textarea { min-height: 150px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--tangerine); outline-offset: 1px; border-color: var(--ink); }
.domain-field { display: flex; align-items: stretch; }
.domain-field input { font-family: var(--mono); font-weight: 600; }
.hint { font-size: 0.9rem; color: var(--muted); margin: 6px 0 0; }
.status { font-weight: 700; padding: 12px 14px; border-left: 4px solid var(--tangerine); background: var(--white); margin: 0; }
.status.bad { border-left-color: var(--ink); }
.aside h2 { font-size: 1.15rem; margin: 0 0 0.5em; }
.aside p, .aside address { margin-bottom: 1.4em; }
address { font-style: normal; }
.cf-turnstile { min-height: 65px; }

/* ---------- Legal ---------- */

.legal h2 { font-size: 1.3rem; margin-top: 1.6em; }
.legal h2:first-child { margin-top: 0; }

/* ---------- Footer ---------- */

.foot { background: var(--ink); color: #e9e9e5; border-top: 1px solid var(--ink); }
.foot a { color: #ffffff; }
.foot-in { max-width: var(--wrap); margin: 0 auto; padding: 56px var(--gutter) 32px; display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .foot-in { grid-template-columns: 5fr 4fr 3fr; } }
.foot-name { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.2rem; color: #ffffff; }
.foot-name .mark { width: 32px; height: 32px; }
.foot-h { font-family: var(--mono); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: #bdbdb7; margin: 0 0 12px; }
.foot-links { list-style: none; padding: 0; margin: 0; }
.foot-links a { display: inline-flex; min-height: 36px; align-items: center; }
.foot address a { display: inline-block; padding: 4px 0; }
.foot-base { max-width: var(--wrap); margin: 0 auto; padding: 18px var(--gutter) 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-family: var(--mono); font-size: 0.8rem; color: #bdbdb7; border-top: 1px solid #34343a; }

/* ---------- Phone ---------- */

@media (max-width: 859px) {
  .menu { display: inline-flex; }
  .nav { display: none; width: 100%; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; gap: 0; padding: 6px 0 8px; }
  .nav a { width: 100%; border-top: 1px solid var(--rule); border-radius: 0; }
  .nav a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--tangerine); }
  :root { --tab-h: 52px; }
  .tab-note { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
