/* Apex Frame Designs — dark theme carried over from the original site:
   near-black ground, electric blue accent, Instrument Serif display, Plus Jakarta Sans text. */

@font-face { font-family: "Instrument Serif"; font-weight: 400; font-display: swap; src: url("fonts/instrument-serif-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-weight: 400; font-style: italic; font-display: swap; src: url("fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 400; font-display: swap; src: url("fonts/plus-jakarta-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 500; font-display: swap; src: url("fonts/plus-jakarta-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 600; font-display: swap; src: url("fonts/plus-jakarta-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 700; font-display: swap; src: url("fonts/plus-jakarta-sans-latin-700-normal.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  --bg: #0a0a0f;
  --bg-alt: #0e0e15;
  --card: #111118;
  --card-hover: #16161f;
  --surface: #1a1a24;
  --border: #222233;
  --border-soft: rgba(255, 255, 255, 0.06);
  --text: #e8e8f0;
  --muted: #9a9ab2;
  --accent: #4f6df5;
  --accent-hover: #6380ff;
  --accent-light: #7d93ff;
  --accent-glow: rgba(79, 109, 245, 0.15);
  --green: #34d399;
  --star: #f5b83d;

  --display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --body: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;

  --gutter: clamp(20px, 4.5vw, 48px);
  --max: 1160px;
  --section: clamp(72px, 9vw, 120px);
  --radius: 16px;
  --radius-sm: 10px;
  --out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 24px; background: var(--bg); scrollbar-color: var(--border) var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  caret-color: var(--accent-light);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
::selection { background: var(--accent); color: #fff; }

img, svg, iframe { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: var(--accent-light); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: #a3b3ff; }
:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: var(--gutter); top: -80px; z-index: 10;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 100px; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; color: #fff; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: -0.02em; line-height: 1.05; text-wrap: balance; }
h1 { font-size: clamp(2.9rem, 7vw, 5.2rem); }
h2 { font-size: clamp(2.2rem, 4.4vw, 3.3rem); }
h3 { font-size: clamp(1.55rem, 2.3vw, 1.85rem); line-height: 1.12; letter-spacing: -0.01em; }
h1 em, h2 em { font-style: italic; color: var(--accent-light); }
.lede { font-size: clamp(1.1rem, 1.5vw, 1.25rem); line-height: 1.6; color: var(--muted); max-width: 36em; }
.note { font-size: 0.78rem; font-weight: 600; line-height: 1.5; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-light); }
.muted { color: var(--muted); }
.measure { max-width: 38em; }

/* ---------- header ---------- */
.on-blue { position: relative; }
.masthead { position: relative; z-index: 2; border-bottom: 1px solid var(--border-soft); }
.masthead .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 28px; padding-block: 16px; }
.wordmark { font-family: var(--display); font-size: 1.6rem; line-height: 1; letter-spacing: -0.02em; color: var(--text); text-decoration: none; }
.wordmark:hover { color: var(--text); }
.wordmark span { color: var(--accent-light); }
.nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 32px); }
.nav a:not(.btn) { color: var(--muted); font-weight: 500; font-size: 0.95rem; text-decoration: none; padding-block: 6px; transition: color 140ms var(--out); }
.nav a:not(.btn):hover { color: var(--text); }
.nav a:not(.btn)[aria-current="page"] { color: var(--text); box-shadow: 0 2px 0 var(--accent); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 13px 26px;
  border: 1px solid transparent; border-radius: 100px;
  font: 600 1rem/1.2 var(--body); text-decoration: none; cursor: pointer;
  transition: background-color 150ms var(--out), border-color 150ms var(--out), box-shadow 150ms var(--out), transform 100ms var(--out);
}
.btn:active { transform: scale(0.97); }
.btn--chalk, .btn--ink { background: var(--accent); color: #fff; }
.btn--chalk:hover, .btn--ink:hover { background: var(--accent-hover); color: #fff; box-shadow: 0 8px 28px rgba(79, 109, 245, 0.38); }
.btn--ghost { border-color: var(--border); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); background: var(--accent-glow); color: var(--text); }
.btn--outline { background: var(--accent); color: #fff; min-height: 42px; padding: 9px 20px; font-size: 0.9rem; }
.btn--outline:hover { background: var(--accent-hover); color: #fff; box-shadow: 0 6px 24px rgba(79, 109, 245, 0.35); }
.btn--outline[aria-current="page"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.more { font-weight: 600; white-space: nowrap; text-decoration: none; }
.more:hover { text-decoration: underline; }
.more::after { content: " \2192"; }
.ext::after { content: " \2197"; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; left: 50%; top: -340px; width: 1100px; height: 900px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(79, 109, 245, 0.2), transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 80px 80px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 80% at 50% 0%, #000 30%, transparent 75%);
}
.hero .wrap { position: relative; z-index: 1; text-align: center; display: grid; justify-items: center; padding-block: clamp(64px, 10vw, 128px) clamp(64px, 9vw, 112px); }
.hero h1 { max-width: 13em; margin-bottom: 26px; }
.hero .lede { margin-inline: auto; }
.pill {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 30px;
  padding: 7px 16px; border: 1px solid rgba(79, 109, 245, 0.3); border-radius: 100px;
  background: rgba(79, 109, 245, 0.1); color: var(--accent-light); font-size: 0.85rem; font-weight: 500;
}
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: 36px; }
.hero .actions { justify-content: center; }
.hero .facts { margin-top: 48px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 12px; }
.hero .facts span { padding: 6px 14px; border: 1px solid var(--border); border-radius: 100px; background: var(--card); color: var(--muted); font-size: 0.82rem; font-weight: 500; }

.hero--sheet .wrap { padding-block: clamp(56px, 8vw, 104px) clamp(56px, 8vw, 96px); }
.hero--sheet h1 { font-size: clamp(2.7rem, 6.2vw, 4.6rem); margin-bottom: 0; }
.sheet-no { display: block; margin-bottom: 18px; }

/* ---------- sections ---------- */
.sheet { padding-block: var(--section); border-top: 1px solid var(--border-soft); }
.sheet--step { background: var(--bg-alt); }
.sheet-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 56px; align-items: end; margin-bottom: clamp(36px, 5vw, 60px); }
.sheet-head p { color: var(--muted); max-width: 32em; }

/* review */
.review {
  display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px 48px; align-items: start;
  padding: clamp(28px, 4.5vw, 56px); border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(140deg, rgba(79, 109, 245, 0.12), transparent 55%), var(--card);
}
.review-meta { display: grid; gap: 10px; justify-items: start; }
.review-meta h2 { font-family: var(--body); }
.stars { display: flex; gap: 3px; color: var(--star); }
.stars svg { width: 20px; height: 20px; }
.review blockquote p { font-family: var(--display); font-size: clamp(1.9rem, 4vw, 3.1rem); line-height: 1.12; letter-spacing: -0.015em; text-wrap: balance; }
.review figcaption { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 4px 22px; align-items: baseline; color: var(--muted); }
.review figcaption strong { font-weight: 600; color: var(--text); }

/* services */
.ledger { display: grid; gap: 16px; }
.ledger > li {
  display: grid; grid-template-columns: 52px minmax(0, 1.1fr) minmax(0, 1fr); gap: 12px 36px;
  padding: clamp(24px, 3vw, 36px); border: 1px solid var(--border); border-radius: var(--radius); background: var(--card);
  transition: background-color 180ms var(--out), border-color 180ms var(--out);
}
.ledger > li:hover { background: var(--card-hover); border-color: rgba(79, 109, 245, 0.45); }
.tag {
  font-family: var(--body); font-weight: 700; font-size: 0.95rem; line-height: 1; font-style: normal; letter-spacing: 0;
  width: 44px; height: 44px; display: grid; place-items: center; flex: none;
  border-radius: 12px; background: var(--accent-glow); color: var(--accent-light);
}
.ledger h3 { margin-bottom: 10px; }
.ledger p { color: var(--muted); max-width: 30em; }
.ledger .more { display: inline-block; margin-top: 14px; }
.spec { display: grid; gap: 10px; font-size: 0.97rem; align-content: start; }
.spec li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; }
.spec li::before { content: "\2713"; color: var(--green); font-weight: 700; }

/* services page */
.scope { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 28px 64px; align-items: start; }
.scope h2 { display: flex; gap: 16px; align-items: center; }
.scope > div > .lede { margin-top: 20px; }
.scope dl { border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); padding: 6px clamp(18px, 2.4vw, 28px); }
.sheet--step .scope dl { background: var(--surface); }
.scope dl > div { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 4px 24px; padding-block: 16px; }
.scope dl > div + div { border-top: 1px solid var(--border); }
.scope dt { font-weight: 600; }
.scope dd { color: var(--muted); font-size: 0.97rem; }
.plain { margin-top: 22px; padding: 16px 18px; border: 1px solid rgba(79, 109, 245, 0.3); border-radius: var(--radius-sm); background: rgba(79, 109, 245, 0.08); font-size: 0.97rem; }

/* work */
.works { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 36px; }
.works--stack { grid-template-columns: 1fr; gap: clamp(64px, 8vw, 104px); }
.work { display: grid; gap: 22px; align-content: start; }
.works--stack .work { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 28px 52px; align-items: start; }
.frame {
  position: relative; display: block; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--card);
  transition: border-color 180ms var(--out), box-shadow 180ms var(--out), transform 180ms var(--out);
}
.frame:hover, .frame:focus-within { border-color: var(--accent); box-shadow: 0 18px 60px rgba(79, 109, 245, 0.22); transform: translateY(-3px); }
.frame .cover { position: absolute; inset: 0; z-index: 2; border-radius: var(--radius); }
.preview { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface); }
.preview .loading { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 16px; color: var(--muted); }
.preview iframe { position: absolute; left: 0; top: 0; width: 1280px; height: 800px; max-width: none; border: 0; transform-origin: 0 0; transform: scale(var(--s, 0.4)); pointer-events: none; }
.work h3 a { color: var(--text); text-decoration: none; }
.work h3 a:hover { color: var(--accent-light); }
.work-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 10px; }
.work p + p { margin-top: 12px; }
.work .body p { color: var(--muted); }
.work .body .work-meta { color: var(--accent-light); }
.work .links { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.work blockquote { margin-top: 22px; padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card); }
.work .body blockquote p { color: var(--text); font-weight: 500; }
.work blockquote footer { margin-top: 6px; }
.facts-list { margin-top: 22px; border-top: 1px solid var(--border); }
.facts-list > div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding-block: 10px; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
.facts-list dt { color: var(--muted); }

