/* House of Design — houseofdesignny.com
   Colors: cream #F6F1E7, black #111111, warm grey #6B6558, accent #9F632F, light text on black #BDB5A5
   Fonts: Space Grotesk (text), IBM Plex Mono (small labels), Jost (logo and seal) */

:root {
  --cream: #F6F1E7;
  --ink: #111111;
  --grey: #6B6558;
  --accent: #9F632F;
  --light: #BDB5A5;
  --paper: #E3DCCD;
  --mono: 'IBM Plex Mono', monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 400;
  overflow-x: hidden;
}
body.ov-open { overflow: hidden; }
img, video { max-width: 100%; }
img { height: auto; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--grey); }
a:focus-visible, button:focus-visible, [role="button"]:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.dark a:focus-visible { outline-color: var(--cream); }

/* Shared text styles */
.label { margin: 0; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--grey); }
.h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.05; font-weight: 400; letter-spacing: -0.02em; }
.head { display: flex; flex-direction: column; gap: 14px; }
.ph { display: block; width: 100%; object-fit: cover; background: var(--paper); }

/* Scroll-in animation. Hidden only when JavaScript is running, so the page still reads without it. */
.rise { transition: opacity .5s ease, transform .6s var(--ease); }
.rise.slow { transition: opacity .7s ease, transform .8s var(--ease); }
.js .rise:not(.on) { opacity: 0; transform: translateY(var(--dy, 28px)); }

/* ---------- Hero ---------- */
.hero { position: relative; height: 760px; }
.stage {
  position: sticky; top: 0; height: 760px;
  padding: 0 5%; display: flex; flex-direction: column; overflow: hidden;
}
.hdr { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; padding: 22px 0; }
.logo { display: flex; align-items: flex-end; gap: 0.7em; min-height: 44px; font-family: 'Jost', sans-serif; font-size: 17px; padding: 8px 0; }
.logo svg { height: 1.9em; width: auto; display: block; fill: none; stroke: var(--ink); stroke-width: 12; stroke-linejoin: miter; stroke-miterlimit: 10; }
.logo span { line-height: 0.72; letter-spacing: 0.16em; white-space: nowrap; padding-bottom: 0.03em; }
.nv { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; font-size: 14px; }
.nv a { display: flex; align-items: center; min-height: 44px; }
.soon { color: var(--grey); }

.hero-top { flex: 1; min-height: 0; padding-bottom: 64px; display: flex; flex-wrap: nowrap; align-items: flex-end; gap: 0 48px; }
.hero-text { flex: 1 1 0; min-width: 0; padding-bottom: 40px; display: flex; flex-direction: column; gap: 20px; }
.hero h1 { margin: 0; font-size: clamp(1.7rem, min(6vw, 9vh), 5.5rem); line-height: 1.02; font-weight: 400; letter-spacing: -0.03em; }
.hero h1 span { display: block; }
.cap-p { margin: 0; max-width: 420px; font-size: 15px; line-height: 1.5; color: var(--grey); --dy: 16px; }
@media (max-height: 480px) { .cap-p { display: none; } }

.sketch-box { flex: none; display: flex; justify-content: flex-end; align-items: flex-end; padding-bottom: 8px; }
.sketch { display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: repeat(18, 1fr); }
.brick {
  background-image: url(assets/c4b632a2573271edf50ffac4f83e1034.png);
  background-repeat: no-repeat; background-size: 1200% 1800%;
  transition: opacity .5s ease, transform .6s var(--ease);
}
.js .brick:not(.on) { opacity: 0; transform: translateY(-18px); }

.build-bar {
  position: absolute; left: 5%; right: 5%; bottom: 0; border-top: 1px solid var(--ink);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 56px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--grey);
}
.build-bar > span:first-child { display: flex; align-items: center; gap: 10px; }
.dot { width: 8px; height: 8px; background: var(--accent); }
.hint { transition: opacity .4s ease; }
.hint.off { opacity: 0; }

