/* Teja Mehendi - Coming Soon (v2)
   One framed viewport: a jharokha / mehrab arch in oxblood, ivory and antique gold.
   No page scroll by design (see "No-scroll rule" at the end for the last-resort fallback). */

:root {
  --oxblood-950: #2A0A10;
  --maroon-800: #4A0F18;
  --maroon-600: #7A1626;
  --ivory: #F6EBD6;
  --ivory-dim: #D9C9AC;
  --gold: #C9A24D;
  --gold-hi: #E0BC68;
  --olive: #5C6B3A;
  --olive-lt: #A3B06E;
  --line: rgba(201, 162, 77, .55);

  --ease-out: cubic-bezier(.22, .8, .24, 1);
  --ease-inout: cubic-bezier(.65, 0, .35, 1);

  --display: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --ui: "Jost", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;

  --bi: clamp(6px, 1vw, 14px);                 /* border inset */
  --px: clamp(10px, 2.4vw, 36px);              /* inner horizontal padding */
  --toran-h: clamp(36px, 7.4vh, 84px);
  --tsw: 1.5;                                  /* toran stroke (user units) */

  --fs-h1: clamp(1.9rem, 3vw + 4vh, 4.4rem);
  --fs-tag: clamp(1rem, 1vw + 1.6vh, 1.6rem);
  --fs-eye: clamp(.68rem, .5vw + .9vh, 1rem);
  --fs-body: clamp(.8rem, .45vw + 1.2vh, 1.2rem);
  --fs-rib: clamp(.62rem, .35vw + .9vh, .85rem);
  --fs-lead: clamp(1.05rem, 1.1vw + 1.7vh, 2.2rem);
  --gap: clamp(4px, 1.2vh, 14px);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html, body {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;               /* single screen: no scrollbars */
  background: var(--oxblood-950);
}

body {
  color: var(--ivory);
  font-family: var(--ui);
  font-size: var(--fs-body);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
ul { list-style: none; padding: 0; }
a { color: inherit; }

.sr {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

a:focus-visible {
  outline: 2px solid var(--gold-hi);
  outline-offset: 3px;
}

/* ---------- shared line-work primitives (class-only so they apply inside <use>) ---------- */
.dp { stroke-dasharray: 1; }                       /* every path carries pathLength="1" */
.fg { fill: var(--gold); stroke: none; }
.fo { fill: var(--olive); stroke: var(--olive-lt); }
.pf { fill: rgba(201, 162, 77, .12); }
.ring { fill: none; }

/* ---------- frame ---------- */
.frame {
  position: relative;
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: var(--toran-h) minmax(0, 1fr) auto;
  row-gap: var(--gap);
  padding: calc(var(--bi) + 6px) calc(var(--bi) + 6px + var(--px)) calc(var(--bi) + 4px);
  overflow: hidden;
  isolation: isolate;
}
.frame::before {                                    /* the field: flat oxblood + a faint warm light behind the arch */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 50% at 50% 45%, rgba(122, 22, 38, .5), transparent 100%),
    radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(0, 0, 0, .28) 100%);
  animation: field .6s var(--ease-out) both;
}

/* ---------- page border + corners ---------- */
.edge { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.edge span { display: contents; }
.edge .o { --o: var(--bi); }
.edge .n { --o: calc(var(--bi) + 5px); }
.edge i { position: absolute; background: var(--line); }
.edge .t { top: var(--o); left: var(--o); right: var(--o); height: 1px; transform-origin: 0 50%; animation: sx .8s var(--ease-inout) .15s both; }
.edge .r { top: var(--o); right: var(--o); bottom: var(--o); width: 1px; transform-origin: 50% 0; animation: sy .8s var(--ease-inout) .4s both; }
.edge .b { bottom: var(--o); left: var(--o); right: var(--o); height: 1px; transform-origin: 100% 50%; animation: sx .8s var(--ease-inout) .65s both; }
.edge .l { top: var(--o); left: var(--o); bottom: var(--o); width: 1px; transform-origin: 50% 100%; animation: sy .8s var(--ease-inout) .9s both; }
.edge .n .t { animation-delay: .25s; }
.edge .n .r { animation-delay: .5s; }
.edge .n .b { animation-delay: .75s; }
.edge .n .l { animation-delay: 1s; }

.cn {
  --cn: clamp(34px, 6.4vmin, 76px);
  --c0: calc(var(--bi) + 5px);
  position: absolute;
  width: var(--cn);
  height: var(--cn);
  overflow: visible;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.3;
  stroke-linecap: round;
  animation: fade .9s var(--ease-out) 1s both;
}
.cn use { animation: draw 1.2s var(--ease-inout) 1s both; }
.cn--tl { top: var(--c0); left: var(--c0); }
.cn--tr { top: var(--c0); right: var(--c0); transform: scaleX(-1); }
.cn--bl { bottom: var(--c0); left: var(--c0); transform: scaleY(-1); }
.cn--br { bottom: var(--c0); right: var(--c0); transform: scale(-1, -1); }

/* ---------- toran ---------- */
.toran {
  position: relative;
  z-index: 0;
  height: var(--toran-h);
  margin-inline: calc(var(--px) * -1);
  overflow: hidden;
}
.toran__row { display: flex; justify-content: center; width: 100%; height: 100%; }
.tu {
  flex: none;
  height: var(--toran-h);
  width: calc(var(--toran-h) * 1.2);
  overflow: visible;
  fill: none;
  stroke: var(--gold);
  stroke-width: var(--tsw);
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: draw .9s var(--ease-inout) calc(.4s + var(--i) * 70ms) both;
}
.pd { animation: drop .6s var(--ease-out) calc(.8s + var(--i) * 70ms) both; }
.sw { transform-origin: 60px 24px; animation: sway 7s var(--ease-inout) calc(3s + var(--i) * 250ms) infinite; }

/* ---------- stage (stacked layout by default) ---------- */
.stage {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  row-gap: var(--gap);
  align-items: center;
  justify-items: center;
  text-align: center;
}
.stage > main { display: contents; }

/* intro */
.intro { display: grid; justify-items: center; row-gap: calc(var(--gap) * .6); }
.logo {
  width: clamp(54px, 10.5vh, 124px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--ivory);
  box-shadow: 0 0 0 1.5px var(--gold), 0 0 0 6px var(--oxblood-950), 0 0 0 7px var(--line);
  margin-block: 7px;
  animation: pop .7s var(--ease-out) 1.3s both;
}
.logo img { width: 100%; height: 100%; border-radius: 50%; filter: brightness(.94); }
.intro__txt { display: grid; justify-items: center; row-gap: calc(var(--gap) * .4); }
h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--fs-h1);
  line-height: 1;
  letter-spacing: .01em;
  color: var(--ivory);
  animation: up .7s var(--ease-out) 1.5s both;
}
.tagline {
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: var(--fs-tag);
  line-height: 1.1;
  color: var(--gold-hi);
  animation: up .7s var(--ease-out) 1.62s both;
}
.soon {
  display: inline-flex;
  align-items: center;
  gap: .9em;
  margin-top: calc(var(--gap) * .5);
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--fs-eye);
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--gold);
  animation: settle .8s var(--ease-out) 1.9s both;
}
.soon { white-space: nowrap; }
.soon span { margin-right: -.32em; }               /* optically cancel trailing tracking */
.soon::before, .soon::after {
  content: "";
  flex: 0 1 clamp(18px, 5vw, 56px);
  min-width: 8px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.soon::after { background: linear-gradient(270deg, transparent, var(--gold)); }

/* arch cell: a size container so the arch always fits the leftover space */
.arch-cell {
  --u: min(calc(100cqw / 141), calc(100cqh / 120));     /* px per arch unit */
  container-type: size;
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
}
.halo, .arch {
  position: absolute;
  left: 50%;
  top: 50%;
}
.halo {
  width: calc(var(--u) * 150);
  height: calc(var(--u) * 150);
  margin: calc(var(--u) * -75) 0 0 calc(var(--u) * -75);
  -webkit-mask-image: radial-gradient(circle, #000 52%, transparent 70%);
          mask-image: radial-gradient(circle, #000 52%, transparent 70%);
  pointer-events: none;
}
.mandala {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--gold);
  stroke-width: .5;
  stroke-linecap: round;
  opacity: .42;
  animation: fade-m 1.2s var(--ease-inout) .7s both, spin 120s linear 3s infinite;
}
.mandala use { animation: draw 1.2s var(--ease-inout) calc(.7s + var(--k) * 40ms) both; }
.arch {
  /* arch box is 125 x 100 units, centred in the cell; finial/outer line live in the SVG overlay */
  width: calc(var(--u) * 125);
  height: calc(var(--u) * 100);
  margin: calc(var(--u) * -40) 0 0 calc(var(--u) * -62.5);
}
.arch__photo {
  position: absolute;
  inset: 0;
  overflow: hidden;
  clip-path: url(#arch-clip);
  background: var(--maroon-800);
  box-shadow: inset 0 0 40px rgba(42, 10, 16, .5);
}
.arch__photo picture, .arch__photo img { display: block; width: 100%; height: 100%; }
.arch__photo img {
  object-fit: cover;
  object-position: 50% 50%;
  animation: settle-img 1.1s var(--ease-out) .9s both;
  transition: transform .6s var(--ease-out);
}
.arch__veil {
  position: absolute;
  inset: -1px;
  background: var(--maroon-800);
  transform-origin: 50% 0;
  animation: curtain 1.1s var(--ease-out) .9s both;
}
.arch__line {
  position: absolute;
  max-width: none;
  left: calc(var(--u) * -8);
  top: calc(var(--u) * -20);
  width: calc(var(--u) * 141);
  height: calc(var(--u) * 120);
  overflow: visible;
  fill: none;
  stroke: var(--gold);
  stroke-width: .5;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.ln-out { animation: draw 1.4s var(--ease-inout) .15s both; }
.ln-in  { animation: draw 1.2s var(--ease-inout) .5s both; stroke-width: .35; opacity: .8; }
.ln-fin { animation: fade .8s var(--ease-out) 1.1s both; }
.ln-fin .dp { animation: draw 1s var(--ease-inout) 1.1s both; }
.shine {
  stroke: var(--gold-hi);
  stroke-width: 1.1;
  stroke-dasharray: .09 .91;
  stroke-dashoffset: -1;
  opacity: 0;
  animation: shine 7s var(--ease-inout) 3s infinite;
}
@media (hover: hover) and (pointer: fine) {
  .arch-cell:hover .arch__photo img { transform: scale(1.03); }
  .arch-cell:hover .ln-out { stroke: var(--gold-hi); }
}
.ln-out { transition: stroke .3s var(--ease-out); }

/* products */
.products { display: grid; justify-items: center; row-gap: calc(var(--gap) * .8); max-width: 100%; }
.eyebrow {
  font-family: var(--ui);
  font-weight: 500;
  font-size: var(--fs-eye);
  letter-spacing: .2em;
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--gold);
  animation: up .6s var(--ease-out) 2.1s both;
}
.lead {
  text-wrap: balance;
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: var(--fs-lead);
  line-height: 1.12;
  color: var(--ivory);
  animation: up .6s var(--ease-out) 2.2s both;
}
.points {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .15em 0;
  font-size: var(--fs-body);
  color: var(--ivory);
}
.points li { animation: up .6s var(--ease-out) both; }
.points li:nth-child(1) { animation-delay: 2.3s; }
.points li:nth-child(2) { animation-delay: 2.41s; }
.points li:nth-child(3) { animation-delay: 2.52s; }
.points li:nth-child(4) { animation-delay: 2.63s; }
.points li + li::before, .lz {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--gold);
  transform: rotate(45deg);
  vertical-align: middle;
}
.points li + li::before { margin: 0 .85em; }
.cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 clamp(1.4rem, 2vw, 2.2rem);
  font-family: var(--ui);
  font-weight: 500;
  font-size: clamp(.74rem, .3vw + .8vh, .9rem);
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ivory);
  border: 1px solid var(--gold);
  box-shadow: inset 0 0 0 3px var(--oxblood-950), inset 0 0 0 4px var(--line);
  transition: background-color .2s var(--ease-out), color .2s var(--ease-out);
  animation: up .6s var(--ease-out) 2.72s both;
}
.cta:hover { background: var(--gold-hi); color: var(--oxblood-950); }
.cta:active { opacity: .85; }