/* process + principles */
.steps, .principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.steps { counter-reset: step; }
.steps li, .principles li { padding: clamp(24px, 2.6vw, 32px); border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.sheet--step .steps li, .sheet--step .principles li { background: var(--surface); }
.steps li { counter-increment: step; }
.steps li::before { content: "0" counter(step); display: block; font-family: var(--display); font-size: 2.6rem; line-height: 1; color: var(--accent-light); margin-bottom: 20px; }
.steps h3, .principles h3 { margin-bottom: 10px; }
.steps p, .principles p { color: var(--muted); }

/* about */
.about { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 36px 64px; align-items: start; }
.portrait img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; border-radius: var(--radius); border: 1px solid var(--border); }
.portrait figcaption { margin-top: 16px; }
.about .bio p { color: var(--muted); }
.about .bio p + p { margin-top: 1.1em; }
.about .bio h2 { margin-bottom: 24px; font-size: clamp(2rem, 3.6vw, 2.8rem); }

/* faq */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card); transition: border-color 150ms var(--out); }
.faq details[open], .faq details:hover { border-color: rgba(79, 109, 245, 0.45); }
.faq summary {
  display: grid; grid-template-columns: 1fr 20px; gap: 20px; align-items: center;
  padding: 18px 22px; cursor: pointer; list-style: none; font-weight: 600; font-size: 1.05rem; line-height: 1.35; border-radius: var(--radius-sm);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 1.4rem; line-height: 1; text-align: center; color: var(--accent-light); }
