/* Preserve the original configurable colors when a clone uses the cream defaults. */
:root {
  --surface-alt: #efede5;
  --chrome: var(--ink);
  --on-chrome: var(--paper);
  --on-accent: #fff;
  --desktop-header: #fff;
  --rule: color-mix(in srgb, var(--ink) 31%, var(--paper));
  --field-border: color-mix(in srgb, var(--ink) 53%, var(--paper));
}
:root[data-palette="linen"] {
  --palette-paper: #f2ece2;
  --palette-ink: #362d26;
  --surface-alt: #e9dfd0;
  --chrome: #443425;
  --palette-opening: #e1d4bf;
}
:root[data-palette="coastal"] {
  --palette-paper: #eff5f6;
  --palette-ink: #19374a;
  --surface-alt: #e0eced;
  --chrome: #193c52;
  --palette-opening: #d9e6e9;
}
:root[data-palette="woodland"] {
  --palette-paper: #eaf0e4;
  --palette-ink: #273a29;
  --surface-alt: #dfe6d7;
  --chrome: #243b2b;
  --palette-opening: #d5ddca;
}
:root[data-palette="navy"] {
  --palette-paper: #121f30;
  --palette-ink: #f0f3f4;
  --surface-alt: #1b2c3e;
  --chrome: #0d1725;
  --palette-opening: #1a2a3d;
}
:root[data-palette="charcoal"] {
  --palette-paper: #222322;
  --palette-ink: #f5f1e9;
  --surface-alt: #2e302d;
  --chrome: #171918;
  --palette-opening: #2a2b29;
}
:root[data-palette="gallery"] {
  --palette-paper: #f4f3f1;
  --palette-ink: #292c30;
  --surface-alt: #e8e7e4;
  --chrome: #383b40;
  --palette-opening: #e1dfda;
}
:root[data-palette="blush"] {
  --palette-paper: #f7edec;
  --palette-ink: #392e32;
  --surface-alt: #eddeda;
  --chrome: #523b40;
  --palette-opening: #e6d4cf;
}
:root[data-palette="evergreen"] {
  --palette-paper: #172a25;
  --palette-ink: #eff3ea;
  --surface-alt: #223730;
  --chrome: #0e1c18;
  --palette-opening: #243930;
}
/* The original config writes these three custom properties inline for unthemed clones. */
:root[data-palette]:not([data-palette="cream"]) {
  --paper: var(--palette-paper) !important;
  --ink: var(--palette-ink) !important;
  --intro-paper: var(--palette-opening) !important;
  --desktop-header: var(--surface-alt);
}
:root[data-accent="clay"]  { --accent-light-page: #954327; --accent-dark-page: #f0a081; }
:root[data-accent="brass"] { --accent-light-page: #77551a; --accent-dark-page: #e3bd77; }
:root[data-accent="ocean"] { --accent-light-page: #205b79; --accent-dark-page: #85c2e0; }
:root[data-accent="pine"]  { --accent-light-page: #2f5d44; --accent-dark-page: #96ceac; }
:root[data-accent="wine"]  { --accent-light-page: #833447; --accent-dark-page: #f0a4b7; }
:root[data-accent="iris"]  { --accent-light-page: #594b85; --accent-dark-page: #c4b5f1; }
:root[data-accent="teal"]  { --accent-light-page: #17635f; --accent-dark-page: #85cfc6; }
:root[data-accent="ochre"] { --accent-light-page: #805019; --accent-dark-page: #efbc77; }
:root[data-accent="cobalt"]{ --accent-light-page: #344e98; --accent-dark-page: #a4baff; }
:root[data-accent="olive"] { --accent-light-page: #515e29; --accent-dark-page: #bacb90; }
:root[data-accent="mocha"] { --accent-light-page: #674b3e; --accent-dark-page: #d5b6a4; }
:root[data-accent="rose"]  { --accent-light-page: #874967; --accent-dark-page: #ecb1cf; }
:root[data-accent]:not([data-accent="clay"]) { --accent: var(--accent-light-page) !important; }
:root:is([data-palette="navy"], [data-palette="charcoal"], [data-palette="evergreen"])[data-accent] {
  color-scheme: dark;
  --accent: var(--accent-dark-page, #f0a081) !important;
  --on-accent: #182128;
  --on-chrome: var(--ink);
}

.situations, .faq, .standalone-contact { background: var(--surface-alt); }
footer, .inquiry-cta, .mobile-nav, .header-phone a {
  background: var(--chrome);
  color: var(--on-chrome);
}
.button { color: var(--on-accent); }
.photo-home .masthead.scrolled {
  background: var(--desktop-header);
  color: var(--ink);
}
@media (max-width: 760px) {
  .masthead, .photo-home .masthead.scrolled { background: var(--chrome); color: var(--on-chrome); }
}
.facts, .faq details, .faq details:last-child, .preview-note, #steps li,
.photo-home .walk + .hero-copy { border-color: var(--rule); }
.fields input { border-color: var(--field-border); }
.intro-end { bottom: calc(env(safe-area-inset-bottom, 0px) + clamp(.75rem, 1.6svh, 1.125rem)); }
.intro-end p { margin-bottom: 0; }

/* A shared outline keeps the final frame of the docking animation identical to the header. */
.intro-house:has(svg), :is(.masthead, .photo-home .masthead) .brand-symbol:has(svg) { color: #29332f; }
[data-time="night"] {
  --mark-ground: #959578;
  --mark-flag: #e5ad6e;
  --mark-glass: #71848f;
  --mark-glass-shade: #536975;
  --mark-window-light: #f4c982;
  --mark-office-glass: #d5b885;
}
[data-property-mark="night"] .house-brick path { fill: #a18f81; }
[data-property-mark="night"] .house-brick:nth-child(3n) path { fill: #b19b8d; }
[data-property-mark="night"] .house-brick:nth-child(3n + 1) path { fill: #98887d; }
[data-property-mark="night"] .house-walls > g:nth-of-type(even) .house-brick path { fill: #827871; }
[data-property-mark="night"] .house-glass { fill: #f5c879; }
[data-property-mark="night"] .house-roof path:first-child { fill: #505c68; }
[data-property-mark="night"] .house-roof path:nth-child(2) { fill: #303d49; }
@media screen and (prefers-reduced-motion: no-preference) {
  .intro-house .building-part {
    transform-box: fill-box;
    transform-origin: center;
    animation: seat-material .55s linear var(--part-delay) both;
  }
  .intro-house .set-base { animation-name: place-foundation; }
  .intro-house .raise-post { animation-name: raise-member; transform-origin: center bottom; }
  .intro-house .extend-core { animation-name: extend-core; transform-origin: center bottom; }
  .intro-house .slide-left { --entry-x: -22px; --entry-angle: -9deg; animation-name: fit-panel; }
  .intro-house .slide-right { --entry-x: 22px; --entry-angle: 9deg; animation-name: fit-panel; }
  @keyframes seat-material {
    0% { opacity: 0; transform: translateY(-22px) rotate(-3deg); animation-timing-function: ease-in; }
    28% { opacity: 1; }
    76% { transform: translateY(.8px); animation-timing-function: ease-out; }
    100% { opacity: 1; transform: none; }
  }
  @keyframes raise-member {
    0% { opacity: 0; transform: translateY(-3px) rotate(-53deg); animation-timing-function: ease-out; }
    25% { opacity: 1; }
    81% { transform: rotate(1.2deg); }
    100% { opacity: 1; transform: none; }
  }
  @keyframes extend-core {
    from { opacity: 0; transform: scaleY(.06); animation-timing-function: ease-out; }
    24% { opacity: 1; }
    to { opacity: 1; transform: none; }
  }
  @keyframes fit-panel {
    0% { opacity: 0; transform: translate(var(--entry-x), -8px) rotate(var(--entry-angle)); animation-timing-function: ease-out; }
    22% { opacity: 1; }
    68% { transform: translateY(-3px) rotate(.6deg); animation-timing-function: ease-in; }
    88% { transform: translateY(.55px); }
    100% { opacity: 1; transform: none; }
  }
}

/* Property-specific photography in the situation heading. */
:is([data-property="land"], [data-property="skyline"], [data-property="commercial"]) .situations .cutout {
  width: clamp(7rem, 23vw, 20rem);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  flex: 0 0 auto;
}
@media (max-width: 530px) {
  :is([data-property="land"], [data-property="skyline"], [data-property="commercial"]) .situations .illustrated-heading {
    flex-wrap: wrap;
  }
  :is([data-property="land"], [data-property="skyline"], [data-property="commercial"]) .situations .cutout {
    width: 100%;
    aspect-ratio: 16 / 9;
  }
}
.property-hint {font-size: .9rem;}
