/* Production additions on top of the approved stylesheet (styles.css, unmodified from the handoff).
   Only what the concept did not have: the web font, the real logo, photos, links, lightbox, a11y. */

@font-face {
  font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--sea2); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; font-weight: 700; }
.skip:focus { top: 12px; }

/* the approved headline is ~2x longer than the one the type scale was drawn for; scale it so it stays 3–4 lines */
.hero h1 { font-size: clamp(40px, 4.9vw, 68px); line-height: .98; letter-spacing: -.05em; }
/* the three facts sit in columns instead of wrapping: in EN/FR/DE the third one dropped to its own line */
.hero-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(146px, 1fr)); gap: 18px 24px; align-items: start; }
/* ── hero drawing (src/hero-plan.mjs): full-bleed plan view in three acts — design → build → live ── */
.diagram { padding: 0; isolation: isolate; }
@media (min-width: 901px) { .diagram { min-height: 600px; } }
@media (max-width: 600px) { .diagram { min-height: 400px; } }
.diagram svg.hero-plan { position: absolute; inset: 0; width: 100%; height: 100%; font-size: 10px;
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace; letter-spacing: .08em; }
.diagram::after { content: ""; position: absolute; inset: auto 0 0 0; height: 40%; z-index: 1; pointer-events: none;
  background: linear-gradient(to top, rgba(8, 28, 40, .94) 0%, rgba(8, 28, 40, .7) 45%, rgba(8, 28, 40, 0) 100%); }
