/* Black Tie Agents, house style: an evening in black tie.
   Every page is lacquer night over a slow satin background, with ivory type and
   brass hairlines. Ivory appears only as objects on the table: a phone, a cheque,
   a printed thread. Newsreader Light carries the voice, Hanken Grotesk the
   reading, Plex Mono the small labels. */

@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-300.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-300-italic.woff2") format("woff2"); font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("/fonts/hanken-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("/fonts/hanken-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("/fonts/hanken-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
/* Wordmark only: subset to the letters of BLACK TIE AGENTS. */
@font-face { font-family: "Marcellus"; src: url("/fonts/marcellus-wordmark.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/fonts/plexmono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --lacquer: #0b0a08;
  --ivory: #efe6d2;
  --ivory-soft: rgba(239, 230, 210, 0.74);
  --ivory-faint: rgba(239, 230, 210, 0.5);
  --line-dark: rgba(239, 230, 210, 0.16);
  --line-strong: rgba(239, 230, 210, 0.34);
  --field: rgba(239, 230, 210, 0.05);
  --paper: #f3ecdc;          /* objects: the phone, the cheque, a printed thread */
  --paper-2: #e7dfcd;        /* incoming bubbles and rows on paper */
  --object-shadow: 0 30px 60px -30px rgba(0, 0, 0, .85);
  --on-brass: #1d1404;
  --stage: 92rem;
  --ink: #0e0d0b;
  --ink-soft: #57524a;
  --line: rgba(14, 13, 11, 0.12);
  --brass: #c9a24a;
  --brass-ink: #7d5f1d;      /* brass on paper */
  --brass-tint: rgba(201, 162, 74, 0.16);
  --slip-rule: rgba(138, 106, 34, 0.4);
  --alert: #f08a7e;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: "Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --mark: "Marcellus", Cochin, "Times New Roman", serif;
  --label-font: 400 0.72rem/1.4 var(--mono);
  --label-track: 0.16em;
  --wide: 80rem;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--lacquer); color: var(--ivory); font: 400 1.0625rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; position: relative; isolation: isolate; }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 300; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
p { margin: 0; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.label, .nav a, .foot a { font: var(--label-font); letter-spacing: var(--label-track); text-transform: uppercase; }
.label { display: block; color: var(--brass); }

/* The satin: one viewport tall, pinned while the page scrolls past, behind everything. */
.satin { position: sticky; top: 0; display: block; width: 100%; height: 100svh; margin-bottom: -100svh; z-index: -2;
  background: radial-gradient(80% 60% at 70% 35%, #2a2318 0%, #12100c 55%, #0b0a08 100%); }

/* ---------- top bar ---------- */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: calc(1.6rem + env(safe-area-inset-top, 0px)) var(--gutter) 1.6rem; }
.wordmark { display: inline-flex; align-items: center; gap: .6rem; color: var(--ivory); text-decoration: none; }
.wordmark svg { width: 1.45rem; height: .85rem; fill: var(--brass); }
.wordmark span { font: 400 .95rem/1 var(--mark); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.25rem); }
.nav a { color: var(--ivory-soft); text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ivory); }

/* ---------- openings: one composed screen, like the home page ---------- */
.screen { min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; }
.stage { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; padding: 2rem var(--gutter) 3.5rem; max-width: var(--stage); width: 100%; margin: 0 auto; }
.opening { min-height: 88svh; display: grid; grid-template-rows: auto 1fr; }
.display { font-size: clamp(2.6rem, 1.4rem + 4.6vw, 5.2rem); line-height: 1.02; }
.title { font-size: clamp(2.4rem, 1.4rem + 3.8vw, 4.6rem); line-height: 1.03; }
.lede { color: var(--ivory-soft); font-size: clamp(1.02rem, .95rem + .3vw, 1.18rem); margin-top: 1.5rem; max-width: 36rem; }
.stage .label { margin-bottom: 1.2rem; color: var(--ivory-faint); }
.actions { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; align-items: center; margin-top: 2rem; }

/* hairline list on the right of an opening (practices on home, facts elsewhere) */
.list > .label { color: var(--ivory-faint); padding-bottom: 1rem; }
.list > .label + .item { border-top: 1px solid var(--line-dark); }
.item { display: grid; gap: .35rem; padding: 1.3rem 0; border-bottom: 1px solid var(--line-dark); color: var(--ivory); text-decoration: none; position: relative; }
.item h2, .item h3 { font-size: 1.5rem; font-style: italic; }
.item p { color: var(--ivory-soft); font-size: .98rem; max-width: 36rem; }
a.item p { padding-right: 2rem; }
a.item::after { content: "\2192"; position: absolute; right: 0; top: 1.45rem; color: var(--brass); font-family: var(--sans); transition: transform .2s ease; }
a.item:hover h2 { color: #fff; }
a.item:hover::after { transform: translateX(4px); }

/* ---------- reading sections: hairline-ruled, two columns ---------- */
.section { max-width: var(--wide); margin: 0 auto; padding: clamp(3.5rem, 8vw, 6.5rem) var(--gutter); border-top: 1px solid var(--line-dark); }
.section h2 { font-size: clamp(2rem, 1.4rem + 2vw, 3.1rem); line-height: 1.08; max-width: 22ch; }
.section .label { margin-bottom: 1rem; }
.intro { margin-top: 1rem; color: var(--ivory-soft); max-width: 42rem; font-size: 1.08rem; }
.split { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 2rem clamp(2rem, 6vw, 5rem); align-items: start; }
.rows { border-top: 1px solid var(--line-dark); }
.rows > * { display: grid; grid-template-columns: minmax(9rem, .7fr) minmax(0, 1.6fr); gap: .3rem 2rem; padding: 1.15rem 0; border-bottom: 1px solid var(--line-dark); }
.rows h3 { font-size: 1.3rem; font-style: italic; }
.rows p { color: var(--ivory-soft); }
.split > .rows { margin-top: .4rem; }
.steps { list-style: none; padding: 0; margin: 2.4rem 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; counter-reset: step; }
.steps--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.steps--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.steps li { counter-increment: step; border-top: 1px solid var(--line-strong); padding-top: 1rem; }
.steps li::before { content: counter(step, decimal-leading-zero); font: var(--label-font); letter-spacing: var(--label-track); color: var(--brass); display: block; margin-bottom: .9rem; }
.steps h3 { font-size: 1.35rem; margin-bottom: .4rem; }
.steps--5 h3 { font-size: 1.2rem; }

/* ---------- chat bubbles, on the ivory phone objects ---------- */
.msg { padding: .6rem .8rem; border-radius: 12px; max-width: 88%; line-height: 1.4; }
.msg--them { background: var(--paper-2); align-self: flex-start; }
.msg--you { background: var(--lacquer); color: var(--ivory); align-self: flex-end; }
.steps p { color: var(--ivory-soft); font-size: .98rem; }
.ticks { list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid; gap: .7rem; }
.ticks li { padding-left: 1.6rem; position: relative; color: var(--ivory-soft); }
.ticks li::before { content: ""; position: absolute; left: 0; top: .78em; width: .7rem; height: 1px; background: var(--brass); }
.fine { font-size: .86rem; color: var(--ivory-faint); }
.faq details { border-bottom: 1px solid var(--line-dark); padding: 1rem 0; }
.faq summary { cursor: pointer; list-style: none; font-family: var(--serif); font-size: 1.25rem; position: relative; padding-right: 2rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .2rem; top: 0; font-family: var(--sans); color: var(--brass); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--ivory-soft); margin-top: .6rem; }
.closing { text-align: center; }
.closing h2 { margin: 0 auto; }
.closing .actions { justify-content: center; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: .6rem; font: 500 .98rem/1 var(--sans); padding: .95rem 1.4rem; border-radius: 2px; text-decoration: none; cursor: pointer; border: 1px solid var(--brass); background: var(--brass); color: var(--on-brass); }
.btn:hover { background: #d5b05a; }
.btn--line { background: none; color: var(--ivory); border-color: var(--line-strong); }
.btn--line:hover { background: rgba(239,230,210,.06); border-color: var(--ivory); }
.btn:disabled { opacity: .6; cursor: progress; }
.link { background: none; border: 0; padding: .5rem .2rem; font: 500 .95rem var(--sans); color: var(--ivory-soft); cursor: pointer; text-decoration: underline; text-underline-offset: .2em; }

/* forms, dark */
.field { display: grid; gap: .45rem; align-content: start; border: 0; padding: 0; margin: 0 0 1.2rem; min-width: 0; }
.field label, .field legend { font-size: .9rem; font-weight: 500; padding: 0; color: var(--ivory); }
.optional { color: var(--ivory-faint); font-weight: 400; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.2rem; }
input:not([type=range]):not([type=radio]):not([type=checkbox]), select, textarea {
  width: 100%; font: 400 1rem/1.4 var(--sans); color: var(--ivory); background: var(--field); border: 1px solid var(--line-dark); border-radius: 2px; padding: .85rem .9rem; }
::placeholder { color: var(--ivory-faint); }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brass); outline-offset: 0; border-color: var(--brass); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ivory) 50%), linear-gradient(135deg, var(--ivory) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2.4rem; }
select option { color: var(--ink); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { color: var(--alert); font-weight: 500; margin-bottom: 1rem; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--alert); }
.consent { display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: start; font-size: .85rem; color: var(--ivory-soft); margin: .2rem 0 1.2rem; }
.consent input { margin-top: .25rem; accent-color: var(--brass); }
.received { border: 1px solid var(--line-dark); padding: 1.6rem; font-family: var(--serif); font-size: 1.5rem; }

