/* DERU – home proposal. Direction: the split stage.
   Type: Bodoni Moda (display, hairline serifs like a cut glass edge) + Jost (text).
   Colour: one studio grey ground, one ink, DERU magenta on the actions, graphite for the close. */

:root {
  --ground: #eeeeee;      /* the studio backdrop of every DERU photograph */
  --paper: #f9f9f8;       /* card and sheet, one step lighter */
  --ink: #161616;
  --ink-soft: #5a5a5a;    /* secondary notes only */
  --accent: #a9378b;      /* DERU magenta */
  --accent-deep: #8e2c74;
  --accent-ink: #ffffff;
  --marker: #f1dcea;
  --night: #161616;       /* the close: contact and footer */
  --night-2: #232323;
  --night-soft: #a3a3a3;
  --on-night: #f4f4f2;

  --serif: "Bodoni Moda", "Didot", Georgia, serif;
  --sans: "Jost", system-ui, sans-serif;

  /* five type steps */
  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.375rem, 1.15rem + 0.8vw, 1.875rem);
  --step-head: clamp(2.125rem, 1.4rem + 1.9vw, 3rem);
  --step-display: clamp(2.625rem, 1.1rem + 3.9vw, 4.25rem);

  --gap: 12px;
  --pad: clamp(24px, 4vw, 64px);
  --section: clamp(112px, 12vw, 200px);

  --ease-out: cubic-bezier(.2, .7, .2, 1);
}

*, *::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-family: var(--sans);
  font-size: var(--step-body);
  line-height: 1.6;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 {
  margin: 0; font-family: var(--serif); font-weight: 500; font-optical-sizing: auto;
  letter-spacing: -0.02em; line-height: 0.98; text-wrap: balance;
}
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.serif { font-family: var(--serif); font-weight: 500; font-optical-sizing: auto; letter-spacing: -0.01em; }

/* ---------- bilingual ---------- */
html:not(.l-en) .en, html.l-en .de { display: none; }

.lang {
  position: fixed; top: 18px; right: 28px; z-index: 20;
  display: flex; gap: 4px;
  transition: opacity .4s, visibility .4s;
}
.lang.is-off { opacity: 0; visibility: hidden; }
.lang button, .foot-lang button {
  font: 500 var(--step-small)/1 var(--sans); letter-spacing: .04em;
  border: 0; background: transparent; color: var(--ink-soft);
  padding: 10px 8px; cursor: pointer; position: relative;
  transition: color .2s;
}
.lang button::after, .foot-lang button::after {
  content: ""; position: absolute; left: 8px; right: 8px; bottom: 4px; height: 2px;
  background: var(--accent); transform: scaleX(0); transition: transform .3s var(--ease-out);
}
.lang button[aria-pressed="true"], .lang button:hover { color: var(--ink); }
.lang button[aria-pressed="true"]::after, .foot-lang button[aria-pressed="true"]::after { transform: scaleX(1); }

/* ---------- buttons and links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 0 32px;
  background: var(--accent); color: var(--accent-ink);
  font: 500 var(--step-small)/1 var(--sans); letter-spacing: .04em; text-decoration: none;
  transition: background-color .25s, transform .15s var(--ease-out);
}
.btn:hover { background: var(--accent-deep); }
.btn:active { transform: translateY(1px) scale(.985); }

.text-link {
  font-weight: 500; text-decoration: underline; text-decoration-thickness: 2px;
  text-underline-offset: 6px; text-decoration-color: var(--accent);
  transition: color .2s;
}
.text-link:hover { color: var(--accent); }

/* ---------- split layout ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  padding: var(--gap);
}
.read { grid-column: 1; grid-row: 1; min-width: 0; }
.stage-wrap { grid-column: 2; grid-row: 1; }

.stage {
  position: sticky; top: var(--gap);
  height: calc(100svh - 2 * var(--gap));
  overflow: hidden;
  background: var(--ground);
}
.stage img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 50%;
  opacity: 0;
  transition: opacity 1.6s ease, transform 9s linear;
  transform: scale(1.04);
}
.stage img.is-on { opacity: 1; transform: scale(1); }
.stage-caption {
  position: absolute; left: 32px; bottom: 26px;
  font: italic 500 var(--step-body)/1.2 var(--serif); color: var(--ink);
  transition: opacity .4s;
}

/* ---------- hero card ---------- */
.card {
  min-height: calc(100svh - 2 * var(--gap));
  background: var(--paper);
  display: flex; flex-direction: column; align-items: center;
  padding: 56px clamp(24px, 3.4vw, 56px) 32px;
  text-align: center;
}
.card-logo { display: block; width: clamp(150px, 13vw, 200px); }
.card-body {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 30px; padding: 56px 0;
}
.card h1 { font-size: var(--step-display); }
.card-lead { max-width: 42ch; text-wrap: pretty; }
.card-links { display: flex; gap: 36px; flex-wrap: wrap; justify-content: center; font-size: var(--step-small); letter-spacing: .04em; }
.card-links a { position: relative; text-decoration: none; padding: 6px 0; }
.card-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease-out); }
.card-links a:hover::after, .card-links a:focus-visible::after { transform: scaleX(1); }