.diagram .label, .diagram .caption { animation: hpUp .8s cubic-bezier(.2,.7,.2,1) both; }
.diagram .label { animation-delay: .1s; }
.diagram .caption { animation-delay: 3.1s; }
.hero-plan .hp-par { transition: transform .3s cubic-bezier(.2,.7,.2,1); }
.hero-plan text { fill: #dcecef; paint-order: stroke; stroke: #0f3346; stroke-width: 3px; stroke-linejoin: round; }
.hp-depth text { fill: #9acbd4; }

/* act 1 — blueprint */
.hp-bp { fill: none; stroke: #a8e1ec; stroke-width: 1.1; }
.hp-draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: hpDraw var(--t, 1.2s) cubic-bezier(.6,.05,.25,1) forwards var(--d, 0s); }
.hp-draw.hp-bp { animation: hpDraw var(--t, 1.2s) cubic-bezier(.6,.05,.25,1) forwards var(--d, 0s), hpDim .9s ease forwards 3.3s; }
.hp-in { animation: hpFade .7s ease both var(--d); }
.hp-fade { animation: hpFade .9s ease both var(--d, 0s); }
.hp-pop { transform-box: fill-box; transform-origin: center; animation: hpPop .5s cubic-bezier(.3,1.6,.5,1) both var(--d); }
.hp-pop.hp-bp { animation: hpPop .5s cubic-bezier(.3,1.6,.5,1) both var(--d), hpDim .9s ease forwards 3.3s; }

/* act 2 — build */
.hp-box { opacity: 0; animation: hpFade .5s ease forwards var(--d); }
.hp-pier { transform-box: fill-box; transform-origin: 50% 0; animation: hpGrow .7s cubic-bezier(.2,.7,.2,1) both var(--d); }
.hp-basin { transform-box: fill-box; transform-origin: center; animation: hpPop .8s cubic-bezier(.2,.7,.2,1) both var(--d); }

/* act 3 — live */
.hp-waves { animation: hpWave 3.2s linear infinite; }
.hp-spin { transform-box: fill-box; transform-origin: center; animation: hpSpin 40s linear infinite; }
.hp-ping { transform-box: fill-box; transform-origin: center; opacity: 0; animation: hpPing 3.6s ease-out infinite 4.2s; }
.hp-beacon { animation: hpBlink 2.4s ease-in-out infinite 4s; opacity: 0; }
.hp-rm-only { display: none; } /* the berthed ship, shown only when motion is reduced */

@keyframes hpFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes hpDraw { to { stroke-dashoffset: 0; } }
@keyframes hpDim { to { opacity: .3; } }
@keyframes hpGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes hpPop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes hpUp { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes hpWave { from { transform: translate(0, 0); } to { transform: translate(-24px, -24px); } }
@keyframes hpSpin { to { transform: rotate(360deg); } }
@keyframes hpPing { 0% { transform: scale(.35); opacity: .7; } 80% { opacity: 0; } 100% { transform: scale(1.45); opacity: 0; } }
@keyframes hpBlink { 0%, 100% { opacity: .15; } 50% { opacity: .95; } }

/* reduced motion: show the finished, built drawing without movement (site.js also pauses the SMIL) */
@media (prefers-reduced-motion: reduce) {
  .hero-plan *, .diagram .label, .diagram .caption { animation: none !important; }
  .hp-draw, .hp-sm { stroke-dashoffset: 0; }
  .hp-bp, .hp-sm { opacity: .3; }
  .hp-box, .hp-beacon { opacity: 1; }
  .hp-ping, .hp-particles, .hp-live, #hp-pen { display: none; }
  .hp-rm-only { display: inline; }
  .rv, .rv-in { opacity: 1; transform: none; transition: none; }
}

/* real logo instead of the concept's placeholder mark */
.brand { color: #21325f; }
.brand svg.brand-logo { width: auto; height: 42px; }

/* language switch: links instead of JS buttons */
.lang-opt { display: inline-block; line-height: 1.2; }
.lang-opt:hover { background: rgba(11, 28, 41, .06); }
.lang-opt.active:hover { background: var(--ink); }

/* project cards with photo / drawing tile */
.project.has-media { padding: 0; overflow: hidden; position: relative; transition: border-color .2s ease, box-shadow .2s ease; }
.project.has-media:hover { border-color: var(--sea); box-shadow: var(--shadow); }
.project-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--foam); }
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.project.has-media:hover .project-media img { transform: scale(1.04); }
.project-body { flex: 1; display: flex; flex-direction: column; justify-content: space-between; padding: 20px 24px 22px; }
.project-body h3 { margin: 12px 0 14px; }
.project .meta .yr { font-variant-numeric: tabular-nums; white-space: nowrap; }
.project-open { all: unset; cursor: pointer; }
.project-open::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.project:has(.project-open:focus-visible) { outline: 3px solid var(--sea2); outline-offset: 3px; }
.tile { position: relative; width: 100%; height: 100%; display: grid; place-items: end start; padding: 18px 20px; background: linear-gradient(145deg, #0d2738, #17465a 54%, #216f84); }
.tile svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tile span { position: relative; color: #fff; font-size: clamp(24px, 2.4vw, 32px); font-weight: 750; letter-spacing: -.035em; line-height: 1; }

/* full-width night aerial */
.pano { margin: 0; height: clamp(300px, 42vw, 580px); overflow: hidden; background: var(--ink); }
.pano img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }

/* contact links */
.detail b a { text-decoration: underline; text-decoration-color: rgba(255,255,255,.35); text-underline-offset: 3px; }
.detail b a:hover { text-decoration-color: #fff; }

/* footer language links (replace the concept's "to be verified" note) */
.footer-langs { display: flex; gap: 16px; }
.footer-langs a:hover { color: #fff; }

/* lightbox */
.lightbox { width: min(1100px, 100% - 32px); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 20px; overflow: hidden; background: #fff; color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.lightbox[open] { display: grid; grid-template-columns: 1.7fr 1fr; }
.lightbox::backdrop { background: rgba(7, 20, 29, .82); }
.lb-media { margin: 0; background: #07141d; display: grid; place-items: center; min-height: 300px; }
.lb-media img { width: 100%; max-height: calc(100vh - 32px); object-fit: contain; }
.lb-info { padding: 40px 30px 28px; display: flex; flex-direction: column; }
.lb-info .tag { font-size: 11px; color: var(--sea); font-weight: 800; text-transform: uppercase; letter-spacing: .12em; margin: 0; }
.lb-info h2 { font-size: 26px; letter-spacing: -.03em; line-height: 1.15; margin: 10px 0 12px; }
.lb-meta { color: var(--muted); margin: 0; }
.lb-nav { margin-top: auto; padding-top: 24px; display: flex; gap: 8px; }
.lb-nav button, .lb-close { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--ink); background: #fff; cursor: pointer; font: inherit; font-size: 18px; color: var(--ink); }
.lb-nav button:hover { background: var(--ink); color: #fff; }
.lb-close { position: absolute; top: 12px; right: 12px; border-color: transparent; background: rgba(255,255,255,.92); font-size: 26px; line-height: 1; }

/* ── mobile experience ───────────────────────────────────────────────────────
   The approved concept is a desktop prototype: below 900px it hides its nav links
   entirely, leaving phones with no way to jump between sections. Everything here is
   about the phone: a real menu, thumb-sized targets, tighter rhythm, calmer motion. */
:root { --nav-h: 78px; }
html { scroll-padding-top: calc(var(--nav-h) + 14px); }
body { -webkit-tap-highlight-color: transparent; }
.nav { height: var(--nav-h); transition: height .3s cubic-bezier(.2,.7,.2,1); }
.brand svg.brand-logo { transition: height .3s cubic-bezier(.2,.7,.2,1); }
.site-header.is-scrolled { box-shadow: 0 10px 30px rgba(11, 28, 41, .07); }

.menu-contact { display: none; }
.menu-toggle { display: none; width: 46px; height: 46px; align-items: center; justify-content: center; padding: 0;
  border: 1px solid rgba(11, 28, 41, .18); border-radius: 999px; background: rgba(255, 255, 255, .55); cursor: pointer; }
.menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 17px; height: 1.8px; background: var(--ink); border-radius: 2px; }
.menu-icon { position: relative; transition: background .2s ease; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; transition: transform .3s cubic-bezier(.2,.7,.2,1); }
.menu-icon::before { top: -5.5px; }
.menu-icon::after { top: 5.5px; }
.menu-open .menu-icon { background: transparent; }
.menu-open .menu-icon::before { transform: translateY(5.5px) rotate(45deg); }
.menu-open .menu-icon::after { transform: translateY(-5.5px) rotate(-45deg); }

/* touch feedback instead of hover states */
@media (hover: none) {
  .btn:active { transform: scale(.975); }
  .filter:active { transform: scale(.96); }
  .project:active { transform: scale(.995); }
  .lang-opt:active { background: rgba(11, 28, 41, .08); }
  .btn, .filter, .project { transition: transform .12s ease, background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease; }
}

/* sections fade up as they come into view (added by site.js, so no-JS still shows everything) */
.rv { opacity: 0; transform: translateY(16px); }
.rv-in { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }

@media (max-width: 900px) {
  :root { --nav-h: 66px; }
  .site-header.is-scrolled { --nav-h: 56px; }
  .brand svg.brand-logo { height: 32px; }
  .site-header.is-scrolled .brand svg.brand-logo { height: 27px; }
  .menu-toggle { display: inline-flex; }

  /* full-screen sheet: on a phone a translucent dropdown lets the page bleed through and reads as cheap */
  /* the header's backdrop-filter makes it the containing block, so the sheet is absolute to the header */
  .navlinks { position: absolute; top: 100%; left: 0; right: 0; height: calc(100vh - var(--nav-h)); height: calc(100dvh - var(--nav-h));
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0;
    padding: 12px 22px 28px; background: var(--paper); overflow-y: auto; overscroll-behavior: contain;
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: opacity .25s ease, transform .35s cubic-bezier(.2,.7,.2,1), visibility 0s linear .35s; }
  .menu-open .navlinks { opacity: 1; visibility: visible; transform: none; transition: opacity .3s ease, transform .4s cubic-bezier(.2,.7,.2,1); }
  .site-header .navlinks > a:not(.langwrap) { display: block; font-size: 21px; font-weight: 650; letter-spacing: -.02em;
    padding: 16px 2px; border-bottom: 1px solid var(--line); opacity: 1; }
  .menu-open .navlinks > a:not(.langwrap) { animation: hpUp .45s cubic-bezier(.2,.7,.2,1) both; }
  .menu-open .navlinks a:nth-child(2) { animation-delay: .05s; }
  .menu-open .navlinks a:nth-child(3) { animation-delay: .1s; }
  .menu-open .navlinks a:nth-child(4) { animation-delay: .15s; }
  .navlinks .lang-switch { margin-top: 26px; align-self: flex-start; }
  .navlinks .menu-contact { display: grid; margin-top: auto; padding-top: 26px; gap: 8px; border-top: 1px solid var(--line); }
  .navlinks .menu-contact a { display: block; font-size: 16px; font-weight: 600; color: var(--ink-2, var(--ink)); padding: 4px 0; border: 0; }
  .lang-opt { padding: 11px 15px; font-size: 13px; }
  html.menu-lock, html.menu-lock body { overflow: hidden; }
}

@media (max-width: 600px) {
  section { padding: 68px 0; }
  .contact { padding: 68px 0; }
  .hero { padding: 34px 0 52px; }
  .hero-meta { margin-top: 28px; padding-top: 18px; }
  .section-head { margin-bottom: 30px; gap: 14px; }
  /* four full-width rows eat half a screen on a phone; 2×2 reads faster */
  .cred-grid { grid-template-columns: 1fr 1fr; }
  .cred .item { padding: 18px 16px 18px 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .cred .item:nth-child(2n) { border-right: 0; padding-right: 0; padding-left: 16px; }
  .cred .item:nth-child(n+3) { border-bottom: 0; }
  .cred .big { font-size: 22px; }
  .project h3 { font-size: 20px; margin: 10px 0 12px; }
  .project-body { padding: 18px 20px 20px; }
  .filters { gap: 8px; margin-bottom: 22px; }
  .filter { padding: 10px 14px; font-size: 13px; }
  .fullwidth { padding: 28px 24px; }
  .factbox { padding: 26px 22px; }
  .about .lead { font-size: 18px; }
  .cta-details, .details { gap: 18px; }
  .footer-langs { gap: 14px; }
  .hp-particles { display: none; } /* battery: the current dots add little at this size */
}
@media (max-width: 420px) {
  .hero h1 { font-size: 35px; }
  .hero p { font-size: 16.5px; }
  .tile span { font-size: 22px; }
}

/* 404 */
.nf-page { min-height: 100vh; display: grid; place-items: center; }
.nf { padding: 80px 0; display: grid; gap: 14px; justify-items: start; }
.nf .brand { margin-bottom: 30px; }
.nf-line { font-size: 20px; margin: 0; }
.nf-line a { color: var(--sea); font-weight: 700; }

@media (max-width: 900px) {
  .lightbox[open] { grid-template-columns: 1fr; }
  .lb-media img { max-height: 56vh; }
  .lb-info { padding: 22px; }
}
@media (max-width: 600px) {
  .footer-langs { flex-wrap: wrap; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