/* ---------- Featured project ---------- */
.feat { padding: 112px 5% 96px; display: flex; flex-direction: column; gap: 28px; }
.feat-main { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 32px 56px; --dy: 48px; }
.feat-main img { max-width: 460px; aspect-ratio: 542 / 996; }
.feat-note { margin: 0; max-width: 360px; font-family: var(--mono); font-size: 12px; line-height: 1.6; letter-spacing: 0.04em; color: var(--grey); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; --dy: 24px; }
.facts div { display: flex; flex-direction: column; gap: 6px; }
.facts div span:first-child { font-family: var(--mono); font-size: 12px; color: var(--grey); }
.facts div span:last-child { font-size: 20px; }

.inside { padding: 0 5% 112px; display: flex; flex-direction: column; gap: 56px; }
.wide { aspect-ratio: 3 / 2; max-height: 760px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.grid.r43 img { aspect-ratio: 4 / 3; }
.grid.r32 img { aspect-ratio: 3 / 2; }

/* ---------- Selected work ---------- */
.work { padding: 96px 5%; display: flex; flex-direction: column; gap: 40px; }
.rows { display: flex; flex-direction: column; border-bottom: 1px solid var(--ink); }
.row {
  border-top: 1px solid var(--ink); padding: 20px 0; min-height: 100px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; --dy: -36px;
}
.row.click { cursor: pointer; }
.row-n { font-family: var(--mono); font-size: 12px; color: var(--grey); width: 32px; }
.row-name { flex: 2 1 240px; font-size: clamp(1.4rem, 2.4vw, 2rem); }
.row-type { flex: 1 1 200px; font-size: 15px; color: var(--grey); }
.row-st { flex: 0 0 130px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--ink); }
.thumb { position: relative; width: 240px; height: 150px; background-color: var(--paper); overflow: hidden; flex: 0 0 auto; max-width: 100%; }
.thumb.logo-box { background-color: #FFFFFF; border: 1px solid var(--ink); }
.thumb img { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb.logo-box img { object-fit: contain; }
.tag { position: absolute; left: 8px; bottom: 6px; padding: 2px 6px; background: rgba(17,17,17,0.72); color: var(--cream); font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; }
.thumb-soon { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; color: var(--grey); }

/* ---------- Process ---------- */
.process { padding: 96px 5% 120px; display: flex; flex-direction: column; gap: 40px; }
.phases { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.phase { border-top: 2px solid var(--ink); padding-top: 20px; display: flex; flex-direction: column; gap: 12px; --dy: 32px; }
.phase span { font-family: var(--mono); font-size: 12px; color: var(--grey); }
.phase h3 { margin: 0; font-size: 22px; font-weight: 500; }
.phase p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--grey); }

/* ---------- About ---------- */
.about { padding: 96px 5% 112px; border-top: 1px solid var(--ink); display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 40px 64px; }
.about img { display: block; width: 100%; max-width: 320px; margin-top: 18px; aspect-ratio: 3 / 4; object-fit: cover; }
.about-text { display: flex; flex-direction: column; gap: 20px; font-size: 17px; line-height: 1.5; max-width: 520px; }
.about-text p { margin: 0; }

/* ---------- Contact ---------- */
.contact { background: var(--ink); color: var(--cream); padding: 112px 5% 48px; display: flex; flex-direction: column; gap: 72px; }
.contact .label { color: var(--light); }
.c-wrap { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 56px 64px; }
.c-main { flex: 3 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 32px; }
.c-intro { display: flex; flex-direction: column; gap: 20px; }
.c-intro h2 { margin: 0; font-size: clamp(2.4rem, 6vw, 5.5rem); line-height: 1.02; font-weight: 400; letter-spacing: -0.03em; }
.c-intro p:last-child { margin: 0; max-width: 520px; font-size: 17px; line-height: 1.55; color: var(--light); }
.c-list { display: flex; flex-direction: column; max-width: 560px; border-bottom: 1px solid var(--grey); }
.c-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 24px; padding: 18px 0; border-top: 1px solid var(--grey); }
.c-row > span:first-child { width: 110px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--light); }
.c-row a, .c-row > span:last-child { font-size: clamp(1.1rem, 2.4vw, 1.5rem); min-width: 0; overflow-wrap: anywhere; }
.c-row a { color: var(--cream); text-decoration: underline; text-underline-offset: 5px; min-height: 32px; display: flex; align-items: center; }
.c-row a:hover { color: var(--light); }
.btn-start { align-self: flex-start; display: inline-flex; align-items: center; min-height: 52px; padding: 0 28px; border: 1px solid var(--cream); color: var(--cream); font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; }
.btn-start:hover { color: var(--light); }

