/* Homepage, Equal Earth EU
   Direction: "One motif" (tasteskill, seed 67697659). The motif is the outline of the Equal Earth
   projection itself: flat poles, curved sides. It masks every picture, fills the hero and shapes the
   last band. Brand kept: anthracite, yellow, Open Sans (self-hosted). */

@font-face {
  font-family: 'Open Sans';
  src: url('../assets/fonts/open-sans-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --surface: #f3f3ef;
  --ink: #222222;
  --muted: #555555;
  --accent: #ffd449;
  --accent-ink: #222222;
  --ocean: #d3edfc;
  --dark: #222222;
  --dark-ink: #ffffff;

  --font: 'Open Sans', Arial, sans-serif;
  --step-small: 0.875rem;
  --step-body: clamp(1.0625rem, 1rem + 0.2vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.55vw, 1.5rem);
  --step-head: clamp(2.125rem, 1.4rem + 2.4vw, 3.5rem);
  --step-display: clamp(2.75rem, 1.2rem + 4.6vw, 5.25rem);

  --margin: clamp(1rem, 2.2vw, 2rem);
  --gutter: clamp(1rem, 2vw, 2rem);
  --section: clamp(7rem, 11vw, 11rem);
  --bar: 76px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--bar) + 12px); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: var(--step-body); line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, figure, ul { margin: 0; }
