/* amphireach.com — cool grey paper, rounded tiles, one grotesk, orange for what is live.
   Layout: 12-column grid; tiles in pairs; a full-bleed image under the hero. */
:root {
  --paper: #F7F8FA;
  --ink: #1E2024;
  --mute: #6E7380;
  --line: #DEE1E6;
  --panel: #EDEFF2;
  --pill: #E3E5E9;
  --accent: #E8541E;
  --on-accent: #FFFFFF;
  --on-ink: #F7F8FA;
  --font: 'Familjen Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --r: 8px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121417; --ink: #ECEEF1; --mute: #9AA0AB; --line: #2A2E35; --panel: #1C1F24; --pill: #262A31;
    --accent: #FF7A3D; --on-accent: #121417; --on-ink: #121417; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #121417; --ink: #ECEEF1; --mute: #9AA0AB; --line: #2A2E35; --panel: #1C1F24; --pill: #262A31;
  --accent: #FF7A3D; --on-accent: #121417; --on-ink: #121417; color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.5; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; text-wrap: balance; letter-spacing: -0.02em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: 1360px; margin: 0 auto; padding-inline: clamp(20px, 3vw, 40px); }
.ext::after { content: " ↗"; font-size: 0.85em; }
.inline-link { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-color: var(--line); }
.inline-link:hover { text-decoration-color: currentColor; }

/* header */
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.site-head .wrap { display: flex; align-items: center; gap: 28px; height: 76px; }
.mark { font-size: 21px; font-weight: 500; letter-spacing: -0.02em; display: inline-flex; align-items: baseline; gap: 7px; margin-right: auto; }
.mark::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.nav { display: flex; gap: 24px; font-size: 17px; }
.nav a[aria-current="page"] { color: var(--mute); }
.menu-btn { display: none; width: 48px; height: 48px; border: 0; border-radius: var(--r); background: var(--pill); color: var(--ink); cursor: pointer; font: inherit; align-items: center; justify-content: center; }
.menu-btn svg { width: 20px; height: 20px; }
.menu-panel { display: none; }
@media (max-width: 900px) {
  .nav { display: none; }
  .menu-btn { display: inline-flex; }
  .menu-panel.open { display: block; border-top: 1px solid var(--line); }
  .menu-panel ul { display: grid; gap: 6px; padding-block: 16px 20px; font-size: 26px; letter-spacing: -0.02em; }
  .menu-panel a { display: block; padding: 6px 0; }
}

/* hero */
.hero { padding-block: clamp(40px, 7vw, 96px) clamp(28px, 4vw, 48px); }
.hero h1 { font-size: clamp(38px, 5.6vw, 78px); line-height: 1.04; letter-spacing: -0.03em; max-width: 16ch; }
.hero .sub { margin-top: 22px; font-size: clamp(18px, 1.6vw, 21px); color: var(--mute); max-width: 56ch; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-top: clamp(28px, 4vw, 48px); max-width: 760px; }
.tile-btn { display: flex; flex-direction: column; justify-content: space-between; min-height: 132px; padding: 22px 24px; border-radius: var(--r); background: var(--panel); font-size: 19px; }
.tile-btn.primary { background: var(--ink); color: var(--on-ink); }
.tile-btn .arrow { align-self: flex-end; font-size: 20px; }
.tile-btn:hover { background: var(--pill); }
.tile-btn.primary:hover { background: color-mix(in srgb, var(--ink) 85%, var(--paper)); }
.bleed { margin-top: clamp(24px, 4vw, 48px); }
.bleed figure { margin: 0; }
.bleed img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r); background: var(--panel); }
/* AR-Mini engraving (ar-mini-3d.js): a poster until the first frame is drawn */
.ar3d { position: relative; aspect-ratio: 16 / 9; width: 100%; max-width: 100%; background: var(--panel); border-radius: var(--r); overflow: hidden; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.ar3d:active { cursor: grabbing; }
.ar3d picture, .bleed .ar3d img, .ar3d canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; border-radius: 0; aspect-ratio: auto; }
.ar3d img { object-fit: cover; }
.ar3d canvas { opacity: 0; transition: opacity .5s ease; }
.ar3d.live canvas { opacity: 1; }
.ar3d-lift { position: absolute; left: 14px; bottom: 14px; z-index: 2; font: inherit; font-size: 15px; font-weight: 500; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); cursor: pointer; }
.ar3d-lift:hover { background: var(--ink); color: var(--on-ink); }
.ar3d-lift[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.ar3d-hint { position: absolute; right: 14px; bottom: 14px; margin: 0; color: var(--mute); font-size: 14px; pointer-events: none; }
.ar3d-tip { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; background: var(--ink); color: var(--on-ink); font-size: 14px; line-height: 1.3; padding: 6px 10px; border-radius: 6px; white-space: nowrap; }
@media (max-width: 640px) { .ar3d { aspect-ratio: 4 / 3; } .ar3d-hint { display: none; } .ar3d-lift { left: 10px; bottom: 10px; font-size: 14px; padding: 6px 12px; } }
.bleed figcaption { color: var(--mute); font-size: 15px; margin-top: 12px; }

/* sections */
.section { padding-block: clamp(48px, 7vw, 104px); }
.section + .section { padding-top: 0; }
.sec-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 40px; align-items: end; margin-bottom: clamp(24px, 3.5vw, 44px); }
.sec-head h2 { font-size: clamp(28px, 3.4vw, 44px); line-height: 1.08; max-width: 20ch; }
.sec-head p { color: var(--mute); max-width: 52ch; margin-top: 12px; font-size: 17px; }
.sec-head .side { color: var(--mute); font-size: 16px; }
@media (max-width: 640px) { .sec-head { grid-template-columns: 1fr; } }

