/* Typography and layout shared by the Assaf collection. Brand palettes and typefaces live in design.css. */
:root {
  --section: clamp(66px, 8.2vw, 132px);
  --measure: 65ch;
  --frame: 10px;
}

html { scroll-padding-block-start: 110px; }
main :is(h1, h2) { text-wrap: balance; }
main :is(.lede, .hero-short, .introduction-copy, .contact-copy) p { text-wrap: pretty; }

.eyebrow,
.theme-parent .group-heading .eyebrow { font-size: .715rem; letter-spacing: .14em; line-height: 1.5; }
.button, .hero-link { min-height: 46px; font-size: .81rem; }
.button { border-radius: 4px; }
.button svg, .hero-link svg { flex: none; }
.introduction { gap: clamp(34px, 8vw, 128px); }
.introduction-copy > p,
.section-intro .lede,
.contact-section .lede { font-size: clamp(1rem, 1.2vw, 1.2rem); line-height: 1.72; max-width: var(--measure); }
.section-heading { gap: clamp(20px, 7vw, 100px); }
.section-heading h2 { line-height: 1.05; }
.parent-principles p { font-size: .95rem; line-height: 1.7; }
.section-heading .eyebrow { margin-bottom: 14px; }
.editorial-image, .editorial-image > img { border-radius: var(--frame); }
.editorial-image figcaption { font-size: .76rem; line-height: 1.55; padding: 12px 1px 0; }
.editorial-image .image-index { flex-shrink: 0; }
.image-single[data-scene] .editorial-image > img {
  clip-path: inset(0 var(--scene-edge, 0px) round max(10px, var(--scene-radius, 0px)));
}