/* ---------- intro ---------- */
.intro { padding: var(--section) var(--pad) 120px; display: grid; gap: 56px; }
.intro-first { font-family: var(--serif); font-weight: 500; font-optical-sizing: auto; font-size: var(--step-lead); line-height: 1.3; letter-spacing: -0.01em; max-width: 36ch; }
.intro-cols { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: end; }
.intro-col { display: grid; gap: 1.1em; max-width: 30rem; }
.facts { margin: 0; padding: 0; list-style: none; display: grid; gap: 26px; min-width: 11rem; }
.facts li { display: grid; gap: 4px; }
.fact-v { font-family: var(--serif); font-weight: 500; font-optical-sizing: auto; font-size: var(--step-lead); line-height: 1.15; }
.fact-k { font-size: var(--step-small); color: var(--ink-soft); letter-spacing: .02em; }

/* ---------- gallery: manufacturing + changing model ---------- */
.gallery { padding: 32px var(--pad) var(--section); display: grid; gap: 28px; max-width: 46rem; }
.gallery h2 { font-size: var(--step-head); }
.tech { margin: 8px 0 0; display: grid; gap: 22px; }
.tech div { display: grid; grid-template-columns: 8.5rem 1fr; gap: 16px; }
.tech dt { font-weight: 500; }
.tech dd { margin: 0; }
.model { margin-top: 72px; }
.model-name { font-family: var(--serif); font-weight: 500; font-style: italic; font-optical-sizing: auto; font-size: var(--step-display); line-height: 1; letter-spacing: -0.02em; transition: opacity .5s; }
.model-note { margin-top: 14px; font-size: var(--step-small); color: var(--ink-soft); }
.m-frame { display: none; }

/* ---------- range: the catalogue sheet ---------- */
.range { padding: 0 0 var(--section); }
.sheet { background: var(--paper); padding: clamp(36px, 5vw, 72px) var(--pad); }
.sheet h2 { font-size: var(--step-head); }
.sheet-note { margin-top: 16px; max-width: 40ch; }
.rows { margin-top: 48px; display: grid; gap: 4px; }
.row summary {
  list-style: none; cursor: pointer;
  display: grid; grid-template-columns: 1fr auto; column-gap: 24px;
  padding: 14px 18px; margin: 0 -18px;
  transition: background-color .25s, opacity .25s;
}
.row summary::-webkit-details-marker { display: none; }
.row-name { font-family: var(--serif); font-weight: 500; font-optical-sizing: auto; font-size: var(--step-lead); line-height: 1.2; }
.row-alt { align-self: center; font-size: var(--step-small); color: var(--ink-soft); letter-spacing: .02em; }
.row-ex { grid-column: 1 / -1; font-size: var(--step-small); color: var(--ink-soft); margin-top: 4px; }
.rows:hover .row summary, .rows.has-active .row summary { opacity: .42; }
.rows .row summary:hover, .rows .row.is-active summary, .rows .row summary:focus-visible { opacity: 1; background: var(--ground); }
.row-img { display: none; }
.sheet-foot { margin-top: 48px; font-size: var(--step-small); }

/* ---------- letter ---------- */
.letter { padding: 0 var(--pad) var(--section); }
.letter-col { max-width: 32rem; margin: 0 auto; display: grid; gap: 1.1em; }
.letter-col > p:first-child {
  font-family: var(--serif); font-weight: 500; font-optical-sizing: auto;
  font-size: var(--step-lead); line-height: 1.3; letter-spacing: -0.01em; margin-bottom: .3em;
}
.letter mark { background: var(--marker); color: inherit; padding: 0 .12em; }
.sign { margin-top: 1.4em; display: grid; gap: 6px; }
.sign-name { font-family: var(--serif); font-weight: 500; font-style: italic; font-size: var(--step-lead); line-height: 1.2; }
.sign-role { font-size: var(--step-small); color: var(--ink-soft); letter-spacing: .02em; }

/* ---------- CTA: last photograph, text beside ---------- */
.cta { position: relative; height: 92svh; min-height: 600px; overflow: hidden; background: var(--ground); }
.cta-photo, .cta-photo img { position: absolute; inset: 0; width: 100%; height: 100%; }
.cta-photo img { object-fit: cover; object-position: 0% 70%; transform: scale(1.05); transition: transform 1.6s var(--ease-out); will-change: transform; }
.cta-text {
  position: absolute; left: 58%; right: 6vw; bottom: 16svh;
  display: grid; gap: 24px; justify-items: start;
}
.cta h2 { font-size: var(--step-display); }
.cta p { max-width: 38ch; }

