/* The new Brescia look for the pages still built on styles.css (about, story, stone guides, material and
   project records). Loaded last; everything is scoped to body.site-v2 so the redesigned pages
   (house.css) are untouched. The header, menu and footer match house.css exactly. */
body.site-v2 {
  --ink: #1b1c1a;
  --ink-soft: #3a3b37;
  --paper: #f4f0e9;
  --paper-deep: #ebe5da;
  --muted: #6f6b63;
  --muted-strong: #55524c;
  --line: rgba(27, 28, 26, 0.14);
  --red: #b34732;
  --red-deep: #93371f;
  --serif: "Fraunces", "Fraunces Fallback", Georgia, "Times New Roman", serif;
  --sans: "Manrope", "Manrope Fallback", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --limestone: #f4f0e9;
  --bone: #ebe5da;
  --terracotta: #b34732;
  --mute: #6f6b63;
  --mono: var(--sans);
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --gutter: clamp(18px, 4.2vw, 64px);
  --header-h: 76px;
  background: var(--paper);
  font-family: var(--sans);
}
html:has(body.site-v2) { background: var(--paper, #f4f0e9); }
/* overflow-x: hidden on body (styles.css) turns it into a scroller and breaks position: sticky */
body.site-v2 { overflow-x: clip; }
body.site-v2 h1, body.site-v2 h2, body.site-v2 h3 { font-optical-sizing: auto; }
body.site-v2 :focus-visible { outline: 2px solid var(--terracotta); outline-offset: 3px; }

/* ---------------- header: always the light, solid bar ---------------- */
.site-v2 .site-header { position: fixed; z-index: 40; top: 0; left: 0; right: 0; height: var(--header-h); min-height: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px;
  padding: 0 var(--gutter); color: var(--ink); background: rgba(244, 240, 233, 0.92); border-bottom: 1px solid var(--line); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.site-v2 .brand { display: inline-flex; align-items: center; gap: 12px; width: auto; text-decoration: none; justify-self: start; color: var(--ink); }
.site-v2 .site-header .brand img { width: 30px; height: auto; object-fit: contain; filter: none; }
.site-v2 .brand-word { position: relative; font-family: var(--serif); font-weight: 600; font-size: 21px; letter-spacing: -0.01em; line-height: 1; white-space: nowrap; padding-bottom: 10px; margin-right: 36px; }
.site-v2 .brand-word em { position: absolute; right: -38px; bottom: -8px; font-family: Allura, "Brush Script MT", cursive; font-style: normal; font-weight: 400; font-size: 25px; letter-spacing: 0; color: var(--terracotta); transform: rotate(-6deg); }
.site-v2 .desktop-nav { display: flex; gap: clamp(16px, 2vw, 30px); font-size: 13.5px; letter-spacing: 0; text-transform: none; }
.site-v2 .desktop-nav a { text-decoration: none; opacity: 0.78; transition: opacity 0.2s; transform: none; }
.site-v2 .desktop-nav a:hover, .site-v2 .desktop-nav a[aria-current="page"] { opacity: 1; transform: none; }
.site-v2 .nav-cta { justify-self: end; display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px; font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; text-decoration: none;
  border: 1px solid var(--ink); background: rgba(244, 240, 233, 0.6); opacity: 1; }
.site-v2 .nav-cta:hover { background: var(--ink); color: var(--limestone); transform: none; }
.site-v2 .menu-toggle { display: none; justify-self: end; width: 46px; height: 46px; padding: 0; border: 1px solid var(--line); background: rgba(244, 240, 233, 0.8); position: relative; color: var(--ink); }
.site-v2 .menu-toggle span:not(.sr-only) { position: absolute; left: 13px; right: 13px; width: auto; height: 1.5px; background: var(--ink); transition: transform 0.3s var(--ease); }
.site-v2 .menu-toggle span:nth-child(1) { top: 18px; }
.site-v2 .menu-toggle span:nth-child(2) { top: 26px; }
.site-v2 .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.site-v2 .menu-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }
html:has(.site-v2 .menu-toggle[aria-expanded="true"]) { overflow: hidden; }

.site-v2 .mobile-menu { position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; height: calc(100dvh - var(--header-h)); display: flex; flex-direction: column; gap: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 8px var(--gutter) max(16px, env(safe-area-inset-bottom)); color: var(--ink); background: var(--limestone); border: 0; box-shadow: none; counter-reset: menu; }
.site-v2 .mobile-menu[hidden] { display: none; }
.site-v2 .mobile-menu > a { counter-increment: menu; flex: none; display: flex; align-items: center; gap: 14px; min-height: 52px; padding: clamp(8px, 1.5dvh, 14px) 0; border-bottom: 1px solid var(--line);
  font-family: var(--serif); font-size: clamp(26px, min(8vw, 4.4dvh), 36px); line-height: 1.05; letter-spacing: -0.01em; text-transform: none; text-decoration: none; color: var(--ink);
  -webkit-tap-highlight-color: transparent; animation: menu-in 0.7s var(--ease) both; }
.site-v2 .mobile-menu > a::before { content: counter(menu, decimal-leading-zero); flex: none; width: 24px; font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: 0.12em; color: var(--mute); transform: translateY(1px); }
.site-v2 .mobile-menu > a[aria-current="page"] { color: var(--terracotta); font-style: italic; }
.site-v2 .mobile-menu > a[aria-current="page"]::before { color: var(--terracotta); font-style: normal; }
.site-v2 .mobile-menu > a:nth-child(2) { animation-delay: 0.04s; } .site-v2 .mobile-menu > a:nth-child(3) { animation-delay: 0.08s; } .site-v2 .mobile-menu > a:nth-child(4) { animation-delay: 0.12s; }
.site-v2 .mobile-menu > a:nth-child(5) { animation-delay: 0.16s; } .site-v2 .mobile-menu > a:nth-child(6) { animation-delay: 0.2s; } .site-v2 .mobile-menu > a:nth-child(7) { animation-delay: 0.24s; }
.site-v2 .mobile-menu > a.menu-wa { counter-increment: none; margin-top: auto; justify-content: center; min-height: 54px; padding: 16px; border: 0; background: var(--ink); color: var(--limestone);
  font-family: var(--sans); font-size: 15px; font-weight: 700; letter-spacing: 0.02em; animation-delay: 0.32s; }
.site-v2 .mobile-menu > a.menu-wa::before { content: none; }
.site-v2 .mobile-menu > a.menu-studio { counter-increment: none; position: relative; isolation: isolate; overflow: hidden; display: grid; gap: 2px; margin: clamp(12px, 2.2dvh, 20px) 0 12px;
  padding: clamp(14px, 2dvh, 18px) 54px clamp(14px, 2dvh, 18px) 18px; border: 0; color: #fff; font-size: clamp(22px, 3.2dvh, 26px); animation-delay: 0.28s;
  background: linear-gradient(100deg, rgba(20, 18, 16, 0.86) 30%, rgba(20, 18, 16, 0.25)), url(./assets/magrade/golden-phoenix-512.webp) center / cover; }
.site-v2 .mobile-menu > a.menu-studio::before { content: "New · Stone Studio"; width: auto; transform: none; color: #e9b89f; font-size: 10px; }
.site-v2 .mobile-menu > a.menu-studio small { font-family: var(--sans); font-size: 13px; line-height: 1.4; color: rgba(255, 255, 255, 0.78); }
.site-v2 .mobile-menu > a.menu-studio::after { content: "→"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-family: var(--sans); font-size: 22px; }
@keyframes menu-in { from { opacity: 0; transform: translateY(14px); } }

@media (max-width: 900px) {
  .site-v2 .site-header { grid-template-columns: 1fr auto; }
  .site-v2 .desktop-nav, .site-v2 .nav-cta { display: none; }
  .site-v2 .menu-toggle { display: block; }
}
@media (max-width: 420px) {
  .site-v2 .brand-word { font-size: 18px; }
}

/* ---------------- footer ---------------- */
.site-v2 .site-footer { background: #141513; color: rgba(244, 240, 233, 0.82); padding: 56px var(--gutter) 34px; }
.site-v2 .footer-top { display: flex; gap: 22px; align-items: center; justify-content: flex-start; padding-bottom: 28px; border-bottom: 1px solid rgba(244, 240, 233, 0.14); }
.site-v2 .footer-top img { width: 54px; height: auto; }
.site-v2 .footer-top p { max-width: 30ch; margin: 0; font-family: var(--serif); font-size: 26px; line-height: 1.15; color: var(--limestone); text-align: start; }
.site-v2 .footer-bottom { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 14px 28px; padding-top: 22px; border: 0; font-size: 13px; letter-spacing: 0; text-transform: none; color: rgba(244, 240, 233, 0.66); }
.site-v2 .footer-bottom a { color: inherit; text-decoration: none; opacity: 0.85; }
.site-v2 .footer-bottom a:hover { opacity: 1; color: #fff; }

/* ---------------- shared type and buttons on the old templates ---------------- */
.site-v2 .button { gap: 12px; min-height: 48px; padding: 0 20px; border-radius: 0; font-size: 14px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.site-v2 .button-dark { background: var(--ink); color: var(--limestone); }
.site-v2 .button-dark:hover { background: var(--terracotta); }
.site-v2 .kicker, .site-v2 .section-label { font-family: var(--sans); color: var(--terracotta); letter-spacing: 0.16em; }
.site-v2 .section-dark .kicker, .site-v2 .section-dark .section-label { color: #e9b89f; }

/* one heading voice across the old templates: the serif display, never a heavy sans */
.site-v2 h1, .site-v2 h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; }
.site-v2 h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; }

/* ================= v2 motion (site-v2.js) ================= */
.site-v2 .v2-rise { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease) var(--v2d, 0ms), transform 1.1s var(--ease) var(--v2d, 0ms); }
.site-v2 .v2-wipe { clip-path: inset(0 0 100% 0); transition: clip-path 1.2s var(--ease) var(--v2d, 0ms); }
.site-v2 .v2-wipe img { transform: scale(1.12); transition: transform 1.8s var(--ease) var(--v2d, 0ms); }
.site-v2 .v2-rise.is-in { opacity: 1; transform: none; }
.site-v2 .v2-wipe.is-in { clip-path: inset(0 0 0 0); }
.site-v2 .v2-wipe.is-in img { transform: none; }
.site-v2 .v2-settle { animation: v2-settle 2.4s var(--ease) both; }
@keyframes v2-settle { from { transform: scale(1.1); filter: saturate(0.7); } }
@media (prefers-reduced-motion: reduce) { .site-v2 .v2-settle { animation: none; } }

/* ================= template fixes and upgrades ================= */
/* application pages: the intro heading was capped at 14 body-text characters */
.site-v2 .app-intro-heading { max-width: none; }
.site-v2 .app-intro h2, .site-v2 .app-section-heading h2, .site-v2 .app-projects-heading h2, .site-v2 .app-showroom h2, .site-v2 .app-cta h2,
.site-v2 .app-route h2, .site-v2 .app-surface-map h2, .site-v2 .app-archive h2 { letter-spacing: -0.03em; max-width: 16ch; }
.site-v2 .app-hero h1, .site-v2 .cat-hero h1, .site-v2 .marble-hero h1, .site-v2 .detail-hero h1, .site-v2 .contact-hero h1, .site-v2 .service-hero h1 { letter-spacing: -0.035em; line-height: 0.95; }
.site-v2 .app-kicker, .site-v2 .detail-kicker, .site-v2 .material-kicker, .site-v2 .material-label, .site-v2 .story-kicker { letter-spacing: 0.16em; font-weight: 600; }
.site-v2 [lang="id"] h2 { max-width: 22ch; }
.site-v2 [lang="id"] p { max-width: 64ch; }

/* every image card gets the same slow lift */
.site-v2 .cat-ref img, .site-v2 .cat-project img, .site-v2 .marble-card img, .site-v2 .app-project-image img, .site-v2 .app-reference-image img, .site-v2 .story-card-media img { transition: transform 1.4s var(--ease); }
.site-v2 .cat-ref:hover img, .site-v2 .cat-project:hover img, .site-v2 .marble-card:hover img, .site-v2 .app-project:hover img, .site-v2 .app-reference:hover img { transform: scale(1.05); }
.site-v2 .material-button { min-height: 48px; padding: 0 20px; font-size: 13px; letter-spacing: 0.06em; }
.site-v2 .button-outline { border: 1px solid currentColor; }

/* ================= articles ================= */
.site-v2.story-page .story-title { font-size: clamp(44px, 6.4vw, 96px); line-height: 0.98; letter-spacing: -0.035em; max-width: 18ch; }
.site-v2.story-page .story-lede { font-size: clamp(17px, 1.5vw, 21px); line-height: 1.55; max-width: 52ch; color: var(--ink-soft); }
.site-v2.story-page .article-hero-image { border-radius: 0; aspect-ratio: 21 / 9; }
.site-v2.story-page .article-body { font-size: 18px; }
.site-v2.story-page .article-body > p:first-child::first-letter { float: left; margin: 6px 12px 0 0; font-family: var(--serif); font-size: 76px; line-height: 0.8; color: var(--terracotta); }
.site-v2.story-page .article-body h2 { margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line); font-size: clamp(28px, 3vw, 38px); scroll-margin-top: calc(var(--header-h) + 20px); }
.site-v2.story-page .article-body li::marker { color: var(--terracotta); }
.site-v2.story-page .article-body strong { font-weight: 600; }
.site-v2.story-page .article-wa { margin-top: 48px; padding: 28px; background: var(--ink); color: var(--limestone); }
.site-v2.story-page .article-wa .button { background: var(--limestone); color: var(--ink); }
.v2-time { color: var(--mute); letter-spacing: 0.08em; }
.v2-read { position: fixed; z-index: 39; top: var(--header-h); left: 0; right: 0; height: 3px; pointer-events: none; }
.v2-read i { display: block; height: 100%; background: var(--terracotta); transform-origin: left; transform: scaleX(var(--p, 0)); }
.v2-toc { display: none; }
@media (min-width: 1200px) {
  .site-v2 .v2-has-toc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 760px) minmax(0, 1fr); column-gap: 40px; }
  .site-v2 .v2-has-toc > * { grid-column: 1 / -1; }
  .site-v2 .v2-has-toc > .article-body { grid-column: 2; width: auto; }
  .site-v2 .v2-has-toc > .v2-toc { display: block; grid-column: 1; grid-row: 3; justify-self: end; align-self: start; position: sticky; top: calc(var(--header-h) + 40px); width: min(260px, 100%); margin-top: clamp(36px, 6vw, 64px); }
  .site-v2 .v2-has-toc > .article-body { grid-row: 3; }
  .site-v2 .v2-has-toc > .v2-next { grid-column: 2; }
}
.v2-toc-label { display: block; margin-bottom: 12px; font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--terracotta); }
.v2-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; border-left: 1px solid var(--line); }
.v2-toc li { counter-increment: toc; }
.v2-toc a { display: block; padding: 8px 0 8px 16px; margin-left: -1px; border-left: 2px solid transparent; font-size: 14px; line-height: 1.35; text-decoration: none; color: var(--mute); transition: color 0.3s, border-color 0.3s; }
.v2-toc a::before { content: counter(toc, decimal-leading-zero) "  "; font-size: 11px; letter-spacing: 0.1em; }
.v2-toc a:hover, .v2-toc a.is-on { color: var(--ink); border-left-color: var(--terracotta); }
.v2-next { display: grid; grid-template-columns: 160px minmax(0, 1fr) auto; gap: 20px; align-items: center; width: min(100% - 48px, 760px); margin: 24px auto 90px; padding: 14px; text-decoration: none; color: var(--ink); background: var(--bone); transition: transform 0.5s var(--ease); }
.v2-next:hover { transform: translateY(-4px); }
.v2-next img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.v2-next small { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--terracotta); margin-bottom: 6px; }
.v2-next strong { font-family: var(--serif); font-weight: 400; font-size: clamp(20px, 2vw, 28px); line-height: 1.1; }
.v2-next i { font-style: normal; font-size: 24px; padding-right: 10px; }
@media (max-width: 600px) { .v2-next { grid-template-columns: 96px minmax(0, 1fr); } .v2-next i { display: none; } }