.seal-box { display: flex; justify-content: center; padding: 24px 0 8px; }
.seal { display: block; width: 100%; max-width: 300px; height: auto; fill: none; stroke: var(--cream); }
.seal .draw { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .3s linear; }
.no-js .seal .draw { stroke-dashoffset: 0; }
.seal .fade { transition: opacity .4s linear; }
.js .seal .fade { opacity: 0; }
.seal-text { fill: var(--cream); stroke: none; font-family: 'Jost', sans-serif; font-size: 25px; letter-spacing: 0.3em; }

.foot { border-top: 1px solid var(--grey); padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-family: var(--mono); font-size: 12px; color: var(--light); }

/* ---------- Full-screen gallery ---------- */
.ov { display: none; position: fixed; inset: 0; z-index: 100; background: var(--cream); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.ov.open { display: block; }
.ov-bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 5%; background: var(--cream); border-bottom: 1px solid var(--ink); }
.ov-name { margin: 0; font-size: clamp(1.1rem, 2.4vw, 1.6rem); font-weight: 400; }
.ov-close { min-height: 44px; padding: 0 20px; border: 1px solid var(--ink); background: transparent; color: var(--ink); font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; cursor: pointer; flex: none; }
.ov-body { padding: 40px 5% 96px; display: flex; flex-direction: column; gap: 32px; }
.ov-head { display: flex; flex-direction: column; gap: 10px; }
.ov-type { margin: 0; font-size: 15px; color: var(--grey); }
.ov-list { display: none; flex-direction: column; border-bottom: 1px solid var(--ink); }
.ov-list.show { display: flex; }
.center { border-top: 1px solid var(--ink); }
.center-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; padding: 22px 0; }
.center-head.click { cursor: pointer; }
.center-head span:first-child { font-size: clamp(1.3rem, 2.4vw, 1.9rem); }
.center-head span:last-child { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--grey); }
.center-vid { padding: 0 0 28px; }
.center-vid video { display: block; width: 100%; max-width: 860px; max-height: 78vh; background: var(--ink); }
.ov-vid { display: none; width: 100%; max-height: 78vh; margin: 0 auto; background: var(--ink); }
.ov-vid.show { display: block; }
.ov-imgs { columns: 3 300px; column-gap: 12px; }
.ov-imgs img { display: block; width: 100%; margin: 0 0 12px; break-inside: avoid; background: var(--paper); }

/* ---------- Phones ---------- */
@media (max-width: 560px) {
  .hdr { gap: 4px 20px; padding: 14px 0 8px; }
  .nv { gap: 0 18px; }
  .hero-top { gap: 0 16px; padding-bottom: 72px; }
  .hero-text { padding-bottom: 8px; }
  .row { gap: 8px 16px; }
  .row-name { flex-basis: calc(100% - 48px); }
  .row-type, .row-st { flex-basis: 100%; padding-left: 48px; }
  .thumb { margin-left: 48px; width: calc(100% - 48px); max-width: 240px; }
  .c-row > span:first-child { width: 100%; }
}

/* People who ask their device for less motion get everything shown, with no movement. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise, .brick, .hint, .seal .draw, .seal .fade { transition: none !important; }
}