ul { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.field-dark :focus-visible, .bar :focus-visible, .foot :focus-visible { outline-color: var(--accent); }
::selection { background: var(--accent); color: var(--ink); }
.defs { position: absolute; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: var(--margin); top: -60px; z-index: 50; background: var(--accent); color: var(--ink); padding: 10px 16px; border-radius: 999px; text-decoration: none; font-weight: 600; }
.skip-link:focus { top: 10px; }

.display { font-size: var(--step-display); font-weight: 600; line-height: 1; letter-spacing: -0.04em; text-wrap: balance; }
.head { font-size: var(--step-head); font-weight: 600; line-height: 1.05; letter-spacing: -0.03em; text-wrap: balance; }
.lead { font-size: var(--step-lead); font-weight: 500; line-height: 1.35; letter-spacing: -0.01em; }
p { text-wrap: pretty; }
.wrap { padding-inline: var(--margin); }
.link-plain { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 0.08em; }

/* One button shape for the whole page: fully round. */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; border-radius: 999px; font-weight: 600; font-size: var(--step-body); text-decoration: none; white-space: nowrap; transition: transform 140ms var(--ease-out), background-color 180ms ease, color 180ms ease; }
.button:active { transform: scale(0.96); }
.button-accent { background: var(--accent); color: var(--accent-ink); }
.button-ink { background: var(--ink); color: #fff; }
.button-small { min-height: 44px; padding: 0 20px; font-size: var(--step-small); }
@media (hover: hover) {
  .button-accent:hover { background: #fff; color: var(--ink); }
  .button-ink:hover { background: var(--accent); color: var(--ink); }
}

/* Bar: wordmark, four links, one action. */
.bar { position: sticky; top: 0; z-index: 20; height: var(--bar); display: flex; align-items: center; gap: 32px; padding-inline: var(--margin); background: var(--dark); color: var(--dark-ink); }
.bar-mark img { width: 220px; height: auto; aspect-ratio: 7; object-fit: cover; mix-blend-mode: lighten; }
.bar-links { display: flex; gap: 28px; margin-left: auto; }
.bar-links a { text-decoration: none; font-size: var(--step-small); font-weight: 500; text-underline-offset: 0.35em; }
.bar-links a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.bar-action { min-height: 44px; padding: 0 20px; font-size: var(--step-small); }

/* Hero: the card with the giant motif, beside the room. */
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px var(--margin) 0; height: calc(100svh - var(--bar)); min-height: 640px; max-height: 980px; }
.hero-card { position: relative; overflow: hidden; background: var(--surface); display: flex; flex-direction: column; padding: clamp(28px, 4vw, 64px); isolation: isolate; }
.hero-text { position: relative; z-index: 1; max-width: 34rem; }
.hero h1 { margin-bottom: 32px; }
.hero-sub { max-width: 30ch; margin-bottom: 36px; }
.hero-motif { position: absolute; z-index: -1; left: -18%; top: 64%; width: 136%; height: 74%; fill: var(--accent); transform-origin: 50% 0; }
.hero-links { position: relative; z-index: 1; margin-top: auto; display: flex; gap: 28px; font-weight: 600; }
.hero-links a { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.25em; text-decoration-thickness: 2px; transition: text-decoration-color 180ms ease; }
.hero-links a:hover { text-decoration-color: currentColor; }

.hero-room { position: relative; overflow: hidden; container-type: size; background: #e8e8e6; }
.room-stage { position: absolute; left: 50%; top: 50%; width: max(100cqw, 150cqh); aspect-ratio: 3 / 2; translate: -50% -50%; }
.room-photo { width: 100%; height: 100%; object-fit: cover; }
/* Scale: the sideboard is taken as 3.6 m and spans 83.3% of the picture, so 1 cm = 0.2314% of its width. */
.room-map { position: absolute; left: 52%; bottom: 44%; width: calc(var(--w) * 0.2314%); height: auto; translate: -50% 0; transition: width 700ms var(--ease-expo); }
.room-sizes { position: absolute; left: 12px; right: 12px; bottom: 12px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 16px; padding: 14px 16px; background: #fff; }
.room-label { font-weight: 600; font-size: var(--step-small); }
.room-buttons { display: flex; gap: 6px; justify-content: flex-end; }
.room-buttons button { min-width: 52px; min-height: 44px; padding: 0 12px; border-radius: 999px; background: var(--surface); font-weight: 600; font-size: var(--step-small); font-variant-numeric: tabular-nums; transition: background-color 160ms ease, transform 140ms var(--ease-out); }
.room-buttons button:hover { background: var(--ocean); }
.room-buttons button:active { transform: scale(0.94); }
.room-buttons button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.room-caption { grid-column: 1 / -1; font-size: var(--step-small); color: var(--muted); }
.room-caption output { color: var(--ink); font-weight: 600; }

/* Showcase: one square plate in the map's own outline, beside spare text, on the ocean colour. */
.showcase { margin-top: var(--section); display: grid; grid-template-columns: 1fr 1fr; min-height: 88svh; background: var(--ocean); }
.plate { align-self: center; margin: 40px; aspect-ratio: 1; clip-path: url(#ee); background: #fff; }
.plate img { width: 100%; height: 100%; object-fit: cover; transition: opacity 400ms ease; }
.plate img.is-swapping { opacity: 0; }
.showcase-text { display: flex; flex-direction: column; justify-content: space-between; gap: 48px; padding: 48px var(--margin) 48px 24px; }
.tabs { display: flex; gap: 28px; }
.tabs button { font-size: var(--step-lead); font-weight: 500; color: var(--muted); padding-bottom: 4px; border-bottom: 3px solid transparent; transition: color 160ms ease, border-color 160ms ease; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--ink); }
.showcase-copy h2 { margin-bottom: 40px; max-width: 14ch; }
.showcase-copy p { max-width: 40ch; }
.cells { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cell { min-height: 72px; display: flex; align-items: center; padding: 0 24px; font-weight: 600; text-decoration: none; border-radius: 999px; transition: background-color 180ms ease, color 180ms ease, transform 140ms var(--ease-out); }
.cell:active { transform: scale(0.98); }
.cell-ink { background: var(--ink); color: #fff; }
.cell-tone { background: #fff; }
.cell-ink:hover { background: var(--accent); color: var(--ink); }
.cell-tone:hover { background: var(--ink); color: #fff; }

/* Finishes: product cards, the whole card is the link (like a shop shelf). */
.finishes { margin-top: var(--section); }
.finishes-head { display: grid; grid-template-columns: 5fr 7fr; gap: var(--gutter); align-items: end; margin-bottom: 40px; }
.finishes-head p { max-width: 46ch; }
.products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px var(--gutter); }
.product { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); }
.product-tile { display: grid; place-items: center; aspect-ratio: 4 / 3; background: var(--surface); padding: 12%; margin-bottom: 12px; transition: background-color 200ms ease; }
.product-tile img { width: 100%; height: auto; transition: transform 400ms var(--ease-out); }
.product-name { font-weight: 600; line-height: 1.35; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.2em; text-decoration-thickness: 2px; transition: text-decoration-color 180ms ease; }
.product-finish { color: var(--ink); line-height: 1.35; margin-top: -4px; }
.product-price { font-size: var(--step-lead); font-weight: 700; font-variant-numeric: tabular-nums; }
.price-small { font-size: var(--step-small); font-weight: 500; color: var(--muted); }
.card-note { font-size: var(--step-small); color: var(--muted); }
.product:hover .product-tile { background: var(--ocean); }
.product:hover .product-tile img { transform: scale(1.05); }
.product:hover .product-name { text-decoration-color: currentColor; }
.product:active .product-tile { transform: scale(0.98); }

/* Editions: one frame, its contents change. */
.editions { margin-top: var(--section); display: grid; grid-template-columns: 5fr 7fr; gap: var(--gutter); align-items: center; }
.editions-text h2 { margin-bottom: 24px; }
.editions-text > p { max-width: 40ch; margin-bottom: 40px; }
.edition-list { display: grid; gap: 8px; }
.edition-list a { display: grid; gap: 2px; padding: 18px 24px; background: var(--surface); text-decoration: none; border-radius: 28px; transition: background-color 180ms ease, transform 200ms var(--ease-out); }
.edition-list a:hover { background: var(--accent); transform: translateX(6px); }
.edition-list strong { font-size: var(--step-lead); }
.edition-list span { color: var(--ink); }
.frame-wrap { display: grid; gap: 16px; }
.frame { position: relative; display: block; width: 100%; aspect-ratio: 1701 / 935; clip-path: url(#ee); background: var(--ocean); cursor: pointer; }
.frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1600ms ease; }
.frame img.is-on { opacity: 1; }
.frame-wrap figcaption { text-align: center; font-size: var(--step-small); color: var(--muted); }

/* Sizes: tiles that grow, each map drawn to scale. */
.sizes { margin-top: var(--section); }
.tiles { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 10px; align-items: end; --cm: 0.17vw; }
.sizes-head { grid-column: 1 / 8; grid-row: 1; align-self: start; padding-bottom: 32px; }
.sizes-head h2 { margin-bottom: 16px; }
.tile { grid-row: 2; display: grid; place-items: center; }
.tile img { width: calc(var(--w) * var(--cm)); height: auto; transition: transform 500ms var(--ease-out); }
.tile:hover img { transform: scale(1.04); }
.tile-1 { grid-column: 1 / 4; height: 30vh; min-height: 200px; background: var(--ocean); }
.tile-2 { grid-column: 4 / 8; height: 44vh; min-height: 280px; background: var(--accent); }
.tile-3 { grid-column: 8 / 13; height: 60vh; min-height: 380px; background: var(--surface); grid-row: 1 / 3; align-self: end; }
.tile-text { grid-row: 3; padding-top: 16px; }
.tile-text h3 { margin-bottom: 4px; }
.tile-text p { color: var(--muted); max-width: 30ch; }
.tt-1 { grid-column: 1 / 4; } .tt-2 { grid-column: 4 / 8; } .tt-3 { grid-column: 8 / 13; }

/* Ordering: two fields meeting at a hard edge. */
.order { margin-top: var(--section); display: grid; grid-template-columns: 5fr 7fr; min-height: 80svh; }
.field { display: flex; flex-direction: column; padding: 40px var(--margin); }
.field-light { background: var(--surface); }
.field-dark { background: var(--dark); color: var(--dark-ink); }
.field h3 { margin-bottom: 16px; }
.field-for { max-width: 26ch; margin-bottom: 20px; }
.field-text { max-width: 44ch; }
.field-dark .field-text { color: #e6e6e6; }
.field-foot { margin-top: auto; padding-top: 48px; display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.price { font-variant-numeric: tabular-nums; }
.price-from { font-size: var(--step-body); font-weight: 500; letter-spacing: 0; margin: 0 8px; }

/* Questions: index cards with stepping tabs. */
.faq { margin-top: var(--section); }
.faq { display: grid; grid-template-columns: 4fr 8fr; gap: var(--gutter); align-items: start; }
.faq > h2 { position: sticky; top: calc(var(--bar) + 32px); max-width: 8ch; }
.cards { padding-top: 0; }
.card { position: relative; margin-top: -6px; --bgc: var(--surface); }
.card:nth-child(3n+2) { --bgc: var(--ocean); }
.card:nth-child(3n+3) { --bgc: var(--accent); }
.card-tab { width: 200px; height: 40px; margin-left: min(calc(var(--k) * 150px), calc(100% - 200px)); display: flex; align-items: center; padding: 0 20px; background: var(--bgc); font-size: var(--step-small); font-weight: 700; clip-path: polygon(0 100%, 12px 0, calc(100% - 12px) 0, 100% 100%); }
.card-q { display: block; width: 100%; text-align: left; padding: 22px 28px; background: var(--bgc); font-size: var(--step-lead); font-weight: 600; transition: padding-left 200ms var(--ease-out); }
.card-q:hover { padding-left: 36px; }
.card-a { background: var(--bgc); padding: 0 28px 28px; }
.card-a p { max-width: 50ch; }

/* The last band: one word is the button. Its top takes the motif's curve. */
.cta { margin-top: var(--section); position: relative; display: block; height: 60svh; min-height: 380px; background: var(--accent); color: var(--ink); text-decoration: none; clip-path: url(#ee-top); overflow: hidden; transition: background-color 120ms linear, color 120ms linear; }
.cta:hover, .cta:focus-visible { background: var(--ink); color: var(--accent); }
.cta:focus-visible { outline: none; }
.cta-line { position: absolute; z-index: 1; left: 22%; top: 120px; font-size: var(--step-lead); font-weight: 600; max-width: 22ch; }
.cta-arrow { position: absolute; right: 22%; top: 112px; width: 48px; height: 48px; fill: none; stroke: currentColor; stroke-width: 3; transition: transform 300ms var(--ease-out); }
.cta:hover .cta-arrow { transform: translate(6px, -6px); }
.cta-word { position: absolute; left: var(--margin); right: var(--margin); bottom: 24px; font-size: 25vw; font-weight: 800; letter-spacing: -0.06em; line-height: 0.78; text-align: center; }

/* Footer: the name built from blocks. */
.foot { background: var(--dark); color: var(--dark-ink); padding: 48px var(--margin) 24px; }
.foot-mark { display: flex; align-items: flex-end; gap: 4px; height: 34svh; min-height: 200px; }
.foot-mark span { flex: 1; height: calc(var(--h) * 100%); display: flex; align-items: flex-end; justify-content: center; background: var(--accent); color: var(--dark); font-weight: 800; font-size: clamp(2.5rem, 7vw, 7rem); line-height: 0.8; padding-bottom: 0.06em; }
.foot-mark span:nth-child(3n+2) { background: var(--ocean); }
.foot-mark span:nth-child(3n) { background: #fff; }
.foot-mark span.gap { flex: 0.5; height: 0; background: none; }
.foot-grid { display: grid; grid-template-columns: repeat(4, 1fr) 1.6fr; gap: 24px; margin-top: 56px; font-size: var(--step-small); }
.foot-grid h2 { font-size: var(--step-small); font-weight: 700; margin-bottom: 10px; }
.foot-grid a { display: block; text-decoration: none; padding: 3px 0; color: #e6e6e6; }
.foot-grid a:hover { color: var(--accent); }
.foot-contact p { color: #e6e6e6; margin-bottom: 10px; }
.foot-contact a { display: inline; text-decoration: underline; }
.foot-last { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 56px; font-size: var(--step-small); color: #e6e6e6; }

/* Motion: entrances once, content visible without script. */
@media (prefers-reduced-motion: no-preference) {
  .js .hero h1 { animation: rise 1000ms var(--ease-expo) both 100ms; }
  .js [data-rise] { animation: rise 900ms var(--ease-expo) both; animation-delay: calc(var(--i, 0) * 90ms + 200ms); }
  .js .hero-motif { animation: motif 1400ms var(--ease-expo) both 150ms; }
  .js .room-stage { animation: drift 26s var(--ease-soft) 1.2s infinite alternate; }
  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .plate[data-reveal] { transform: scale(0.94); transition: opacity 900ms var(--ease-out), transform 1400ms var(--ease-expo); }
  .js .plate[data-reveal].is-in { transform: none; }
  .js .tile[data-reveal] { transform: scaleY(0.6); transform-origin: 50% 100%; }
  .js .tile[data-reveal].is-in { transform: none; }
}
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes motif { from { transform: translateY(40%); } to { transform: none; } }
@keyframes drift { from { scale: 1; } to { scale: 1.045; } }
@media (prefers-reduced-motion: reduce) {
  .room-map, .frame img, .plate img { transition: none; }
}

@container (max-width: 560px) {
  .room-sizes { grid-template-columns: 1fr; gap: 8px; padding: 12px; }
  .room-buttons { justify-content: space-between; }
  .room-buttons button { min-width: 0; flex: 1; padding: 0; }
}
@media (max-width: 1000px) {
  .hero { display: flex; flex-direction: column; height: auto; max-height: none; min-height: 0; }
  .hero-card { min-height: 0; padding-bottom: 32px; }
  .hero-links { margin-top: 56px; }
  .hero-motif { top: 58%; height: 70%; }
  .hero-room { height: 62svh; min-height: 420px; }
}

/* Tablet */
@media (max-width: 1100px) {
  .bar-links { display: none; }
  .bar-action { margin-left: auto; }
  .foot-grid { grid-template-columns: repeat(2, 1fr); }
  .products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-contact { grid-column: 1 / -1; }
}

/* Phone: its own composition. */
@media (max-width: 760px) {
  :root { --bar: 64px; }
  .bar { gap: 12px; }
  .bar-mark img { width: 168px; }
  .bar-action { padding: 0 16px; }
  .hero { display: flex; flex-direction: column; height: auto; max-height: none; min-height: 0; gap: 0; padding: 12px var(--margin) 0; }
  .hero-room { height: 50svh; min-height: 360px; }
  .room-sizes { grid-template-columns: 1fr; gap: 8px; padding: 12px; }
  .room-buttons { justify-content: space-between; }
  .room-buttons button { min-width: 0; flex: 1; padding: 0; }
  .hero-card { padding: 32px 24px 28px; min-height: 0; }
  .hero-motif { top: 70%; height: 60%; }
  .hero-links { margin-top: 48px; flex-wrap: wrap; }
  .showcase { grid-template-columns: 1fr; min-height: 0; }
  .plate { margin: 24px var(--margin) 0; }
  .showcase-text { padding: 32px var(--margin) 40px; gap: 32px; }
  .tabs { gap: 20px; }
  .tabs button { font-size: var(--step-body); }
  .cells { grid-template-columns: 1fr; }
  .cell { min-height: 60px; }
  .finishes-head { grid-template-columns: 1fr; gap: 16px; margin-bottom: 28px; }
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; }
  .product-tile { padding: 10%; margin-bottom: 8px; }
  .product-name { font-size: var(--step-small); }
  .editions { grid-template-columns: 1fr; gap: 40px; }
  .tiles { grid-template-columns: 1fr; --cm: 0.42vw; row-gap: 0; }
  .sizes-head, .tile, .tile-text, .tile-3 { grid-column: 1; grid-row: auto; }
  .tile-1 { height: 34vw; min-height: 150px; }
  .tile-2 { height: 46vw; min-height: 190px; }
  .tile-3 { height: 62vw; min-height: 240px; }
  .tile-text { padding: 12px 0 28px; }
  .sizes-head { order: 0; } .tile-1 { order: 1; } .tt-1 { order: 2; } .tile-2 { order: 3; } .tt-2 { order: 4; } .tile-3 { order: 5; } .tt-3 { order: 6; }
  .order { grid-template-columns: 1fr; min-height: 0; }
  .field { min-height: 56svh; padding: 32px var(--margin); }
  .faq { grid-template-columns: 1fr; }
  .faq > h2 { position: static; max-width: none; margin-bottom: 32px; }
  .field-dark { order: -1; }
  .field-foot .button { width: 100%; }
  .card-tab { width: 120px; margin-left: calc(var(--k) * 40px); padding: 0 14px; }
  .card-q { padding: 18px 20px; }
  .card-a { padding: 0 20px 20px; }
  .cta { height: 46svh; min-height: 300px; }
  .cta-line { left: 24%; top: 72px; max-width: 13ch; font-size: var(--step-body); }
  .cta-arrow { right: 22%; top: 68px; width: 32px; height: 32px; }
  .cta-word { font-size: 24vw; }
  .foot-mark { height: 22svh; min-height: 130px; }
  .foot-mark span { font-size: 9vw; }
  .foot-last { flex-wrap: wrap; }
}
