/* Phantom Grace Technologies — site styles (design option A, "Lit exhibits", docs/DESIGN.md).
   Tokens first; every colour below references a token. Light is the default; [data-theme="dark"] is set by js/site.js
   before first paint, and visitors without script follow the system setting through the media query. */
:root {
  --ground: #f2f3f6; --raise: #e6e8ee; --ink: #161922; --soft: #4a5160;
  --accent: #1f4fb4; --on-accent: #ffffff; --tile: #e2b53c; --field: #ffffff; --error: #b42318;
  --max: 1360px; --gutter: clamp(16px, 3vw, 32px);
}
[data-theme="dark"] {
  --ground: #0d0f15; --raise: #171a23; --ink: #eef0f6; --soft: #a8afbf;
  --accent: #6f9bff; --on-accent: #0d0f15; --tile: #e9c25a; --field: #11141c; --error: #ff8a80;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) { --ground: #0d0f15; --raise: #171a23; --ink: #eef0f6; --soft: #a8afbf;
    --accent: #6f9bff; --on-accent: #0d0f15; --tile: #e9c25a; --field: #11141c; --error: #ff8a80; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 18px/1.55 "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif; transition: background-color .4s, color .4s; }
a { color: inherit; text-underline-offset: 5px; }
img { display: block; max-width: 100%; height: auto; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--ground); padding: 10px 14px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--tile); outline-offset: 3px; }

/* Header: over the photograph on the home page, a plain bar elsewhere. */
.site-header { position: relative; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 84px; }
.site-header.over { position: absolute; inset: 0 0 auto; color: #fff; }
.mark { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.mark img { width: 52px; height: 22px; }
.mark span { font-weight: 300; letter-spacing: .08em; font-size: 18px; white-space: nowrap; }
.over .mark img, [data-theme="dark"] .mark img { filter: brightness(0) invert(1); }
.nav { display: flex; gap: 26px; align-items: center; }
.nav a { text-decoration: none; font-size: 16px; opacity: .88; }
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; text-decoration: underline; }
.toggle { border: 0; background: var(--raise); color: var(--ink); border-radius: 999px; padding: 8px 14px; font: 500 14px "IBM Plex Sans", sans-serif; cursor: pointer; }
.over .toggle { background: #fff; color: #111; }
.toggle:hover { background: var(--tile); color: #111; }

/* Home hero: the palace fills the first screen; the claim sits low-left in white over a neutral scrim. */
.hero { position: relative; height: 100vh; min-height: 640px; overflow: hidden; color: #fff; background: #3c3a35; }
.hero picture, .hero img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero img { object-fit: cover; object-position: 35% 40%; transform: scale(1.06); animation: drift 18s ease-out forwards; }
.hero::after { content: ""; position: absolute; inset: 0; background: rgba(8, 10, 16, .45); }
.hero .copy { position: absolute; left: 0; right: 0; bottom: clamp(40px, 8vh, 96px); z-index: 2; }
.hero h1 { margin: 0; font-weight: 500; font-size: clamp(44px, 7.4vw, 118px); line-height: .98; letter-spacing: -.035em; max-width: 13ch; }
.hero p { margin: 22px 0 0; max-width: 52ch; font-size: clamp(17px, 1.4vw, 20px); }
.btn { display: inline-block; border: 0; border-radius: 999px; padding: 15px 24px; font: 500 17px "IBM Plex Sans", sans-serif; text-decoration: none; cursor: pointer; transition: transform .15s, background-color .2s, color .2s; }
.btn:active { transform: scale(.97); }
.btn-light { margin-top: 30px; background: #fff; color: #111; }
.btn-light:hover { background: var(--tile); }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: var(--ink); color: var(--ground); }
.btn[disabled] { opacity: .6; cursor: progress; }
@keyframes drift { to { transform: scale(1); } }

/* About band: tiles photograph beside a cobalt field. */
.city { margin-top: clamp(100px, 14vw, 200px); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); min-height: 80vh; }
.city picture, .city img { width: 100%; height: 100%; }
.city img { object-fit: cover; }
.city .txt { background: var(--accent); color: var(--on-accent); padding: clamp(32px, 6vw, 96px); display: flex; flex-direction: column; justify-content: center; }
.city h2 { margin: 0; font-weight: 500; font-size: clamp(36px, 4.4vw, 64px); letter-spacing: -.03em; line-height: 1.02; }
.city p { max-width: 48ch; margin: 22px 0 0; }
.city .more { margin-top: 26px; font-weight: 500; }

/* Brand exhibits: one product per screen, picture large, words beside it, sides alternating. */
.exhibit { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(24px, 4vw, 72px); align-items: center; padding: clamp(80px, 12vw, 180px) 0 0; }
.exhibit:nth-child(even) { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); }
.exhibit:nth-child(even) figure { order: 2; }
.exhibit figure { margin: 0; background: var(--raise); padding: clamp(12px, 2vw, 28px); overflow: hidden; }
.exhibit figure img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.exhibit:hover figure img { transform: scale(1.02); }
.exhibit h2 { margin: 0; font-weight: 500; font-size: clamp(40px, 5vw, 76px); letter-spacing: -.03em; line-height: 1; }
.exhibit .what { margin: 10px 0 0; color: var(--accent); font-weight: 500; }
.exhibit p { margin: 18px 0 0; max-width: 40ch; }
.exhibit .go { display: inline-block; margin-top: 22px; font-weight: 500; }
.exhibit .soon { display: inline-block; margin-top: 22px; color: var(--soft); }
.drawn { aspect-ratio: 16 / 10; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-size: clamp(26px, 3vw, 44px); font-weight: 300; letter-spacing: -.02em; text-align: center; padding: 16px; }
.drawn.turmeric { background: var(--tile); color: #14171f; }
.only-dark { display: none !important; }
[data-theme="dark"] .only-dark { display: block !important; }
[data-theme="dark"] .only-light { display: none !important; }

/* Founder / careers on the home page. */
.people { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 96px); padding: clamp(100px, 14vw, 200px) 0; align-items: center; }
.portrait { background: var(--raise); display: grid; place-items: end center; padding-top: 32px; }
.portrait img { width: min(100%, 381px); }
.people h2 { margin: 0; font-weight: 500; font-size: clamp(34px, 3.6vw, 54px); letter-spacing: -.03em; line-height: 1.05; }
.people p { max-width: 56ch; }
.people .gap { margin-top: 56px; }

/* Contact close (home) and the e-mail at monument size. */
.close { background: var(--raise); padding: clamp(80px, 10vw, 140px) 0; }
.close h2 { margin: 0 0 18px; font-weight: 500; font-size: clamp(30px, 3vw, 44px); letter-spacing: -.02em; }
.big { display: block; font-size: clamp(30px, 6vw, 96px); font-weight: 500; letter-spacing: -.04em; line-height: 1; text-decoration: none; overflow-wrap: anywhere; }
.big:hover { color: var(--accent); }
.meta { display: flex; flex-wrap: wrap; gap: 12px 40px; margin-top: 32px; color: var(--soft); font-size: 16px; }

/* Inner pages. */
.page-head + .split { padding-top: 0; }
.page-head { padding: clamp(56px, 9vw, 120px) 0 clamp(40px, 6vw, 72px); }
.page-head h1 { margin: 0; font-weight: 500; font-size: clamp(42px, 6.4vw, 100px); line-height: .98; letter-spacing: -.035em; max-width: 16ch; }
.page-head p { margin: 26px 0 0; max-width: 58ch; font-size: clamp(18px, 1.5vw, 21px); }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 96px); padding: clamp(64px, 9vw, 130px) 0; align-items: start; }
.split h2 { margin: 0; font-weight: 500; font-size: clamp(30px, 3.4vw, 50px); letter-spacing: -.03em; line-height: 1.05; }
.split p { margin: 0 0 18px; max-width: 60ch; }
.split figure { margin: 0; }
.split figcaption, .caption { margin-top: 10px; color: var(--soft); font-size: 15px; }
.wide-photo { height: min(70vh, 720px); }
.wide-photo picture, .wide-photo img { width: 100%; height: 100%; }
.wide-photo img { object-fit: cover; }
.list { margin: 0; padding: 0; list-style: none; }
.list li { padding: 18px 0; }
.list li + li { margin-top: 6px; }
.list strong { display: block; font-size: 22px; font-weight: 500; }
.band { background: var(--raise); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 12px 32px; margin: 0; font-size: 17px; }
.facts dt { color: var(--soft); }
.facts dd { margin: 0; }