/* contact dialog, on every page */
.contact { width: min(36rem, calc(100% - 2rem)); max-height: calc(100svh - 2rem); overflow: auto; padding: clamp(1.4rem, 4vw, 2.4rem); background: #12100c; color: var(--ivory); border: 1px solid var(--line-strong); border-radius: 2px; }
.contact::backdrop { background: rgba(5, 4, 3, .72); }
.contact header { display: flex; justify-content: space-between; align-items: start; gap: 1rem; margin-bottom: 1.4rem; }
.contact h2 { font-size: 2.2rem; line-height: 1.05; }
.contact .intro { margin-top: .5rem; font-size: 1rem; }
.close { background: none; border: 1px solid var(--line-dark); color: var(--ivory-soft); font: var(--label-font); letter-spacing: var(--label-track); text-transform: uppercase; padding: .5rem .7rem; cursor: pointer; }
.close:hover { color: var(--ivory); border-color: var(--ivory); }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line-dark); display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem 1.5rem; padding: 1.6rem var(--gutter) calc(1.6rem + env(safe-area-inset-bottom, 0px)); }
.foot a { color: var(--ivory-faint); text-decoration: none; }
.foot a:hover { color: var(--ivory); }

@media (max-width: 860px) {
  .stage { grid-template-columns: 1fr; padding-top: 2.5rem; align-items: start; }
  .split, .rows > * { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .opening { min-height: 0; }
}
@media (max-width: 640px) {
  /* Wordmark on its own line, the four nav links on the next. */
  .bar { flex-wrap: wrap; gap: .9rem 1rem; padding-bottom: 1rem; }
  .nav { width: 100%; justify-content: space-between; gap: .6rem; }
  .nav a { font-size: .66rem; letter-spacing: .12em; white-space: nowrap; }
}
@media (max-width: 560px) {
  .pair { grid-template-columns: 1fr; }
  .wordmark { gap: .45rem; }
  .wordmark span { font-size: .74rem; letter-spacing: .1em; }
  .foot { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  a.item::after { transition: none; }
}
