/* =====================================================================
   Zero to Zen — refined design layer (home page first; the rest of the
   site follows once approved). Loaded after site.css on pages that opt in.

   Direction: the same ivory, rustic red and brass, Cormorant + Manrope —
   with more air, larger and calmer type, sentence-case labels, hairline
   detail, and one signature: line drawings (Vastu grid, mandala, chart,
   arches) that draw themselves like an architect's pen.

   Motion rules: transform / opacity / clip-path / stroke only; one or two
   moments per view; simple fades on data-saver and low-power devices
   (html.motion-lite); nothing moves for "reduce motion"; content is never
   hidden without JavaScript or if the motion script fails (html.motion-off).
   ===================================================================== */

:root {
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-mask: cubic-bezier(.7, 0, .2, 1);
  --section: clamp(84px, 10vw, 160px);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .14 0 0 0 0 .13 0 0 0 0 .12 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  interpolate-size: allow-keywords;
}

/* ---------------------------------------------------------------- ground & type */
body.page-home { background-color: var(--ivory); background-image: var(--grain); }
.page-home .band-sand { background-color: var(--sand); background-image: var(--grain); }
.page-home .band-cream { background-color: var(--cream); background-image: var(--grain); }
.page-home .gridbg { background-image: var(--grain), linear-gradient(rgba(36, 35, 33, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(36, 35, 33, .04) 1px, transparent 1px); background-size: auto, 80px 80px, 80px 80px; }

.page-home h1, .page-home h2, .page-home h3 { text-wrap: balance; }
.page-home p, .page-home li, .page-home dd { text-wrap: pretty; }
.page-home .serif { font-kerning: normal; font-variant-ligatures: common-ligatures; }
.page-home .h2 { font-size: clamp(36px, 2.6vw + 22px, 64px); line-height: 1.04; letter-spacing: -.012em; }
.page-home .h2--xs { font-size: clamp(34px, 1.6vw + 24px, 50px); }
.page-home .h2--sm { font-size: clamp(36px, 2.2vw + 22px, 58px); }
.page-home .h2--lg { font-size: clamp(36px, 2.8vw + 22px, 68px); }
.page-home .h2--xl { font-size: clamp(38px, 3.2vw + 22px, 74px); line-height: 1.02; }
.page-home .h2--xxl { font-size: clamp(42px, 3.6vw + 22px, 84px); line-height: .99; letter-spacing: -.018em; }
.page-home .h3 { font-size: clamp(27px, .8vw + 20px, 34px); }
.page-home .body, .page-home .body-lg { max-width: 38em; }
.page-home .section { padding-block: var(--section); }

/* A quiet label: sentence case, a short brass rule. */
.kicker { display: inline-flex; align-items: center; gap: 14px; margin: 0; font: 600 13.5px/1.4 var(--sans); letter-spacing: .02em; color: var(--rust); }
.kicker::before { content: ''; width: 28px; height: 1px; background: var(--brass); flex-shrink: 0; }
.kicker--plain::before { display: none; }
.kicker--light { color: var(--cream); }
.kicker--light::before { background: rgba(239, 229, 213, .55); }

/* Text link: an underline that redraws on hover, an arrow that leans forward. */
.tlink { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font: 600 14.5px/1.3 var(--sans); color: var(--ink); }
.tlink span { background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; padding-bottom: 3px; }
.tlink .arr { color: var(--rust); transition: transform .5s var(--ease-out); }
.tlink:hover { color: var(--rust); }
.tlink:hover span { animation: zUnderline .7s var(--ease-out); }
.tlink:hover .arr { transform: translateX(5px); }
@keyframes zUnderline { 0% { background-size: 100% 1px; background-position: 100% 100%; } 45% { background-size: 0 1px; background-position: 100% 100%; } 46% { background-size: 0 1px; background-position: 0 100%; } 100% { background-size: 100% 1px; background-position: 0 100%; } }

/* Buttons: a darker fill sweeps across on hover; a slight press on click. */
.page-home .btn { position: relative; isolation: isolate; overflow: hidden; letter-spacing: .01em; transition: color .45s var(--ease-out), border-color .45s var(--ease-out), background-color .45s var(--ease-out), transform .15s ease; }
.page-home .btn:active { transform: scale(.98); }
.page-home .btn--primary::before, .page-home .btn--dark::before, .page-home .btn--light::before, .page-home .btn--outline::before, .page-home .btn--ghost-light::before {
  content: ''; position: absolute; inset: 0; z-index: -1; background: var(--fill, var(--rust-deep));
  transform: scaleX(0); transform-origin: right center; transition: transform .65s var(--ease-out);
}
.page-home .btn:hover::before { transform: scaleX(1); transform-origin: left center; }
.page-home .btn--primary, .page-home .btn--primary:hover { background: var(--rust); color: var(--ivory); --fill: var(--rust-deep); }
.page-home .btn--dark, .page-home .btn--dark:hover { background: var(--ink); color: var(--ivory); --fill: #0f0e0d; }
.page-home .btn--light, .page-home .btn--light:hover { background: var(--ivory); color: var(--rust-deep); --fill: var(--cream); }
.page-home .btn--outline { --fill: var(--ink); }
.page-home .btn--outline:hover { border-color: var(--ink); color: var(--ivory); }
.page-home .btn--ghost-light { --fill: rgba(253, 252, 249, .12); }
.page-home .btn .arr { transition: transform .5s var(--ease-out); }

/* Header: calm at the top; steps aside while reading down, returns when scrolling up. */
.page-home .site-header { transition: transform .55s var(--ease-out), box-shadow .45s ease, background-color .45s ease; }
.page-home .site-header.is-scrolled { background: rgba(253, 252, 249, .92); box-shadow: 0 12px 32px -26px rgba(36, 35, 33, .4); }
.page-home .site-header.is-hidden { transform: translate3d(0, -100%, 0); box-shadow: none; }

/* ---------------------------------------------------------------- hero
   The hero ("Living Vastu Architecture") has its own stylesheet: css/hero.css.
   Shared entrance keyframes — hidden states live only inside the keyframes,
   so with "reduce motion" (animations off) everything is simply in place. */
@keyframes zRise { from { opacity: 0; transform: translate3d(0, 26px, 0); } to { opacity: 1; transform: none; } }
@keyframes zLine { from { transform: translate3d(0, 118%, 0); } to { transform: none; } }
@keyframes zFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes zMaskUp { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes zSettle { from { transform: scale(1.07); } to { transform: none; } }
@keyframes zDraw { from { stroke-dasharray: 1; stroke-dashoffset: 1; } to { stroke-dasharray: 1; stroke-dashoffset: 0; } }
@keyframes zRuleX { from { transform: scaleX(0); } to { transform: none; } }
@keyframes zArch { from { opacity: 0; transform: translate3d(0, 22px, 0); } to { opacity: 1; transform: none; } }
@keyframes zRingIn { from { opacity: 0; transform: rotate(-14deg) scale(.97); } to { opacity: .6; transform: none; } }


/* ---------------------------------------------------------------- scroll reveals
   motion.js marks elements .is-in as they come into view. */
@media (prefers-reduced-motion: no-preference) {
  .js:not(.motion-off) [data-anim=''] {
    opacity: 0; transform: translate3d(0, 34px, 0);
    transition: opacity 1s var(--ease-out), transform 1.15s var(--ease-out);
    transition-delay: calc(var(--i, 0) * 90ms + var(--delay, 0ms));
  }
  .js:not(.motion-off) [data-anim=''].is-in { opacity: 1; transform: none; }

  /* Headings: unveiled from below while rising. */
  .js:not(.motion-off) [data-anim='mask'] {
    opacity: 0; clip-path: inset(100% -10% 0 -10%); transform: translate3d(0, .32em, 0);
    transition: clip-path 1.2s var(--ease-out), transform 1.2s var(--ease-out), opacity .6s ease;
    transition-delay: var(--delay, 0ms);
  }
  .js:not(.motion-off) [data-anim='mask'].is-in { opacity: 1; clip-path: inset(-25% -10% -25% -10%); transform: none; }

  /* Portraits: unveiled upwards, settling from a slight zoom. */
  .js:not(.motion-off) [data-anim='image'] { clip-path: inset(100% -60% 0 -60%); transition: clip-path 1.5s var(--ease-mask); }
  .js:not(.motion-off) [data-anim='image'] img { transform: scale(1.08); transform-origin: 50% 100%; transition: transform 2s var(--ease-out); }
  .js:not(.motion-off) [data-anim='image'].is-in { clip-path: inset(-60% -60% 0 -60%); }
  .js:not(.motion-off) [data-anim='image'].is-in img { transform: none; }

  /* Hairline drawn from the left. */
  .js:not(.motion-off) [data-anim='rule'] { transform: scaleX(0); transform-origin: left center; transition: transform 1.5s var(--ease-out); }
  .js:not(.motion-off) [data-anim='rule'].is-in { transform: none; }

  /* Line art draws itself: strokes first, then details. */
  .js:not(.motion-off):not(.motion-lite) [data-anim='draw'] .draw { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.9s var(--ease-in-out); transition-delay: calc(var(--d, 0) * 1ms); }
  .js:not(.motion-off):not(.motion-lite) [data-anim='draw'].is-in .draw { stroke-dashoffset: 0; }
  .js:not(.motion-off) [data-anim='draw'] .fade { opacity: 0; transition: opacity .9s ease; transition-delay: calc(var(--d, 0) * 1ms); }
  .js:not(.motion-off) [data-anim='draw'].is-in .fade { opacity: 1; }
  .js:not(.motion-off) [data-anim='draw'] .pop { transform: scale(0); transform-box: fill-box; transform-origin: center; transition: transform .7s cubic-bezier(.34, 1.56, .64, 1); transition-delay: calc(var(--d, 0) * 1ms); }
  .js:not(.motion-off) [data-anim='draw'].is-in .pop { transform: none; }

  /* Tarot: the side cards fan out from behind the centre card. */
  .js:not(.motion-off) [data-anim='fan'] .card-l, .js:not(.motion-off) [data-anim='fan'] .card-r { transform: rotate(0deg) translate(0, 0); transition: transform 1.3s var(--ease-out) .25s; }
  .js:not(.motion-off) [data-anim='fan'] .card-c { transform: translate(0, 14px); opacity: 0; transition: transform 1s var(--ease-out), opacity .7s ease; }
  .js:not(.motion-off) [data-anim='fan'].is-in .card-l { transform: rotate(-9deg); }
  .js:not(.motion-off) [data-anim='fan'].is-in .card-r { transform: rotate(9deg); }
  .js:not(.motion-off) [data-anim='fan'].is-in .card-c { transform: none; opacity: 1; }

  /* Lo Shu square: the numbers appear in counting order, 1 to 9. */
  .js:not(.motion-off) [data-anim='seq'] .magic span { opacity: 0; transform: translate3d(0, 10px, 0); transition: opacity .6s ease, transform .8s var(--ease-out); transition-delay: calc(var(--o, 0) * 110ms); }
  .js:not(.motion-off) [data-anim='seq'].is-in .magic span { opacity: 1; transform: none; }

  /* Low-power / data-saver: no clipping or drawing — just a soft fade. */
  .motion-lite [data-anim=''], .motion-lite [data-anim='mask'] { transform: none !important; clip-path: none !important; }
  .motion-lite [data-anim='image'] { clip-path: none !important; opacity: 0; transition: opacity 1s ease; }
  .motion-lite [data-anim='image'].is-in { opacity: 1; }
  .motion-lite [data-anim='image'] img { transform: none !important; }
}
/* Cards that already have their own reveal (site.js) don't animate twice inside a revealed wrapper. */
.page-home [data-anim] .reveal { opacity: 1; transform: none; transition: none; }

/* Tarot cards: final (resting) positions, used when nothing animates. */
.art-tarot .card-l { transform-box: view-box; transform-origin: 126px 190px; transform: rotate(-9deg); }
.art-tarot .card-r { transform-box: view-box; transform-origin: 250px 198px; transform: rotate(9deg); }

/* Scroll-linked depth (where the browser supports it; desktop; never with reduce motion or on low-power devices). */
@supports (animation-timeline: view()) {
  @media (min-width: 900px) and (prefers-reduced-motion: no-preference) {
    html:not(.motion-lite) .page-home .drift { animation: zDrift linear both; animation-timeline: view(); animation-range: cover; }
    html:not(.motion-lite) .page-home .cta-band__art { animation: zTurn linear both; animation-timeline: view(); animation-range: cover; }
  }
}
@keyframes zDrift { from { translate: 0 -26px; } to { translate: 0 26px; } }
@keyframes zTurn { from { rotate: -12deg; } to { rotate: 12deg; } }

/* ---------------------------------------------------------------- the practice */
.page-home .split-head > div:first-child { padding-top: 20px; }
.page-home .pillar { gap: 16px; }
.page-home .pillar__t { font-family: var(--serif); font-size: clamp(24px, .5vw + 20px, 28px); font-weight: 500; line-height: 1.1; color: var(--ink); }

/* ---------------------------------------------------------------- services: a ruled grid, like a plan */
.page-home .svc-grid { gap: 0; border-top: 1px solid var(--hair-2); border-left: 1px solid var(--hair-2); }
.page-home .svc { min-height: 312px; padding: 34px 32px 30px; gap: 26px; border: 0; border-right: 1px solid var(--hair-2); border-bottom: 1px solid var(--hair-2); background: var(--ivory); color: var(--ink); overflow: hidden; transition: background-color .55s var(--ease-out); }
.page-home .svc::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--rust); transform: scaleX(0); transform-origin: left center; transition: transform .75s var(--ease-out); }
/* (keeps the hover background smooth alongside the reveal) */
.js .page-home .svc[data-anim] { transition: opacity 1s var(--ease-out) calc(var(--i, 0) * 90ms), transform 1.15s var(--ease-out) calc(var(--i, 0) * 90ms), background-color .55s var(--ease-out) 0s; }
.page-home .svc:hover { background-color: #fff; color: var(--ink); }
.page-home .svc:hover::before { transform: scaleX(1); }
.page-home .svc__icon { width: 56px; height: 56px; border: 1px solid var(--line-3); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--rust); transition: transform .8s var(--ease-out), border-color .5s ease; }
.page-home .svc:hover .svc__icon { transform: rotate(-10deg); border-color: var(--rust); }
.page-home .svc { justify-content: flex-start; }
.page-home .svc__body { gap: 12px; }
.page-home .svc__more { margin-top: auto; }
.page-home .svc__title { font-size: clamp(26px, .7vw + 19px, 31px); line-height: 1.08; transition: transform .7s var(--ease-out); }
.page-home .svc:hover .svc__title { transform: translateX(5px); }
.page-home .svc__sum { max-width: 30ch; }
.page-home .svc__more { gap: 10px; padding-top: 0; font: 600 13.5px/1.2 var(--sans); letter-spacing: .01em; color: var(--rust); }
.page-home .svc__more .arr { transition: transform .5s var(--ease-out); }
.page-home .svc:hover .svc__more .arr { transform: translateX(5px); }
.page-home .unsure { background: var(--ivory); }

/* ---------------------------------------------------------------- Vastu */
.page-home .mandala__box { background-color: var(--sand); background-image: var(--grain); }

/* ---------------------------------------------------------------- portraits */
.page-home .portrait__img { position: absolute; inset: 0; }
.page-home .portrait--frame .portrait__img { z-index: 1; }
/* The base line overhangs the frame by 5%, but never past the page margin (on phones 5% is wider than the margin). */
.page-home .portrait__base { left: max(-5%, calc(4px - var(--gutter))); right: max(-5%, calc(4px - var(--gutter))); }
.page-home .facts dt { font-size: 13px; letter-spacing: .01em; font-weight: 600; color: var(--soft); }
.page-home .facts dd { font-size: 18px; }

/* ---------------------------------------------------------------- life + space */
.page-home .ls__bracket span { font-size: 13px; letter-spacing: .01em; font-weight: 600; }
.page-home .ls__label { font-size: 15px; letter-spacing: .01em; font-weight: 700; }
.page-home .ls__legend { font-size: 13px; letter-spacing: .01em; font-weight: 600; }

/* ---------------------------------------------------------------- process */
.page-home .process-wrap { position: relative; }
.page-home .process__rule { display: block; height: 1px; background: var(--ink); }
.page-home .process { border-top: 0; }
.page-home .process__n { font-size: clamp(56px, 2vw + 40px, 76px); font-style: italic; font-weight: 400; font-feature-settings: 'onum'; }

/* ---------------------------------------------------------------- principles */
.page-home .principle__t { font-family: var(--serif); font-size: clamp(25px, .5vw + 21px, 29px); font-weight: 500; line-height: 1.1; color: var(--ink); }
.page-home .principle > div { gap: 12px; }

/* ---------------------------------------------------------------- shop & insights */
.page-home .pcard__links { font-size: 13.5px; letter-spacing: .01em; font-weight: 600; }
.page-home .pcard__links .linkbtn { font-size: 13.5px; letter-spacing: .01em; font-weight: 600; }
/* "View" / "Add to cart" are small words: give each a 44px-tall tap area without changing the layout. */
.page-home .pcard__links a, .page-home .pcard__links .linkbtn { position: relative; }
.page-home .pcard__links a::after, .page-home .pcard__links .linkbtn::after { content: ''; position: absolute; inset: -11px -7px; }
.page-home .teaser-item, .page-home .insight-item { display: flex; min-width: 0; }
.page-home .teaser-item > *, .page-home .insight-item > * { flex: 1; min-width: 0; }
.page-home .insight-item .eyebrow--sm { text-transform: none; letter-spacing: .01em; font-size: 13px; font-weight: 600; }
.page-home .insights-more .kicker { width: 140px; flex-shrink: 0; }
.page-home .ph { transition: transform 1.6s var(--ease-out); }

/* ---------------------------------------------------------------- FAQ: answers open smoothly */
.page-home .faq__item summary { justify-content: space-between; gap: 24px; font-size: 18.5px; }
.page-home .faq__icon { position: relative; width: 16px; height: 16px; flex-shrink: 0; align-self: center; color: var(--rust); }
.page-home .faq__icon::before, .page-home .faq__icon::after { content: ''; position: absolute; left: 0; top: 50%; width: 100%; height: 1.25px; margin-top: -.6px; background: currentColor; transition: transform .5s var(--ease-out); }
.page-home .faq__icon::after { transform: rotate(90deg); }
.page-home .faq__item[open] .faq__icon::after { transform: rotate(0deg); }
.page-home .faq__a p { padding: 0 56px 30px 0; font-size: 16px; line-height: 1.8; color: var(--body); animation: none; max-width: 62ch; }
@supports selector(::details-content) {
  .page-home .faq__item::details-content { block-size: 0; overflow-y: clip; transition: block-size .55s var(--ease-out), content-visibility .55s allow-discrete; }
  .page-home .faq__item[open]::details-content { block-size: auto; }
}

/* ---------------------------------------------------------------- final CTA */
.page-home .cta-band { background-color: var(--rust); background-image: var(--grain); padding-block: clamp(84px, 9vw, 144px); }
.page-home .cta-band__art-wrap { position: absolute; inset: 0; pointer-events: none; }
.page-home .cta-band__title { font-size: clamp(44px, 3.6vw + 24px, 92px); letter-spacing: -.02em; }
.page-home .contact-rows > div > span:first-child { font-size: 13px; letter-spacing: .01em; font-weight: 600; }

/* ---------------------------------------------------------------- responsive */
/* Small laptops / large tablets: share the width between picture and text, so headings never overflow. */
@media (min-width: 1024px) and (max-width: 1279px) {
  .page-home .vastu__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .page-home .raxa__grid { grid-template-columns: minmax(0, .85fr) minmax(0, 1fr); }
  .page-home .karan__grid { grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); }
  .page-home .ticks { grid-template-columns: minmax(0, 1fr); }
  .page-home .ticks li:nth-child(even) { padding-left: 0; border-left: 0; }
}
@media (max-width: 1023px) {
  .page-home .insights-grid .insight-item--lg { grid-column: 1 / -1; }
  .page-home .split-head > div:first-child { padding-top: 0; }
}

