/* =========================================================
   NIRMANA STUDIO: HOME (index.html)
   Page-only styles. Every colour, radius and easing comes
   from the :root tokens in css/style.css.
   ========================================================= */

/* The marquee band is rotated and scaled past the viewport edge on purpose.
   Clip it on the x-axis only: "clip" (unlike "hidden") keeps position: sticky working. */
main { overflow-x: clip; }

/* ---------- Testimonials ----------
   main.js clones the cards for the endless loop. Two local fixes:
   - .t-card { margin: 0 } in style.css cancels the track's 22px spacing, so restore it here;
   - give the card shadows room so the edge mask does not slice them off. */
/* .testimonials has no top padding of its own; without this the heading sits ~18px under the cream services band */
.home-quotes { padding-top: clamp(70px, 9vw, 120px); padding-bottom: clamp(50px, 7vw, 100px); }
.home-quotes .t-track { padding-bottom: 80px; }
.home-quotes .t-track > .t-card { margin-right: 22px; }

/* ---------- Journey → full process ---------- */
.journey-more { flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.journey-more__hint { margin: 0; font-size: 15px; color: var(--muted); }

/* ---------- Signature projects teaser ---------- */
.home-work { padding-bottom: clamp(70px, 9vw, 120px); }
.home-work__lead { max-width: 340px; }
.home-work__grid { grid-auto-rows: clamp(340px, 34vw, 460px); gap: clamp(16px, 2vw, 26px); }
.home-work__grid .work-card { border-radius: var(--r-xl); }
.home-work__grid .work-card figcaption { border-radius: var(--r-lg); }
/* editorial stagger: the middle card sits lower (translate keeps grid rows intact) */
.home-work__grid .work-card:nth-child(2) { translate: 0 clamp(28px, 5vw, 72px); }
.work-card__link { position: absolute; inset: 0; z-index: 3; border-radius: inherit; }
.work-card__link:focus-visible { outline-offset: -8px; border-radius: var(--r-lg); }
.home-work .more-link { margin-top: clamp(70px, 10vw, 136px); }
/* keyboard focus gets the same reveal as hover (caption slides up, arrow turns copper) */
.home-work__grid .work-card:focus-within { transform: translateY(-8px); box-shadow: var(--shadow); }
.home-work__grid .work-card:focus-within figcaption { transform: none; }
.home-work__grid .work-card:focus-within .work-card__go { transform: rotate(45deg); background: var(--copper); }

/* ---------- Services snapshot: "drawing index" rows ---------- */
.home-services__wrap { position: relative; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(36px, 6vw, 96px); align-items: start; }
.home-services__aside { position: sticky; top: 118px; }
.home-services__head .lead { max-width: 420px; }
.home-services__cta { margin-top: 34px; }

.svc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }

.svc {
  --gx: calc(100% - 48px);           /* where the copper bubble is born: the arrow */
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center;
  gap: clamp(14px, 2vw, 26px); padding: 18px 20px 18px 18px;
  border-radius: var(--r-lg); background: var(--paper); color: var(--navy);
  box-shadow: var(--shadow-sm), var(--inset);
}
.svc.glow-card:hover, .svc:focus-visible { transform: translateY(-4px) scale(1.018); box-shadow: 0 34px 60px -30px rgba(142, 85, 38, .6), var(--inset); }
.svc:focus-visible { outline-offset: 5px; border-radius: var(--r-lg); }

/* copper bubble that grows out of the arrow, with a drafting ruler along its top edge */
.svc__fill {
  position: absolute; inset: 0; z-index: -2; border-radius: inherit; pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(27, 42, 58, .28) 0 1px, transparent 1px 12px) 0 0 / 100% 7px no-repeat,
    repeating-linear-gradient(90deg, rgba(27, 42, 58, .32) 0 1px, transparent 1px 60px) 0 0 / 100% 13px no-repeat,
    linear-gradient(105deg, var(--copper-2) 0%, var(--copper-2) 35%, var(--copper) 100%);
  clip-path: circle(0 at var(--gx) 50%);
  transition: clip-path .8s var(--ease);
}
.svc:hover .svc__fill, .svc:focus-visible .svc__fill { clip-path: circle(150% at var(--gx) 50%); }

/* glossy glare + navy edge that follow the cursor (vars set by main.js on .glow-card) */
.svc.glow-card::before { background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .5), transparent 62%); }
.svc.glow-card::after { background: radial-gradient(200px circle at var(--mx, 50%) var(--my, 50%), var(--navy), transparent 60%); }

/* CAD crosshair tracking the pointer */
.svc__cross { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .3s; }
.svc__cross::before, .svc__cross::after { content: ""; position: absolute; }
.svc__cross::before { top: 0; bottom: 0; left: var(--mx, 50%); width: 1px; background: repeating-linear-gradient(to bottom, rgba(27, 42, 58, .38) 0 4px, transparent 4px 8px); }
.svc__cross::after { left: 0; right: 0; top: var(--my, 50%); height: 1px; background: repeating-linear-gradient(to right, rgba(27, 42, 58, .38) 0 4px, transparent 4px 8px); }