/* ---------- contact: the graphite close ---------- */
.contact { background: var(--night); color: var(--on-night); padding: 56px 0 clamp(112px, 11vw, 176px); overflow: hidden; }
.strip { overflow: hidden; }
.strip-track { display: flex; gap: 10px; width: max-content; animation: drift 80s linear infinite; }
.strip-track img { height: 170px; width: auto; object-fit: cover; }
@keyframes drift { to { transform: translateX(-50%); } }
.contact-inner { padding: 96px var(--pad) 0; }
.contact h2 { font-size: var(--step-display); }
.ask { margin-top: 48px; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.cell { display: block; height: 96px; background: var(--night-2); transition: background-color .2s; }
.cell input {
  width: 100%; height: 100%; border: 0; background: transparent; color: var(--on-night);
  font: 400 1.125rem/1 var(--sans); letter-spacing: .01em; text-align: center; padding: 0 16px;
}
.cell input::placeholder { color: var(--night-soft); }
.cell input:focus { outline: none; }
.cell:focus-within { background: #303030; }
.cell-send {
  border: 0; cursor: pointer; background: var(--accent); color: var(--accent-ink);
  font: 500 1.125rem/1 var(--sans); letter-spacing: .03em;
  transition: background-color .2s, transform .15s var(--ease-out);
}
.cell-send:hover { background: var(--accent-deep); }
.cell-send:active { transform: scale(.99); }
.ask-small { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; font-size: var(--step-small); color: var(--night-soft); }
.ask-small p:last-child { grid-column: 3; }
.ask-small a { color: var(--on-night); }

/* ---------- footer: the name, full width, on graphite ---------- */
.foot { background: #0e0e0e; color: var(--on-night); }
.foot-top { display: flex; justify-content: space-between; gap: 32px; padding: 72px var(--pad) 120px; font-size: 1rem; }
.foot-top nav { display: grid; gap: 8px; align-content: start; }
.foot-top a { text-decoration: none; color: var(--on-night); transition: color .2s; }
.foot-top a:hover { color: #fff; text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--accent); }
.foot address { font-style: normal; text-align: right; color: var(--night-soft); }
.foot address strong { font-weight: 400; color: var(--on-night); }
.foot-lang { display: flex; gap: 0; margin: 10px 0 0 -8px; }
.foot-lang button { color: var(--night-soft); }
.foot-lang button[aria-pressed="true"], .foot-lang button:hover { color: var(--on-night); }
.foot-bottom { padding: 0 var(--pad) 36px; }
.foot-mark { width: 100%; height: auto; opacity: .96; }
.foot-legal { margin-top: 24px; font-size: var(--step-small); color: var(--night-soft); }

/* ---------- motion: entrances (content stays visible without script) ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); }
.js .reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
  transition-delay: var(--d, 0ms);
}

/* ---------- phone ---------- */
@media (max-width: 900px) {
  .lang { position: absolute; top: 20px; right: 20px; }
  .split { grid-template-columns: 1fr; padding: var(--gap) var(--gap) 0; }
  .stage-wrap { grid-column: 1; grid-row: 1; }
  .read { grid-row: 2; margin: 0 calc(-1 * var(--gap)); }
  .stage { position: relative; top: 0; height: 54svh; }
  .stage-caption { display: none; }
  .card { min-height: auto; margin: -28px 12px 0; position: relative; padding: 32px 22px 26px; }
  .card-logo { width: 150px; }
  .card-body { padding: 40px 0 32px; gap: 22px; }
  .card h1 { font-size: clamp(2.375rem, 10.5vw, 3rem); }
  .intro { padding: 88px 20px 72px; gap: 40px; }
  .intro-cols { grid-template-columns: 1fr; gap: 48px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .gallery { padding: 24px 20px 96px; }
  .tech div { grid-template-columns: 1fr; gap: 2px; }
  .m-frame { display: block; position: relative; width: 80vw; aspect-ratio: 4 / 5; margin: 40px auto 0; overflow: hidden; background: var(--ground); cursor: pointer; }
  .m-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s ease; }
  .m-frame img.is-on { opacity: 1; }
  .model { margin-top: 18px; text-align: center; }
  .model-name { font-size: var(--step-head); }
  .range { padding: 0 10px 96px; }
  .sheet { padding: 36px 20px; }
  .row-alt { display: none; }
  .row[open] .row-img { display: block; margin: 8px 0 18px; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
  .rows:hover .row summary, .rows.has-active .row summary { opacity: 1; }
  .letter { padding: 0 24px 96px; }
  .cta { height: auto; min-height: 0; }
  .cta-photo { position: relative; height: 56svh; }
  .cta-photo img { object-position: 18% 80%; }
  .cta-text { position: static; padding: 40px 20px 80px; }
  .cta .btn { width: 100%; }
  .contact { padding: 36px 0 80px; }
  .strip-track img { height: 120px; }
  .contact-inner { padding: 56px 20px 0; }
  .contact h2 { font-size: clamp(2.25rem, 10vw, 2.75rem); }
  .ask { grid-template-columns: 1fr; }
  .cell { height: 62px; }
  .ask-small { grid-template-columns: 1fr; }
  .ask-small p:last-child { grid-column: auto; }
  .foot-top { flex-direction: column; padding: 48px 20px 80px; }
  .foot address { text-align: left; }
  .foot-bottom { padding: 0 20px 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
  .stage img, .m-frame img { transition: opacity .2s; transform: none; }
  .stage img.is-on { transform: none; }
  .strip-track { animation: none; }
  .strip { overflow-x: auto; }
  .cta-photo img { transform: none; transition: none; }
}
