/* ============ MaisonDoc — a house of care ============ */

:root {
  --bone: #f2eee8;
  --bone-deep: #e8e2d8;
  --navy: #0f2343;
  --navy-soft: #3c4f6e;
  --ice: #9bbfe5;
  --silver: #d9dce1;
  --graphite: #1a1a1a;
  --display: "Newsreader", serif;
  --sans: "Archivo", sans-serif;
  --mono: "Spline Sans Mono", monospace;
  --ease-lux: cubic-bezier(.22, 1, .36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-snap-type: y mandatory; scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bone);
  color: var(--navy);
  transition: background 1.1s var(--ease-lux), color 1.1s var(--ease-lux);
  overflow-x: hidden;
}
body[data-theme="navy"] { background: var(--navy); color: var(--bone); }
body[data-theme="bone-deep"] { background: var(--bone-deep); color: var(--navy); }

::selection { background: var(--ice); color: var(--navy); }

section.panel {
  min-height: 100vh; min-height: 100svh;
  scroll-snap-align: start; scroll-snap-stop: always;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  padding: clamp(20px, 4vw, 64px);
}

.rise, .rise-late, .rise-later {
  opacity: 0; transform: translateY(34px);
  transition: opacity 1s var(--ease-lux), transform 1.2s var(--ease-lux);
}
.rise-late { transition-delay: .18s; }
.rise-later { transition-delay: .36s; }
.panel.in .rise, .panel.in .rise-late, .panel.in .rise-later { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rise, .rise-late, .rise-later { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- chrome ---------- */
.brandmark {
  position: fixed; top: 28px; left: 36px; z-index: 60;
  display: flex; align-items: center; gap: 12px;
  font-family: var(--display); font-size: 21px;
  mix-blend-mode: difference; color: #fff; text-decoration: none;
}
.pagenav {
  position: fixed; top: 30px; right: 36px; z-index: 60;
  display: flex; gap: 26px; mix-blend-mode: difference;
}
.pagenav a {
  font-family: var(--mono); font-size: 11px; letter-spacing: .18em;
  text-transform: uppercase; color: #fff; text-decoration: none;
  opacity: .75; transition: opacity .3s;
  padding-bottom: 3px; border-bottom: 1px solid transparent;
}
.pagenav a:hover { opacity: 1; border-bottom-color: #fff; }
.pagenav a.here { opacity: 1; border-bottom-color: #fff; }
.corner-note {
  position: fixed; left: 36px; bottom: 30px; z-index: 60;
  font-family: var(--mono); font-size: 10px; letter-spacing: .16em;
  text-transform: uppercase; mix-blend-mode: difference; color: #fff; opacity: .7;
}

/* ---------- seal ---------- */
.seal { width: 44px; height: 44px; color: currentColor; display: block; }
.seal circle { fill: none; stroke: currentColor; }
.seal text { fill: currentColor; font-family: var(--display); }
.seal-btn {
  background: none; border: 0; padding: 6px; cursor: pointer;
  color: inherit; border-radius: 50%;
  transition: transform .8s var(--ease-lux), background .4s;
}
.seal-btn:hover { background: rgba(15,35,67,.06); }
.seal-btn:active .seal { transform: scale(.9); }
.seal-btn .seal { transition: transform .4s var(--ease-lux); }

/* ---------- rotating word ---------- */
.rot {
  display: inline-block; position: relative;
  white-space: nowrap;
  /* overflow stays visible so the inline-block keeps the true text baseline
     of its content — the word sits on exactly the same line as "A house of" */
  vertical-align: baseline;
  transition: width .6s cubic-bezier(.3, 1.2, .35, 1);
  text-align: left;
}
.rot .stage { display: inline-block; white-space: nowrap; }
.rot em, .rot .stage { font-style: italic; }
.rot .ltr {
  display: inline-block;
  transition: transform .5s cubic-bezier(.25, 1.3, .4, 1), opacity .28s ease;
}
.rot .ltr.pre { transform: translateY(.55em); opacity: 0; transition: none; }
.rot .ghost {
  position: absolute; left: 0; top: 0; white-space: nowrap;
  font-style: italic; pointer-events: none;
}
.rot .ghost .ltr.out { transform: translateY(-.55em); opacity: 0; }

/* ================= S1 · HERO PARALLAX ================= */
#hero { flex-direction: column; }
.px-field { position: absolute; inset: 0; pointer-events: none; }
.px-item {
  position: absolute;
  will-change: transform;
  opacity: 0;
  transition: opacity 1.4s var(--ease-lux);
  pointer-events: auto;
}
.px-item.shown { opacity: 1; }
.px-item .bob {
  animation: bob var(--bob-t, 7s) ease-in-out infinite;
  animation-delay: var(--bob-d, 0s);
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
  50% { transform: translateY(-12px) rotate(var(--rot, 0deg)); }
}
@media (prefers-reduced-motion: reduce) { .px-item .bob { animation: none; transform: rotate(var(--rot, 0deg)); } }
.px-item img {
  width: 100%; height: auto; display: block;
  filter: drop-shadow(0 26px 28px rgba(15, 35, 67, .18));
  transition: transform .6s var(--ease-lux);
}
.px-item:hover img { transform: scale(1.04); }
.px-item .cap {
  position: absolute; left: 50%; bottom: -26px; transform: translateX(-50%);
  font-family: var(--mono); font-size: 9px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--navy-soft); white-space: nowrap;
  opacity: 0; transition: opacity .4s;
}
/* product labels removed (no hover captions) */

.hero-center {
  position: relative; z-index: 2; text-align: center;
  max-width: 760px;
  display: flex; flex-direction: column; align-items: center;
}
.hero-eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: .26em;
  text-transform: uppercase; color: var(--navy-soft);
  margin-top: 20px;
}
h1 {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(54px, 8vw, 124px);
  line-height: 1.05; letter-spacing: -.015em;
  margin: 22px 0 26px; text-wrap: balance;
}
h1 em { font-style: italic; }
.hero-sub {
  font-size: clamp(15px, 1.25vw, 17px); line-height: 1.7;
  color: var(--navy-soft); max-width: 46ch; text-wrap: pretty;
}
.hero-actions { display: flex; gap: 14px; margin-top: 36px; flex-wrap: wrap; justify-content: center; }
.btn {
  padding: 15px 28px; border-radius: 99px; text-decoration: none;
  font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  border: 1px solid var(--navy); color: var(--navy);
  transition: background .45s, color .45s, border-color .45s;
}
.btn:hover { background: var(--navy); color: var(--bone); }
.btn.solid { background: var(--navy); color: var(--bone); }
.btn.solid:hover { background: var(--navy-soft); border-color: var(--navy-soft); }

.scroll-cue {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%);
  z-index: 3; text-decoration: none;
  font-family: var(--mono); font-size: 10px; letter-spacing: .3em;
  text-transform: uppercase; color: var(--navy-soft);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  white-space: nowrap;
}
.scroll-cue .line {
  width: 1px; height: 44px; overflow: hidden; background: rgba(15,35,67,.15); position: relative;
}
.scroll-cue .line::after {
  content: ""; position: absolute; left: 0; top: -50%;
  width: 100%; height: 50%; background: var(--navy);
  animation: drip 2.2s var(--ease-lux) infinite;
}
@keyframes drip { to { top: 110%; } }

/* ================= S2 · PHILOSOPHY (navy) ================= */
#philosophy .wrap { width: min(1100px, 100%); }
.section-eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: .22em;
  text-transform: uppercase; opacity: .55; margin-bottom: 22px; display: block;
}
h2 {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(38px, 4.8vw, 76px);
  line-height: 1.05; letter-spacing: -.015em; text-wrap: balance;
}
h2 em { font-style: italic; color: var(--ice); }
.philosophy-lede {
  margin-top: 28px; font-family: var(--display); font-weight: 300;
  font-size: clamp(19px, 2vw, 26px); line-height: 1.5;
  max-width: 56ch; text-wrap: pretty; color: rgba(242,238,232,.88);
}
.values {
  margin-top: clamp(40px, 6vh, 64px); max-width: 880px;
  border-top: 1px solid rgba(242,238,232,.25);
}
.value {
  display: grid; grid-template-columns: minmax(170px, 240px) 1fr;
  gap: 6px 44px; align-items: baseline;
  padding: 18px 0; border-bottom: 1px solid rgba(242,238,232,.13);
}
.value h3 {
  font-family: var(--display); font-style: italic; font-weight: 400;
  font-size: clamp(19px, 1.8vw, 25px); margin: 0;
}
.value p { font-size: 13.5px; line-height: 1.65; color: rgba(242,238,232,.62); text-wrap: pretty; max-width: 56ch; }