.faq details[open] summary::after { content: "\2212"; }
.faq details > p { padding: 0 48px 20px 22px; color: var(--muted); max-width: 42em; }

/* booking */
.book { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr); gap: 40px 56px; align-items: start; }
.cal { border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); min-height: 720px; position: relative; overflow: hidden; }
.cal .calendly-inline-widget { min-width: 280px; height: 720px; position: relative; z-index: 1; }
.cal .fallback { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 16px; text-align: center; padding: 24px; color: var(--muted); }
.cal:has(iframe) .fallback { display: none; }
.reach { display: grid; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); padding: 6px 22px; }
.reach > div { padding-block: 16px; display: grid; gap: 4px; }
.reach > div + div { border-top: 1px solid var(--border); }
.reach dd { font-size: 1.05rem; font-weight: 500; overflow-wrap: anywhere; }
.reach dd a { color: var(--text); text-decoration: none; }
.reach dd a:hover { color: var(--accent-light); }

/* closing band */
.close { position: relative; overflow: hidden; border-top: 1px solid var(--border-soft); text-align: center; }
.close::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 900px; height: 520px; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(79, 109, 245, 0.16), transparent 70%); pointer-events: none;
}
.close .wrap { position: relative; padding-block: clamp(72px, 10vw, 128px); display: grid; justify-items: center; gap: 0; }
.close p { margin-top: 18px; color: var(--muted); max-width: 32em; }
.close .actions { justify-content: center; }
.close .tel { color: var(--muted); font-weight: 500; }
.close .tel:hover { color: var(--text); }