.ico { flex: none; width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; color: var(--gold); transition: color .2s var(--ease-out); }
.cta { gap: .6em; }
.cta .ico { color: inherit; width: 1.3em; height: 1.3em; }

/* ---------- footer: services ribbon + contact ---------- */
.foot { display: grid; justify-items: center; row-gap: 0; animation: up .6s var(--ease-out) 2.8s both; }
.ribbon {
  width: 100%;
  border-block: 1px solid var(--line);
  padding-block: .55em;
  overflow: hidden;
}
.ribbon__track { display: flex; justify-content: center; }
.ribbon__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: .2em 0;
  font-weight: 500;
  font-size: var(--fs-rib);
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--gold);
  text-align: center;
}
.ribbon__list li + li::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 1em;
  background: var(--gold);
  transform: rotate(45deg);
  vertical-align: middle;
}
.ribbon__list--dup { display: none; }
.contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  column-gap: clamp(.9em, 2vw, 2em);
  font-size: var(--fs-body);
  letter-spacing: .04em;
}
.lnk {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .5em;
  min-height: 44px;
  text-decoration: none;
  color: var(--ivory);
}
.lnk__k { font-size: .78em; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.lnk::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 9px;
  height: 1px;
  background: var(--gold-hi);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .25s var(--ease-out);
}
.lnk:hover::after, .lnk:focus-visible::after { transform: scaleX(1); }
.lnk:hover { color: var(--gold-hi); }
.lnk:hover .ico, .lnk:focus-visible .ico { color: var(--gold-hi); }
.lnk::after { left: calc(1.2em + .5em); }
.lnk:active { opacity: .85; }