/* A readable navigation surface over both the opening photos and the page. */
[data-layout=immersive] .site-header:not(.scrolled) {
  --nav-glass: #10191ed4;
}
.header-inner {
  max-width: 1440px;
  background: linear-gradient(171deg, #ffffff12, transparent 56%), var(--nav-glass);
  box-shadow: inset 0 1px 1px #ffffff24, 0 8px 32px #10151217;
}
.desktop-nav a { padding-inline: clamp(11px, 1.1vw, 17px); font-size: .79rem; }
.parent-link { font-size: .68rem; }
.house-switch, .menu-toggle, .menu-close, .house-browser-close { width: 44px; height: 44px; flex: 0 0 44px; }
.house-browser-name b { font-size: .9rem; }
.house-browser-name small, .house-browser-foot { font-size: .77rem; opacity: 1; }
.house-browser-no { display: none; }
.house-browser-item svg:last-child { opacity: .8; }
.mobile-menu-head { align-items: center; }
.mobile-menu > nav a { font-size: clamp(1.44rem, 5vw, 1.95rem); }
.footer-directory .footer-houses nav a,
.footer-bottom nav a { font-size: .82rem; line-height: 1.5; }
.footer-bottom { gap: 18px; }
.footer-bottom p, .footer-bottom span { font-size: .74rem; line-height: 1.6; }

/* Parent company. The opening copy stays together and leaves the architecture in view. */
.parent-hero {
  --hero-fade-depth: 39%;
  min-height: max(670px, 89svh);
  height: auto;
  display: grid;
  background-color: var(--paper);
}
.parent-hero .hero-shade {
  background: linear-gradient(90deg, #061421bd 0%, #06142183 34%, #0614211c 67%, transparent 100%);
}
/* End in the page background so the photograph and the introduction meet seamlessly. */
.parent-hero .hero-shade::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: calc(var(--hero-fade-depth) + 12% * var(--frame-progress, 0));
  pointer-events: none;
  background: linear-gradient(to top, var(--paper) 5%, transparent 100%);
  background: linear-gradient(to top,
    var(--paper) 0 4%,
    color-mix(in srgb, var(--paper) 98%, transparent) 11%,
    color-mix(in srgb, var(--paper) 86%, transparent) 26%,
    color-mix(in srgb, var(--paper) 61%, transparent) 45%,
    color-mix(in srgb, var(--paper) 31%, transparent) 65%,
    color-mix(in srgb, var(--paper) 9%, transparent) 83%,
    transparent 100%
  );
}
.parent-hero-in {
  width: 100%;
  min-height: inherit;
  height: auto;
  justify-content: center;
  padding-block: clamp(130px, 16svh, 200px) clamp(100px, 15svh, 180px);
}
.parent-hero h1 {
  font-size: clamp(84px, 10.45vw, 184px);
  font-weight: 500;
  font-optical-sizing: none;
  line-height: .92;
  letter-spacing: -.058em;
  margin: clamp(14px, 2.1vh, 27px) 0 0;
}
.parent-hero h1 em { color: #f3debe; font-weight: inherit; }
.parent-hero-bottom {
  margin-top: 0;
  padding-top: clamp(21px, 4svh, 39px);
  align-items: center;
  gap: 22px 36px;
}
.parent-hero-bottom > p {
  font-size: clamp(.96rem, 1.34vw, 1.24rem);
  line-height: 1.55;
  color: #fff9ed;
}
.parent-hero .hero-coordinate { color: #fff4de; }
.parent-hero .scroll-cue { margin-left: auto; }
.parent-introduction .parent-philosophy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .74fr);
  gap: clamp(32px, 6.4vw, 110px);
  align-items: center;
}
.parent-introduction .parent-philosophy-copy p {
  font-size: clamp(1rem, 1.24vw, 1.2rem);
  color: var(--muted);
  line-height: 1.74;
  margin-top: 24px;
  max-width: 49ch;
}
.parent-introduction .parent-philosophy h2 { font-size: clamp(2.4rem, 5.1vw, 5.05rem); }
.theme-parent :is(.parent-philosophy, .group-heading, .story-intro, .contact-copy) h2 {
  font-weight: 500;
  font-optical-sizing: none;
}
.parent-philosophy-photo { margin: 0; overflow: hidden; border-radius: 3px; }
.parent-philosophy-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.parent-principles { margin-top: clamp(42px, 6vw, 78px); }
.group-section { background: #eeebe2; }
.group-heading { align-items: end; }
.group-heading > p { font-size: 1rem; max-width: 36ch; }
.house-filters { gap: 8px; margin-block: 32px 22px; }
.house-filters button { min-height: 44px; font-size: .81rem; letter-spacing: 0; border-radius: 100px; }
.house-filters .filter-result { font-size: .77rem; }
.house-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.house-grid .house-card {
  isolation: isolate;
  min-height: clamp(186px, 17vw, 253px);
  padding: clamp(15px, 1.55vw, 25px);
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--house-ink) 16%, transparent);
  box-shadow: inset 0 1px 0 #ffffff0b;
  overflow: hidden;
  background-image: linear-gradient(140deg, color-mix(in srgb, var(--house-ac) 12%, transparent), transparent 66%);
}
.house-grid .house-card-top > span {
  max-width: none;
  color: var(--house-ink);
  font-size: .71rem;
  letter-spacing: .035em;
  line-height: 1.4;
  opacity: .9;
}
.house-grid .house-card-top > svg { flex: none; width: 17px; height: 17px; }
.house-grid .house-card-brand { gap: 10px; padding-block: 18px; }
.house-grid .house-card-brand .brand-symbol { width: 27px; height: 32px; flex: none; }
.house-grid .house-card-brand h3 { font-size: clamp(1.25rem, 2vw, 1.85rem); line-height: 1.08; }
.house-grid .house-card-bottom p { font-size: .82rem; line-height: 1.48; color: var(--house-ink); opacity: .91; }
.house-grid .house-card-beauty .beauty-card-art { opacity: .19; }
.house-grid .house-card:focus-visible { outline: 2px solid #25352b; outline-offset: 3px; }
.interlude-copy { text-shadow: 0 2px 25px #0d1413a3; }

/* Independent openings. Each treatment follows the character of the house. */
.theme-estates .hero-shade {
  background: linear-gradient(90deg, #151b13cb, #20241a7a 35%, transparent 76%),
    linear-gradient(0deg, #1a1b11b8, transparent 45%);
}
.theme-auto .hero-shade {
  background: linear-gradient(90deg, #0e1317d9, #1112168f 34%, transparent 72%),
    linear-gradient(0deg, #0e1115bf, transparent 39%);
}
.theme-viva .hero-shade {
  background: linear-gradient(90deg, #12212bcb, #15222d8e 30%, #201b170e 70%, transparent),
    linear-gradient(0deg, #191712cf 0%, transparent 46%);
}
.theme-viva .hero-picture img { object-position: 66% center; }
.theme-viva .hero-immersive h1 { text-shadow: 0 4px 30px #1418174d; }
.theme-viva .hero-link { color: #fff1db; }
.theme-auto .hero-immersive h1 { font-size: clamp(82px, 12.2vw, 210px); }
.hero-coordinate { font-size: .7rem; line-height: 1.35; }
.house-number { display: none; }
.hero-immersive .hero-short { font-size: clamp(.98rem, 1.25vw, 1.19rem); line-height: 1.58; }
.journal-photo figcaption, .gallery-art figcaption, .blueprint-art figcaption { font-size: .75rem; line-height: 1.55; }
.gallery-art, .journal-photo img, .hero-art img, .blueprint-art img { border-radius: var(--frame); }
.theme-auctions .gallery-art { padding: clamp(12px, 1.6vw, 23px); box-shadow: 0 16px 36px #4127080c; }
.theme-law .journal-photo img { min-height: 290px; }
.theme-planning .blueprint-art img { object-position: 43% center; }
.theme-finance .hero-art img { object-position: 52% center; }
.theme-media .editorial-photo img { object-position: 55% center; }
.theme-consulting .statement-composition img { object-position: 52% center; }
.terminal-panel .terminal-rules > div > span:last-child { font-size: .73rem; }
.terminal-panel .terminal-caption { font-size: .75rem; }
.focus-tabs button, .process-explorer .focus-tabs button { font-size: .86rem; min-height: 46px; }
.focus-panel > p:not(.lbl), .process-explorer .focus-panel > p:not(.lbl), .practice-detail-body { font-size: .98rem; line-height: 1.75; }

.theme-tech .hero-product { min-height: 0; padding-block: clamp(42px, 6vw, 90px) clamp(64px, 7vw, 124px); }
.theme-tech .hero-product h1 { font-size: clamp(3.9rem, 7.6vw, 7.9rem); }
.theme-tech .hero-short { font-size: clamp(1rem, 1.4vw, 1.23rem); line-height: 1.6; }
.theme-tech .product-checks { font-size: .73rem; line-height: 1.5; }
.theme-tech .product-visual {
  height: auto;
  min-width: 0;
  padding: 9px;
  background: #e2e8d9;
  border: 1px solid #25332621;
  border-radius: 24px;
  box-shadow: 0 20px 50px #23302515;
}
.theme-tech .product-visual > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 16px 16px 5px 5px;
}
.theme-tech .grade-card {
  position: static;
  max-width: none;
  min-height: 0;
  margin-top: 8px;
  padding: 15px;
  border-radius: 5px 5px 16px 16px;
  background: #f0f6e8;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 16px;
  align-items: center;
}
.theme-tech .grade-card .eyebrow { grid-column: 1 / -1; font-size: .72rem; font-weight: 650; }
.theme-tech .grade-letters { margin: 0; display: flex; gap: 6px; }
.theme-tech .grade-letters > button { width: 44px; height: 44px; }
.theme-tech .grade-card > p {
  margin: 0;
  min-height: 0;
  max-width: none;
  font: 500 .85rem/1.45 var(--body);
  color: #293b2e;
}
.theme-beauty .beauty-hero {
  gap: clamp(32px, 5.9vw, 100px);
  padding-block: clamp(36px, 5.3vw, 84px) clamp(64px, 8vw, 132px);
}
.theme-beauty .beauty-hero h1 {
  font-size: clamp(3.7rem, 8.1vw, 8.5rem);
  font-weight: 500;
  font-optical-sizing: none;
  text-wrap: initial;
}
.theme-beauty .beauty-hero h1 em { font-weight: inherit; }
.beauty-hero-photo { box-shadow: 0 22px 60px #6a3d3520; }
.theme-beauty .beauty-hero-copy > p:not(.beauty-kicker),
.theme-beauty .beauty-section-copy > p { line-height: 1.65; }
.beauty-button { font-size: .85rem; }
.theme-beauty .beauty-photo { border-radius: 8px; }
.theme-beauty .beauty-supplies { background: #fcf7f2; }
.theme-beauty .beauty-visit { background: #f4e8e1; }

/* Keep enquiry controls readable at touch sizes and without browser auto-zoom. */
.enq-form label, .theme-beauty .enq-form label { font-size: .84rem; line-height: 1.45; }
.enq-form :is(input, textarea, select) { font-size: 1rem; line-height: 1.5; min-height: 44px; min-width: 0; }
.enq-form__note, .theme-beauty .enq-form__note, .theme-beauty .enq-form__addr { font-size: .82rem; line-height: 1.55; }
.enq-form a { overflow-wrap: anywhere; }
.enq-form__foot { flex-wrap: wrap; }
.document-main .doc__head .lede, .document-main .doc .body p { font-size: 1rem; line-height: 1.7; }
.document-main .toc a { font-size: .82rem; line-height: 1.4; }

.market-ribbon .tick__s, .market-details summary { font-size: .69rem; }
.market-ribbon .tick__i, .market-filters button, .market-table { font-size: .75rem; }
.tick__quote-state, .market-table thead th, .market-table tbody th span,
.market-time, .market-source, .market-notes { font-size: .69rem; }
.market-filters button, .market-details summary { min-height: 44px; }

/* Short opacity transitions avoid pulling the whole layout during a page change. */
.hero :is(h1, .hero-eyebrow, .hero-short) { animation: hero-arrive .42s var(--ease) both; }
.reveal-ready [data-reveal] { transition-duration: .5s; }
.reveal-ready [data-reveal]:not(.is-visible),
.reveal-ready .house-card[data-reveal]:not(.is-visible) { transform: translateY(12px); }
@keyframes hero-arrive { from { opacity: .78; transform: translateY(6px); } }
::view-transition-old(root) { animation: none; }
::view-transition-new(root) { animation: page-appear .25s ease-out both; }
@keyframes page-appear { from { opacity: 0; } to { opacity: 1; } }

@media (min-width: 1220px) {
  .house-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 1040px) {
  .desktop-nav a { padding-inline: 10px; font-size: .76rem; }
  .theme-tech .grade-card { grid-template-columns: 1fr; }
  .theme-tech .grade-card .eyebrow { grid-column: auto; }
}

@media (max-width: 900px) {
  .house-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .group-heading { align-items: start; }
}

@media (max-width: 760px) {
  html { scroll-padding-block-start: 88px; }
  .header-inner { gap: 7px; padding-inline: 14px 7px; min-height: 62px; }
  .header-inner .brand { min-width: 0; }
  .house-switch, .menu-toggle { padding: 8px; }
  .parent-hero { --hero-fade-depth: 44%; min-height: max(620px, 88svh); }
  .parent-hero-in { justify-content: end; padding-block: 128px 85px; }
  .parent-hero h1 { font-size: clamp(59px, 15.7vw, 105px); }
  .parent-hero-bottom { display: grid; grid-template-columns: 1fr auto; gap: 15px 10px; }
  .parent-hero-bottom > p { grid-column: 1 / -1; }
  .parent-hero-bottom .button { justify-self: start; }
  .parent-hero .scroll-cue { margin-left: 0; }
  .parent-hero .hero-shade {
    background: linear-gradient(0deg, #0c151bea 0%, #0c151bba 28%, #0c151b32 64%, #0c151b30 100%);
  }
  .parent-hero .hero-picture img { object-position: 66% center; }
  .parent-introduction .parent-philosophy { grid-template-columns: 1fr; }
  .parent-introduction .parent-philosophy h2 { max-width: 19ch; }
  .parent-introduction .parent-philosophy-copy p { margin-top: 18px; }
  .parent-principles article { display: block; }
  .parent-principles h3 { margin: 0 0 7px; }
  .group-heading h2 { font-size: clamp(2.6rem, 9.3vw, 4rem); }
  .group-heading > p { font-size: .94rem; }
  .house-filters { margin-block: 25px 18px; }
  .house-filters button { padding-inline: 12px; }
  .house-filters .filter-result { align-self: center; }
  .hero-immersive { height: auto; min-height: max(630px, 90svh); display: grid; }
  .hero-immersive .hero-composition {
    padding-block: 128px 82px;
    height: auto;
    min-height: inherit;
    width: 100%;
    justify-content: end;
  }
  .hero-immersive .hero-shade {
    background: linear-gradient(0deg, #101818eb 0%, #101818ab 32%, #10181823 75%, #10181838 100%);
  }
  .theme-auto .hero-picture img { object-position: 60% 45%; }
  .theme-estates .hero-picture img { object-position: 58% 43%; }
  .theme-viva .hero-picture img { object-position: 72% 49%; }
  .hero-immersive .hero-bottom { margin-top: 22px; }
  .theme-auto .hero-immersive .hero-composition { justify-content: end; padding-block: 125px 82px; }
  .theme-auto .hero-immersive h1 { font-size: clamp(74px, 20vw, 140px); }
  .theme-estates .hero-immersive .hero-composition { padding-bottom: 82px; }
  .hero-immersive .hero-bottom .hero-short { margin-bottom: 10px; }
  .hero-coordinate { font-size: .63rem; }
  .hero-coordinate > span:nth-child(2) { display: none; }
  .hero-bottom .scroll-cue > span { display: none; }
  .theme-tech .hero-product { padding-top: 36px; }
  .theme-tech .hero-product h1 { font-size: clamp(3.2rem, 11vw, 5rem); }
  .theme-tech .product-visual { border-radius: 16px; }
  .theme-tech .product-visual > img { border-radius: 10px 10px 4px 4px; }
  .theme-tech .grade-card { border-radius: 4px 4px 10px 10px; }
  .theme-beauty .beauty-hero h1 { font-size: clamp(3.6rem, 13vw, 5.7rem); }
  .theme-beauty .beauty-hero-photo { aspect-ratio: 5 / 5.25; }
  .enq-form__row { row-gap: 16px; }
  .market-details summary > span:last-child { white-space: normal; }
}

@media (max-width: 519px) {
  .house-grid { grid-template-columns: 1fr; gap: 9px; }
  .house-grid .house-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    min-height: 144px;
    padding: 17px;
    align-content: center;
  }
  .house-grid .house-card-brand { padding-block: 1px; }
  .house-grid .house-card-brand h3 { font-size: 1.55rem; }
  .house-grid .house-card-bottom { margin-top: 0; }
  .house-grid .house-card-bottom p { max-width: none; }
  .mobile-menu { width: min(94vw, 440px); padding: 22px; }
}

@media (min-width: 430px) and (max-width: 760px) {
  .theme-tech .grade-card { grid-template-columns: max-content minmax(0, 1fr); }
  .theme-tech .grade-card .eyebrow { grid-column: 1 / -1; }
}

@media (max-width: 620px) and (orientation: portrait) {
  .parent-hero .hero-picture img, .theme-viva .hero-picture img { object-position: center; }
}

@media (max-width: 390px) {
  .hero-immersive .hero-bottom { gap: 12px; }
  .theme-planning .header-inner .brand { font-size: 1.05rem; }
  .theme-auto .header-inner .brand, .theme-tech .header-inner .brand { font-size: 1.17rem; }
}

@media (prefers-reduced-motion: reduce) {
  .image-single[data-scene] .editorial-image > img { clip-path: none; }
  .reveal-ready [data-reveal]:not(.is-visible),
  .reveal-ready .house-card[data-reveal]:not(.is-visible) { transform: none; }
}

@media print {
  .parent-hero, .hero-immersive, .parent-hero-in, .hero-immersive .hero-composition { min-height: 0; }
  .parent-hero-in, .hero-immersive .hero-composition { padding-block: 28px; }
}

@media (prefers-reduced-motion: no-preference) {
  [data-scroll-frame="coast"] {
    background: var(--paper);
    --frame-inset: min(56px, calc(var(--gutter) * .75));
    --frame-trim: 38px;
    --frame-radius: 10px;
  }
  [data-scroll-frame="coast"] > :is(.hero-picture, .hero-shade) {
    clip-path: inset(
      0
      calc(var(--frame-progress, 0) * var(--frame-inset))
      calc(var(--frame-progress, 0) * var(--frame-trim))
      round calc(var(--frame-progress, 0) * var(--frame-radius))
    );
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  [data-responsive-surface] {
    --surface-light: #fff9d52b;
    isolation: isolate;
  }
  [data-responsive-surface="beauty"] { --surface-light: #ffdec039; }
  [data-responsive-surface="estate"] { --surface-light: #ffe1b831; }
  [data-responsive-surface="device"] { --surface-light: #e5f7cf40; }
  [data-responsive-surface] > img {
    transform: perspective(1250px)
      translate3d(var(--surface-x, 0px), var(--surface-y, 0px), 0)
      rotateX(var(--surface-rx, 0deg)) rotateY(var(--surface-ry, 0deg)) scale(1.045);
    transition: transform .42s var(--ease);
  }
  [data-responsive-surface="estate"] > img {
    transform: perspective(1800px)
      translate3d(var(--surface-x, 0px), calc(var(--hero-shift, 0px) + var(--surface-y, 0px)), 0)
      rotateX(var(--surface-rx, 0deg)) rotateY(var(--surface-ry, 0deg)) scale(1.11);
  }
  [data-responsive-surface]::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse at var(--light-x, 50%) var(--light-y, 50%), var(--surface-light), transparent 62%);
    opacity: 0;
    transition: opacity .38s ease;
  }
  [data-responsive-surface][data-surface-engaged]::after { opacity: 1; }
}

@media (max-width: 760px) {
  [data-scroll-frame="coast"] {
    --frame-inset: min(10px, calc(var(--gutter) * .5));
    --frame-trim: 15px;
    --frame-radius: 11px;
  }
}

.market-chart-link { display: inline-flex; align-items: center; gap: .35em; text-decoration: underline; text-decoration-color: currentColor; text-underline-offset: .22em; }
.market-chart-link::after { content: '↗'; font-size: .78em; }
.market-chart-link:hover, .market-chart-link:focus-visible { color: var(--accent, currentColor); }

@media (max-width: 440px) {
  .theme-parent .site-header .brand { font-size: 11px; letter-spacing: .075em; }
}