/* ================= project records ================= */
.site-v2 .detail-hero h1 { font-size: clamp(48px, 7vw, 112px); }
/* Release intrinsic HTML heights so responsive widths/aspect ratios govern the photos. */
.site-v2 .detail-hero-image img, .site-v2 .detail-gallery img { height: auto; }
.site-v2 .detail-facts strong { font-family: var(--serif); font-weight: 400; font-size: clamp(20px, 2vw, 28px); }
.site-v2 .detail-gallery figure { overflow: hidden; }
.v2-zoomable { cursor: zoom-in; transition: transform 1.2s var(--ease); }
.v2-zoomable:hover { transform: scale(1.03); }
.v2-lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(12, 11, 10, 0.96); color: #fff; }
.v2-lightbox[open] { display: grid; place-items: center; animation: v2-fade 0.35s var(--ease); }
.v2-lightbox::backdrop { background: transparent; }
@keyframes v2-fade { from { opacity: 0; } }
.v2-lightbox img { max-width: min(92vw, 1600px); max-height: 80dvh; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.v2-lightbox-cap { position: absolute; left: 24px; right: 120px; bottom: 22px; margin: 0; font-size: 14px; color: rgba(255, 255, 255, 0.78); }
.v2-lightbox-count { position: absolute; right: 24px; bottom: 22px; font-size: 13px; letter-spacing: 0.1em; color: rgba(255, 255, 255, 0.7); }
.v2-lightbox button { position: absolute; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.08); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.v2-lightbox button:hover { background: rgba(255, 255, 255, 0.2); }
.v2-lightbox-close { top: 18px; right: 18px; }
.v2-lightbox-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.v2-lightbox-next { right: 18px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) { .v2-lightbox-prev, .v2-lightbox-next { top: auto; bottom: 64px; transform: none; } }

/* ================= material records ================= */
.site-v2 .v2-3d { gap: 8px; background: var(--terracotta); border-color: var(--terracotta); color: #fff; }
.site-v2 .v2-3d:hover { background: #fff; color: var(--ink); border-color: #fff; }
.v2-has-loupe { position: relative; cursor: crosshair; }
.v2-loupe { position: absolute; z-index: 3; left: 0; top: 0; width: 180px; height: 180px; border-radius: 50%; pointer-events: none; background-repeat: no-repeat;
  box-shadow: 0 0 0 3px #fff, 0 20px 40px -10px rgba(0, 0, 0, 0.5); opacity: 0; transform: translate(calc(var(--lx, 0px) - 90px), calc(var(--ly, 0px) - 90px)) scale(0.6); transition: opacity 0.25s, transform 0.25s var(--ease); }
.v2-loupe.is-on { opacity: 1; transform: translate(calc(var(--lx, 0px) - 90px), calc(var(--ly, 0px) - 90px)) scale(1); transition: opacity 0.25s, transform 0.08s linear; }