@media (max-width: 419px) {
  .contact { column-gap: .7em; letter-spacing: .01em; font-size: min(var(--fs-body), .8rem); }
  .lnk { gap: .35em; }
}

/* ---------- wide: three-zone triptych ---------- */
@media (min-width: 700px) and (min-aspect-ratio: 1/1) {
  :root { --toran-h: clamp(34px, 9vh, 92px); }
  h1 { font-size: min(var(--fs-h1), 4.1vw); }
  .stage {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    column-gap: clamp(8px, 2vw, 32px);
  }
  .logo { width: clamp(64px, 16vh, 176px); }
  .intro__txt { row-gap: calc(var(--gap) * .6); }
  .products { row-gap: var(--gap); }
  .points { flex-direction: column; align-items: center; row-gap: .45em; }
  .points li + li::before { display: block; margin: 0 auto .55em; }
  .lead { max-width: 15em; }
  .lead::after { content: ""; display: block; width: 72px; height: 1px; margin: calc(var(--gap) * 1.1) auto 0; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
  .eyebrow { letter-spacing: .14em; text-wrap: balance; }
  .ribbon__list { font-size: clamp(.58rem, .5vw + .7vh, .82rem); letter-spacing: .12em; }
}

/* ---------- tablet portrait: intro goes horizontal ---------- */
@media (min-width: 600px) and (max-aspect-ratio: 1/1) {
  .intro { grid-auto-flow: column; column-gap: clamp(14px, 3vw, 28px); align-items: center; }
  .intro__txt { justify-items: start; text-align: left; }
  .logo { width: clamp(70px, 10vh, 132px); }
  .points { max-width: 34em; }
}

/* ---------- phones, limited height: logo sits beside the wordmark ---------- */
@media (max-width: 599px) and (max-height: 760px) {
  .intro { grid-auto-flow: column; column-gap: 14px; align-items: center; }
  .logo { width: clamp(50px, 9.4vh, 66px); }
  .intro__txt { justify-items: center; }
}

/* ---------- short viewports: shrink in priority order (toran, logo, arch, eyebrow, points) ---------- */
@media (max-height: 740px) {
  :root { --toran-h: clamp(34px, 6.6vh, 84px); --tsw: 2; }
}
@media (max-height: 700px) and (max-aspect-ratio: 1/1) {
  .lead, .eyebrow { display: none; }
}
@media (max-height: 600px) and (max-aspect-ratio: 1/1) {
  .logo { display: none; }
}
@media (max-height: 520px) {
  .logo { width: 14vh; }
  .soon { display: none; }
  :root { --toran-h: clamp(20px, 5vh, 40px); --tsw: 3; }
}
@media (max-height: 470px) {
  .eyebrow { display: none; }
}
@media (max-height: 430px) {
  .points li:nth-child(2), .points li:nth-child(3) { display: none; }
  .points li:nth-child(4)::before { display: none !important; }
}

/* ---------- phones: ribbon marquee only where height is critical ---------- */
@media (max-width: 599px) and (max-height: 699px) {
  .ribbon__track { justify-content: flex-start; width: max-content; animation: marquee 40s linear 3s infinite; }
  .ribbon__list { flex-wrap: nowrap; white-space: nowrap; }
  .ribbon__list--dup { display: flex; }
  .ribbon__list li:first-child::before {
    content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 1em;
    background: var(--gold); transform: rotate(45deg); vertical-align: middle;
  }
  .ribbon__track:hover { animation-play-state: paused; }
}

/* ---------- keyframes (transform / opacity; stroke-dashoffset for line-draw) ---------- */
@keyframes field   { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade    { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-m  { from { opacity: 0; } to { opacity: .42; } }
@keyframes draw    { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes sx      { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes sy      { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes up      { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes drop    { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
@keyframes pop     { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
@keyframes settle  { from { opacity: 0; transform: scale(1.1); } to { opacity: 1; transform: none; } }
@keyframes settle-img { from { transform: scale(1.06); } to { transform: none; } }
@keyframes curtain { from { transform: scaleY(1); } to { transform: scaleY(0); } }
@keyframes spin    { to { transform: rotate(360deg); } }
@keyframes sway    { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(1.5deg); } 75% { transform: rotate(-1.5deg); } }
@keyframes shine {
  0%   { stroke-dashoffset: .09; opacity: 0; }
  6%   { opacity: 1; }
  58%  { stroke-dashoffset: -1; opacity: 1; }
  64%, 100% { stroke-dashoffset: -1; opacity: 0; }
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* hold the intro until fonts and the product image are ready (JS adds .is-ready; 1.2s fallback) */
.js:not(.is-ready) *,
.js:not(.is-ready) *::before,
.js:not(.is-ready) *::after { animation-play-state: paused !important; }
.is-paused *, .is-paused *::before, .is-paused *::after { animation-play-state: paused !important; }

/* ---------- reduced motion: final state at once, one soft fade ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .frame { animation: fade .3s ease-out both !important; }
  .arch__veil, .shine { display: none; }
  .arch__photo img { transform: none !important; }
  .ribbon__track { width: auto; justify-content: center; transform: none; }
  .ribbon__list--dup { display: none !important; }
  .ribbon__list { flex-wrap: wrap; white-space: normal; }
  .ribbon__list li:first-child::before { display: none; }
}

/* ---------- no-scroll rule: last-resort fallback (extreme short height / huge zoom) ---------- */
@media (max-height: 360px), (max-width: 320px) {
  html, body { height: auto; overflow-y: auto; overflow-x: hidden; }
  .frame { height: auto; min-height: 100vh; min-height: 100dvh; grid-template-rows: var(--toran-h) auto auto; }
  .stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; }
  .arch-cell { height: 70vw; max-height: 60vh; }
}

/* narrowest phones: keep the three contact links on one line */
@media (max-width: 359px) {
  .contact { column-gap: .45em; letter-spacing: 0; font-size: .7rem; }
  .lnk { gap: .25em; }
  .ico { width: 1.1em; height: 1.1em; }
}