/* ================= S3 · ABOUT + FOOTER ================= */
#about { flex-direction: column; justify-content: center; gap: clamp(36px, 6vh, 72px); }
#about .wrap {
  width: min(1100px, 100%);
  display: grid; grid-template-columns: .85fr 1.15fr;
  gap: clamp(24px, 5vw, 90px); align-items: start;
}
.about-body p {
  font-size: clamp(14.5px, 1.15vw, 16.5px); line-height: 1.75;
  color: var(--navy-soft); text-wrap: pretty;
}
.about-body p + p { margin-top: 18px; }
.about-facts { margin-top: 34px; }
.fact-row {
  display: grid; grid-template-columns: auto 1fr; gap: 18px;
  padding: 13px 0; border-top: 1px solid rgba(15,35,67,.16);
  align-items: baseline;
}
.fact-row .k {
  font-family: var(--mono); font-size: 10px; letter-spacing: .16em;
  text-transform: uppercase; color: rgba(15,35,67,.5); white-space: nowrap;
}
.fact-row .v { font-size: 13.5px; text-align: right; }
.fact-row .v a { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }

.md-footer {
  width: min(1100px, 100%);
  border-top: 1px solid rgba(15,35,67,.16);
  padding-top: 24px;
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  align-items: baseline;
}
.md-footer .links { display: flex; gap: 22px; }
.md-footer a {
  font-family: var(--mono); font-size: 10px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--navy); text-decoration: none;
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.md-footer a:hover { border-bottom-color: var(--navy); }
.md-footer .legal {
  font-family: var(--mono); font-size: 10px; letter-spacing: .06em;
  color: rgba(15,35,67,.55); line-height: 1.9; max-width: 560px;
}