/* footer */
.foot { border-top: 1px solid var(--border-soft); background: var(--bg-alt); font-size: 0.95rem; }
.foot .wrap { padding-block: 48px 32px; display: grid; grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 0.9fr)); gap: 32px 48px; }
.foot h2 { font: 600 0.75rem/1.4 var(--body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.foot ul { display: grid; gap: 9px; }
.foot ul a { color: var(--text); text-decoration: none; }
.foot ul a:hover { color: var(--accent-light); }
.foot .blurb { margin-top: 14px; color: var(--muted); max-width: 26em; }
.foot .legal { grid-column: 1 / -1; padding-top: 22px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.85rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; }

/* 404 */
.lost .wrap { padding-block: clamp(80px, 14vw, 180px); text-align: center; display: grid; justify-items: center; }
.lost .actions { justify-content: center; }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .sheet-head, .review, .scope, .about, .book, .works--stack .work { grid-template-columns: 1fr; }
  .works { grid-template-columns: 1fr; }
  .steps, .principles { grid-template-columns: 1fr; }
  .ledger > li { grid-template-columns: 52px 1fr; }
  .ledger .spec { grid-column: 2; margin-top: 8px; }
  .foot .wrap { grid-template-columns: 1fr 1fr; }
  .foot .brand { grid-column: 1 / -1; }
  .portrait { max-width: 380px; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .masthead .nav { width: 100%; justify-content: space-between; gap: 12px; }
  .ledger > li { grid-template-columns: 1fr; }
  .ledger .spec { grid-column: 1; }
  .scope dl > div, .facts-list > div { grid-template-columns: 1fr; gap: 2px; }
  .faq details > p { padding-right: 22px; }
  .foot .wrap { grid-template-columns: 1fr; }
  .hero .actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .frame:hover, .frame:focus-within { transform: none; }
}