@media (max-width: 899px) {

  /* services read as a list on phones */
  .page-home .svc-grid { border-left: 0; border-top: 1px solid var(--line-3); }
  .page-home .svc { min-height: 0; padding: 18px 0; gap: 16px; border: 0; border-bottom: 1px solid var(--line-3); background: none; }
  .page-home .svc:hover { background: none; }
  .page-home .svc::before { display: none; }
  .page-home .svc__icon { width: 44px; height: 44px; flex-shrink: 0; }
  .page-home .svc__icon .ic { width: 22px; height: 22px; }
  .page-home .svc__title { font-size: 23px; }
  .page-home .svc:hover .svc__title { transform: none; }

  .page-home .teaser-grid .teaser-item { width: 240px; flex-shrink: 0; scroll-snap-align: start; }
  .page-home .teaser-grid .pcard { width: auto; }
  .page-home .insights-more .kicker { width: auto; }
  .page-home .faq__a p { padding-right: 0; font-size: 15px; }
  .page-home .faq__item summary { font-size: 16.5px; }
}

@media (max-width: 380px) {
  .page-home .teaser-grid .teaser-item { width: 210px; }
}

@media (prefers-reduced-motion: reduce) {
  .page-home .site-header.is-hidden { transform: none; }
}

/* Printing before scrolling through the page: show every detail in its resting place. */
@media print {
  [data-anim], [data-anim] .fade, [data-anim] .pop, [data-anim] .card-c, [data-anim] .magic span { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  [data-anim] img { transform: none !important; }
  [data-anim] .draw { stroke-dasharray: none !important; }
}