/* Contact form. Real form fields keep their own borders (docs/DESIGN.md). */
.form { display: grid; gap: 22px; max-width: 640px; }
.form label { display: block; font-weight: 500; font-size: 16px; margin-bottom: 8px; }
.form input, .form select, .form textarea { width: 100%; font: 400 17px "IBM Plex Sans", sans-serif; color: var(--ink); background: var(--field); border: 2px solid var(--raise); border-radius: 12px; padding: 13px 14px; transition: border-color .2s; }
.form textarea { min-height: 180px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--accent); }
.form .hint { color: var(--soft); font-size: 14px; margin-top: 6px; }
.form .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form .status { min-height: 28px; font-weight: 500; }
.form .status.ok { color: var(--accent); }
.form .status.err { color: var(--error); }

/* Legal documents. */
.doc { padding: clamp(48px, 8vw, 96px) 0 clamp(64px, 9vw, 120px); }
.doc .wrap { max-width: 820px; }
.doc h1 { margin: 0; font-size: clamp(36px, 4.6vw, 56px); font-weight: 500; letter-spacing: -.03em; line-height: 1.05; }
.doc .updated { margin: 12px 0 40px; color: var(--soft); font-size: 16px; }
.doc h2 { margin: 44px 0 12px; font-size: 23px; font-weight: 600; }
.doc p, .doc li { max-width: 68ch; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 6px; }

/* Footer: the name returns at full width. */
.site-footer { padding: clamp(56px, 8vw, 96px) 0 48px; color: var(--soft); font-size: 15px; }
.site-footer .name::before { content: "Phantom Grace"; }
.site-footer .name { display: block; color: var(--ink); font-size: clamp(40px, 8.4vw, 132px); font-weight: 500; letter-spacing: -.045em; line-height: .95; opacity: .14; margin-bottom: 36px; white-space: nowrap; overflow: hidden; }
.site-footer .row { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer a { color: var(--soft); }
.site-footer a:hover { color: var(--ink); }
.site-footer .credits { margin-top: 18px; font-size: 13px; max-width: 110ch; }

/* Entrances: hidden only when js/site.js runs, so content never depends on script. */
.js [data-step] { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.js .in [data-step], .js [data-step].in { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .exhibit, .exhibit:nth-child(even), .city, .people, .split { grid-template-columns: 1fr; }
  .exhibit:nth-child(even) figure { order: 0; }
  .city img { aspect-ratio: 4 / 3; }
  .nav a.hide { display: none; }
}
@media (max-width: 600px) {
  .nav { gap: 14px; }
  .nav a { display: none; }
  .nav a.keep { display: inline; }
  .toggle { padding: 6px 10px; font-size: 12px; }
  .mark span { display: none; }
  .hero img { animation: none; transform: none; }
  .big { font-size: 6.1vw; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero img { animation: none; transform: none; }
  .js [data-step] { opacity: 1; transform: none; transition: none; }
}