/* number badge that flips to the service icon */
.svc__badge {
  position: relative; display: block; width: 62px; height: 62px; border-radius: 22px; overflow: hidden; flex-shrink: 0;
  background: linear-gradient(145deg, #fff, var(--cream-2));
  box-shadow: inset 0 0 0 1px rgba(194, 133, 63, .28), 0 10px 20px -12px rgba(194, 133, 63, .55);
  transition: background .4s, box-shadow .4s, transform .6s var(--spring);
}
.svc__num, .svc__badge svg { position: absolute; inset: 0; margin: auto; transition: transform .55s var(--spring), opacity .3s; }
.svc__num { display: grid; place-items: center; font-size: 15px; font-weight: 500; color: var(--copper-d); }
.svc__badge svg { width: 30px; height: 30px; fill: none; stroke: var(--copper-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transform: translateY(170%) rotate(-25deg); }
.svc:hover .svc__badge, .svc:focus-visible .svc__badge { background: var(--navy); transform: rotate(-8deg) scale(1.05); box-shadow: 0 14px 24px -12px rgba(27, 42, 58, .7); }
.svc:hover .svc__num, .svc:focus-visible .svc__num { transform: translateY(-170%); opacity: 0; }
.svc:hover .svc__badge svg, .svc:focus-visible .svc__badge svg { transform: none; }

.svc__body { min-width: 0; transition: transform .6s var(--spring); }
.svc:hover .svc__body, .svc:focus-visible .svc__body { transform: translateX(6px); }
.svc__name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 4px; font-family: var(--f-display); font-weight: 500; font-size: clamp(20px, 2.1vw, 27px); line-height: 1.15; letter-spacing: -.01em; }
.svc__sum { margin: 0; font-size: 15px; line-height: 1.5; color: var(--muted); transition: color .35s; }
.svc:hover .svc__sum, .svc:focus-visible .svc__sum { color: var(--navy); } /* navy, not navy-2: keeps 4.5:1 over the copper end of the fill */
.svc__flag { padding: 5px 10px; border-radius: 999px; background: var(--navy); color: var(--copper-2); font-size: 10px; letter-spacing: .14em; line-height: 1; transition: background .35s, color .35s; }
.svc:hover .svc__flag, .svc:focus-visible .svc__flag { background: var(--paper); color: var(--copper-d); }

/* the signature row: navy at rest, still floods copper on hover */
.svc--feature { background: var(--navy); color: var(--cream); box-shadow: 0 24px 50px -26px rgba(27, 42, 58, .8), inset 0 1px 0 rgba(255, 255, 255, .08); transition: transform .6s var(--spring), box-shadow .4s, color .35s; }
.svc--feature .svc__sum { color: rgba(250, 246, 238, .7); }
.svc--feature .svc__badge { background: linear-gradient(145deg, var(--copper-2), var(--copper)); box-shadow: 0 10px 22px -10px rgba(194, 133, 63, .8); }
.svc--feature .svc__num { color: #fff; }
.svc--feature .svc__go { color: var(--cream); box-shadow: inset 0 0 0 1.5px rgba(250, 246, 238, .3); }
.svc--feature .svc__flag { background: rgba(226, 176, 119, .16); color: var(--copper-2); box-shadow: inset 0 0 0 1px rgba(226, 176, 119, .35); }
.svc--feature:hover, .svc--feature:focus-visible { color: var(--navy); }
.svc--feature:hover .svc__sum, .svc--feature:focus-visible .svc__sum { color: var(--navy); }
.svc--feature:hover .svc__flag, .svc--feature:focus-visible .svc__flag { background: var(--navy); color: var(--copper-2); box-shadow: none; }
.svc--feature .svc__cross::before { background: repeating-linear-gradient(to bottom, rgba(27, 42, 58, .45) 0 4px, transparent 4px 8px); }

/* arrow: outline at rest, navy bubble on hover; the arrow slides through and turns to "open" */
.svc__go {
  position: relative; width: 56px; height: 56px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; color: var(--navy);
  box-shadow: inset 0 0 0 1.5px rgba(27, 42, 58, .2);
  transition: background .35s, color .35s, transform .6s var(--spring), box-shadow .4s;
}
.svc__go svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.svc:hover .svc__go, .svc:focus-visible .svc__go { background: var(--navy); color: var(--cream); transform: scale(1.08); box-shadow: 0 0 0 7px rgba(27, 42, 58, .12); }
.svc:hover .svc__go svg, .svc:focus-visible .svc__go svg { animation: svcArrow .75s var(--ease) forwards; }
@keyframes svcArrow {
  0% { transform: none; }
  40% { transform: translateX(170%); }
  41% { transform: translateX(-170%); }
  100% { transform: rotate(-45deg); }
}

@media (hover: hover) and (pointer: fine) {
  .svc:hover .svc__cross { opacity: 1; }
}
@media (hover: none) {
  .svc__go { background: var(--navy); color: var(--cream); box-shadow: none; }
  .svc--feature .svc__go { background: linear-gradient(135deg, var(--copper-2), var(--copper)); color: #fff; }
}

/* ---------- Partner strip (slim pill, not a footer) ---------- */
.partner-strip { padding-block: clamp(6px, 1.5vw, 16px) clamp(64px, 8vw, 110px); }
.partner-strip__inner {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: clamp(16px, 2.4vw, 32px);
  padding: 18px 16px 18px 18px; border-radius: 999px;
  background: var(--paper); box-shadow: var(--shadow), var(--inset);
}
.partner-strip__inner::before { content: ""; position: absolute; inset: 7px; z-index: -1; border-radius: inherit; border: 1.5px dashed rgba(194, 133, 63, .38); pointer-events: none; transition: border-color .4s; }
.partner-strip__inner::after {
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background-image: linear-gradient(rgba(27, 42, 58, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(27, 42, 58, .06) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(90deg, transparent 35%, #000 85%); mask-image: linear-gradient(90deg, transparent 35%, #000 85%);
}
.partner-strip__inner:hover::before { border-color: var(--copper); }
.partner-strip__icon { width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(145deg, #fff, var(--cream-2)); box-shadow: inset 0 0 0 1px rgba(194, 133, 63, .25), 0 12px 22px -12px rgba(194, 133, 63, .6); }
.partner-strip__icon img { width: 54px; height: auto; transition: transform .8s var(--spring); }
.partner-strip__inner:hover .partner-strip__icon img { transform: rotate(-12deg) scale(1.12); }
.partner-strip__tag { margin: 0 0 10px; }
.partner-strip__title { margin: 0 0 2px; font-family: var(--f-display); font-weight: 500; font-size: clamp(23px, 2.4vw, 31px); line-height: 1.1; letter-spacing: -.015em; color: var(--navy); }
.partner-strip__title em { font-style: normal; background: linear-gradient(120deg, var(--copper-2), var(--copper) 50%, var(--copper-d)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.partner-strip__text { margin: 0; font-size: 15px; color: var(--muted); }
.ps-flow { display: flex; align-items: center; gap: 6px; font-size: 10px; white-space: nowrap; }
.ps-flow span { padding: 7px 11px; border-radius: 999px; background: var(--cream); color: var(--navy-3); box-shadow: inset 0 0 0 1px var(--line); }
.ps-flow i { font-style: normal; color: var(--copper); }
.partner-strip__inner:hover .ps-flow span { animation: psPulse 1.2s var(--ease) both; }
.partner-strip__inner:hover .ps-flow span:nth-of-type(2) { animation-delay: .15s; }
.partner-strip__inner:hover .ps-flow span:nth-of-type(3) { animation-delay: .3s; }
@keyframes psPulse { 50% { background: var(--navy); color: var(--copper-2); transform: translateY(-3px); } }
.partner-strip .btn { padding: 18px 26px; }

/* ---------- Responsive ---------- */
@media (max-width: 1120px) {
  .ps-flow { display: none; }
  .partner-strip__inner { grid-template-columns: auto minmax(0, 1fr) auto; }
}

@media (max-width: 980px) {
  .home-work__grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: clamp(300px, 46vw, 400px); }
  .home-work__grid .work-card:nth-child(2) { translate: none; }
  .home-work__grid .work-card:nth-child(3) { grid-column: span 2; }
  .home-work .more-link { margin-top: clamp(30px, 4vw, 50px); }

  .home-services__wrap { display: flex; flex-direction: column; align-items: stretch; gap: 30px; }
  .home-services__aside { display: contents; }
  .home-services__head { order: 0; }
  .svc-list { order: 1; }
  .home-services__cta { order: 2; margin-top: 4px; }

  .partner-strip__inner { border-radius: var(--r-xl); padding: 20px 20px 20px 22px; }
}

@media (max-width: 680px) {
  .home-work__lead { max-width: none; }
  .home-work__grid { grid-template-columns: 1fr; grid-auto-rows: 300px; }
  .home-work__grid .work-card:nth-child(3) { grid-column: auto; }
  .home-work__grid .work-card { border-radius: var(--r-lg); }

  .svc { --gx: calc(100% - 36px); gap: 14px; padding: 16px 14px; border-radius: 26px; }
  .svc:focus-visible { border-radius: 26px; }
  .svc__badge { width: 48px; height: 48px; border-radius: 16px; }
  .svc__num { font-size: 13px; }
  .svc__badge svg { width: 24px; height: 24px; }
  .svc__name { font-size: 19px; }
  .svc__sum { font-size: 14px; }
  .svc__go { width: 42px; height: 42px; }
  .svc__go svg { width: 18px; height: 18px; }
  .svc.glow-card:hover { transform: none; }
  .home-services__cta .btn { width: 100%; }

  .partner-strip__inner { grid-template-columns: auto minmax(0, 1fr); gap: 14px 16px; padding: 20px; border-radius: var(--r-lg); }
  .partner-strip__inner::before { inset: 6px; }
  .partner-strip__icon { width: 60px; height: 60px; }
  .partner-strip__icon img { width: 42px; }
  .partner-strip .btn { grid-column: 1 / -1; width: 100%; }
}