/* model pairs */
.models { display: grid; gap: 16px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tile { position: relative; border-radius: var(--r); padding: 22px 24px; min-height: 380px; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.tile.image { background: var(--panel); }
.tile.image .pic { position: absolute; inset: 60px 24px 56px; display: grid; place-items: center; }
.tile.image img { max-height: 100%; max-width: 100%; width: auto; height: auto; object-fit: contain; border-radius: 4px; }
.tile.image svg { width: 100%; height: 100%; }
.tile.image img.full { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: var(--r); }
.tile.image .name, .tile.image .arrow { position: relative; z-index: 1; }
.tile.image .scrim { position: absolute; inset: 0; border-radius: var(--r); background: linear-gradient(180deg, rgba(20,22,26,.45), rgba(20,22,26,0) 40%, rgba(20,22,26,0) 70%, rgba(20,22,26,.35)); }
.tile.image.photo { color: #fff; }
.tile.solid { background: var(--accent); color: var(--on-accent); }
.tile.dark { background: var(--ink); color: var(--on-ink); }
.tile .name { font-size: 19px; }
.tile .foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.tile .foot p { font-size: 19px; line-height: 1.35; max-width: 34ch; }
.tile .arrow { font-size: 22px; flex: none; }
.tile .status { display: inline-flex; gap: 8px; align-items: center; font-size: 15px; opacity: .85; margin-top: 8px; }
@media (max-width: 760px) { .pair { grid-template-columns: 1fr; } .tile { min-height: 300px; } .tile.image { min-height: 320px; } }

/* phase tiles and spec rows */
.four { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.cell { background: var(--panel); border-radius: var(--r); padding: 22px 24px; min-height: 230px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cell .n { font-size: 15px; color: var(--mute); }
.cell h3 { font-size: 21px; letter-spacing: -0.015em; }
.cell p { color: var(--mute); font-size: 16px; }
.cell .tags { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; padding: 4px 10px; border-radius: 999px; background: var(--pill); color: var(--ink); }
.tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mute); }
.tag.built::before { background: var(--accent); }
.tag.modelled::before { background: var(--ink); }
.tag.concept::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--mute); }
@media (max-width: 1000px) { .four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .four { grid-template-columns: 1fr; } .cell { min-height: 0; } }

.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; }
.spec { background: var(--panel); border-radius: var(--r); padding: 20px 22px 18px; min-width: 0; }
.spec .v { font-size: clamp(28px, 3vw, 40px); letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.spec .l { color: var(--mute); font-size: 15px; margin-top: 8px; }

/* prose */
.prose { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.prose .a { grid-column: 1 / span 7; display: grid; gap: 18px; font-size: 19px; line-height: 1.5; max-width: 62ch; }
.prose .b { grid-column: 9 / span 4; color: var(--mute); font-size: 16px; display: grid; gap: 14px; align-content: start; }
.prose .b svg { width: 100%; height: auto; border-radius: 8px; }
.prose h3 { font-size: 22px; letter-spacing: -0.015em; margin-top: 10px; }
.prose .a > h3:first-child { margin-top: 0; }
@media (max-width: 860px) { .prose .a, .prose .b { grid-column: 1 / -1; } }

/* tables */
.tbl { overflow-x: auto; border-radius: var(--r); background: var(--panel); padding: 6px 0; }
table { width: 100%; border-collapse: collapse; min-width: 560px; font-size: 16px; }
th, td { text-align: left; padding: 12px 22px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--mute); font-weight: 400; font-size: 15px; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.note { color: var(--mute); font-size: 15px; margin-top: 12px; max-width: 70ch; }

/* log */
.log { display: grid; gap: 12px; }
.entry { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px 32px; background: var(--panel); border-radius: var(--r); padding: 22px 24px; }
.entry time { color: var(--mute); font-size: 16px; font-variant-numeric: tabular-nums; }
.entry h3 { font-size: 21px; letter-spacing: -0.015em; }
.entry p { color: var(--mute); margin-top: 8px; max-width: 70ch; font-size: 16.5px; }
.entry .tags { margin-top: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.entry .shots { display: grid; gap: 14px; margin-top: 18px; max-width: 860px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.entry .shots.n1 { grid-template-columns: minmax(0, 1fr); max-width: 720px; }
.entry .shots.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.entry .shot { margin: 0; }
.entry .shot img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: var(--paper); }
.entry .shots.n1 .shot img { aspect-ratio: auto; }
.entry .shot figcaption { color: var(--mute); font-size: 13.5px; line-height: 1.4; margin-top: 8px; }
.entry .clip { margin: 14px 0 0; max-width: 860px; }
.entry .clip video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 6px; background: #000; }
.entry .clip figcaption { color: var(--mute); font-size: 13.5px; line-height: 1.4; margin-top: 8px; }
@media (max-width: 640px) { .entry { grid-template-columns: 1fr; gap: 4px; } .entry .shots, .entry .shots.n2 { grid-template-columns: minmax(0, 1fr); } .entry .shot img { aspect-ratio: 4 / 3; } }

/* list rows */
.rows { border-top: 1px solid var(--line); }
.rows li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding-block: 14px; border-bottom: 1px solid var(--line); align-items: baseline; }
.rows .k { color: var(--mute); }

/* footer */
.site-foot { border-top: 1px solid var(--line); padding-block: 40px 48px; color: var(--mute); font-size: 15px; }
.site-foot .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 24px 40px; max-width: 900px; }
.site-foot h3 { font-size: 15px; color: var(--ink); margin-bottom: 8px; }
.site-foot li { line-height: 1.75; }
.site-foot .base { margin-top: 36px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
@media (prefers-reduced-motion: no-preference) { a, button { transition: background-color .15s ease, color .15s ease; } }