/* ---------- edit-mode chrome ---------- */
[data-bf-hidden] { display: none !important; }
body.et-editing [data-bf-hidden] { display: revert !important; opacity: .22; filter: grayscale(1); }
body.et-editing [data-tid] {
  outline: 1px dashed rgba(155,191,229,0); outline-offset: 4px; border-radius: 2px;
  transition: outline-color .2s; cursor: text;
}
body.et-editing [data-tid]:hover { outline-color: rgba(155,191,229,.9); }
body.et-editing [data-tid]:focus { outline: 1.5px solid var(--ice); }
.et-pill {
  position: fixed; left: 36px; bottom: 68px; z-index: 90;
  padding: 11px 20px; border-radius: 99px; cursor: pointer;
  border: 1px solid rgba(15,35,67,.35); background: var(--bone); color: var(--navy);
  font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  transition: background .35s, color .35s;
  white-space: nowrap;
}
.et-pill:hover, .et-pill.active { background: var(--navy); color: var(--bone); }
.et-reset { display: none; left: 36px; bottom: 116px; }
body.et-editing .et-reset { display: block; }
.et-x {
  position: fixed; z-index: 95; width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid rgba(15,35,67,.35); background: var(--bone); color: var(--navy);
  font: 14px/1 var(--sans); cursor: pointer; display: none;
  align-items: center; justify-content: center; padding: 0;
  box-shadow: 0 4px 14px rgba(15,35,67,.22);
}
.et-x:hover { background: var(--navy); color: var(--bone); }
body.et-editing .et-x.on { display: flex; }

/* ---------- invisible expanded touch targets ---------- */
.pagenav a, .brandmark, .md-footer .links a, .fact-row .v a, .btn { position: relative; }
.pagenav a::after, .brandmark::after, .md-footer .links a::after, .fact-row .v a::after {
  content: ""; position: absolute; left: -10px; right: -10px; top: -12px; bottom: -12px;
}
.btn::after { content: ""; position: absolute; left: 0; right: 0; top: -3px; bottom: -3px; }
.et-pill::after, .et-x::after { content: ""; position: absolute; left: -6px; right: -6px; top: -6px; bottom: -6px; }
.et-pill, .et-x { white-space: nowrap; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .value { grid-template-columns: 1fr; gap: 4px; }
  #about .wrap { grid-template-columns: 1fr; gap: 30px; }
  .brandmark { left: 20px; top: 20px; font-size: 18px; }
  .pagenav { right: 16px; top: 24px; gap: 14px; }
  .pagenav a { font-size: 10px; letter-spacing: .12em; }
  .corner-note { display: none; }
  .et-pill { left: 20px; bottom: 20px; }
  .et-reset { left: 20px; bottom: 66px; }
  section.panel { padding: 86px 22px 60px; }
  .px-item { opacity: 0 !important; }
  .px-item.shown { opacity: .5 !important; }
  .px-item .cap { display: none; }
  .fact-row .v { text-align: left; }
  .fact-row { grid-template-columns: 1fr; gap: 4px; }
  .scroll-cue { display: none; }
}
@media (max-width: 560px) {
  .hero-actions .btn { padding: 13px 20px; }
}
@media (max-height: 660px) {
  h1 { font-size: clamp(44px, 6.4vw, 80px); margin: 16px 0 18px; }
  h2 { font-size: clamp(30px, 4vw, 56px); }
  .seal { width: 36px; height: 36px; }
  .hero-sub { font-size: 14px; }
  .hero-actions { margin-top: 24px; }
  .scroll-cue { display: none; }
  .philosophy-lede { font-size: clamp(16px, 1.7vw, 21px); margin-top: 20px; }
  .values { margin-top: 26px; }
  .value { padding: 12px 0; }
  .value h3 { font-size: 17px; }
  section.panel { padding: 64px clamp(20px, 4vw, 64px) 56px; }
}
