/* ALLCUT — Home page. Builds on site.css tokens; 12-column grid, hairlines, no radius. */

.home-h2 { max-width: 19ch; }
.label--case { text-transform: none; letter-spacing: .04em; }

/* section heads sit on the page grid: heading cols 1–7, aside from col 8 (the hero plate line) */
.page-home .section-head { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 28px); }
.page-home .section-head > :first-child { grid-column: 1 / span 7; }
.page-home .section-head > :last-child:not(:first-child) { grid-column: 8 / -1; }
.page-home .section-head > a.link-arrow:last-child { justify-self: end; }
.page-home .section-head__aside { max-width: 46ch; }
@media (max-width: 760px) {
  .page-home .section-head > :first-child,
  .page-home .section-head > :last-child:not(:first-child),
  .page-home .section-head > a.link-arrow:last-child { grid-column: 1 / -1; justify-self: start; }
}

/* shared 12-col page grid */
.home-annular__grid,
.home-film__grid,
.home-dealer__inner {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2vw, 28px);
}

/* ───────────── 1. hero slider ───────────── */
.hs {
  --hs-h: clamp(560px, calc(100svh - var(--header-h)), 900px);
  position: relative; height: var(--hs-h); overflow: hidden; background: #0a0a09; color: #fff; isolation: isolate;
}
.hs__track, .hs__slide { position: absolute; inset: 0; }
.hs__slide { opacity: 0; visibility: hidden; transition: opacity .9s var(--ease), visibility 0s linear .9s; }
.hs__slide.is-on { opacity: 1; visibility: visible; transition: opacity .9s var(--ease), visibility 0s; z-index: 1; }
html:not(.js) .hs__slide:not(:first-child) { display: none; }

.hs__media { position: absolute; inset: 0; overflow: hidden; }
.hs__img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 8s linear; }
.hs__slide.is-on .hs__img { transform: scale(1); }
.hs__slide--cut .hs__img { object-position: 70% 50%; }
/* shade: dark from the bottom-left so white text always reads */
.hs__media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(10,10,9,.88) 0%, rgba(10,10,9,.62) 38%, rgba(10,10,9,.12) 70%, rgba(10,10,9,0) 100%),
    linear-gradient(0deg, rgba(10,10,9,.85) 0%, rgba(10,10,9,0) 42%);
}

.hs__copy {
  position: relative; z-index: 1; height: 100%;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-bottom: calc(var(--hs-bar) + clamp(28px, 4vw, 56px));
  --hs-bar: 92px;
}
.hs__label { color: rgba(255,255,255,.72); }
.hs__title { margin-top: 22px; max-width: 13ch; color: #fff; font-size: clamp(44px, 6.4vw, 104px); text-wrap: balance; }
.hs__title--main { font-size: clamp(50px, 8vw, 128px); line-height: .9; }
.hs__title--main > span { display: block; }
.hero__stop { color: var(--red); }
.hs__text { margin-top: 22px; max-width: 52ch; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.55; color: rgba(255,255,255,.82); text-wrap: pretty; }
.hs__ctas { margin-top: 28px; }
.btn__meta { font: 500 11px/1 var(--f-mono); letter-spacing: .06em; color: var(--ink-3); }
.btn--glass { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.4); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.btn--glass:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn--glass .btn__meta { color: rgba(255,255,255,.6); }
.btn--glass:hover .btn__meta { color: var(--ink-3); }

/* copy enters line by line on the active slide (transform + opacity only) */
.js .hs__copy > * { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .9s var(--ease); }
.js .hs__slide.is-on .hs__copy > * { opacity: 1; transform: none; }
html.ac-intro-on .hs__slide.is-on .hs__copy > * { opacity: 0; transform: translateY(26px); }  /* wait for the opening animation */
.js .hs__slide.is-on .hs__copy > :nth-child(1) { transition-delay: .25s; }
.js .hs__slide.is-on .hs__copy > :nth-child(2) { transition-delay: .35s; }
.js .hs__slide.is-on .hs__copy > :nth-child(3) { transition-delay: .48s; }
.js .hs__slide.is-on .hs__copy > :nth-child(4) { transition-delay: .58s; }

/* bottom bar: tabs with progress lines + controls */
.hs__bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; border-top: 1px solid rgba(255,255,255,.16); }
.hs__bar-inner { display: flex; align-items: stretch; justify-content: space-between; gap: 24px; height: 92px; }
.hs__tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); flex: 1; max-width: 860px; }
.hs__tab {
  position: relative; display: flex; align-items: center; gap: 12px; min-width: 0; padding: 0 20px 0 0;
  background: none; border: 0; color: rgba(255,255,255,.55); font: 600 14px/1.2 var(--f-sans); text-align: left; cursor: pointer;
  transition: color .2s var(--ease);
}
.hs__tab:hover, .hs__tab[aria-selected="true"] { color: #fff; }
.hs__tab-n { font: 500 11px/1 var(--f-mono); letter-spacing: .08em; }
.hs__tab-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs__tab-line { position: absolute; left: 0; right: 20px; top: -1px; height: 2px; background: rgba(255,255,255,.18); overflow: hidden; }
.hs__tab-fill { position: absolute; inset: 0; background: var(--red); transform: scaleX(0); transform-origin: 0 50%; }
.hs__tab[aria-selected="true"] .hs__tab-fill { transform: scaleX(var(--p, 1)); }
.hs__ctrl { display: flex; align-items: center; gap: 8px; }
.hs__btn {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.3); cursor: pointer;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.hs__btn:hover { background: #fff; color: var(--ink); border-color: #fff; }
.hs__btn svg { width: 16px; height: 16px; }
.hs__i-play, .hs__btn[aria-pressed="true"] .hs__i-pause { display: none; }
.hs__btn[aria-pressed="true"] .hs__i-play { display: block; }
.hs :focus-visible { outline-color: #fff; }
html:not(.js) .hs__bar { display: none; }

@media (max-width: 900px) {
  .hs { --hs-h: clamp(560px, calc(100svh - var(--header-h)), 760px); }
  .hs__media::after { background: linear-gradient(0deg, rgba(10,10,9,.92) 0%, rgba(10,10,9,.72) 45%, rgba(10,10,9,.15) 80%); }
  .hs__slide--cut .hs__img { object-position: 40% 50%; }
  .hs__tab-t { display: none; }
  .hs__tab { justify-content: flex-start; }
}
@media (max-width: 560px) {
  .hs__copy { --hs-bar: 72px; }
  .hs__bar-inner { height: 72px; gap: 12px; }
  .hs__ctas .btn { width: 100%; }
  .hs__btn { width: 40px; height: 40px; }
  .hs__text { font-size: 15px; }
  .hs { --hs-h: clamp(700px, calc(100svh - var(--header-h)), 760px); }
}
@media (max-width: 380px) {
  .hs { --hs-h: clamp(740px, calc(100svh - var(--header-h)), 800px); }
  .hs__title--main { font-size: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  .hs__slide, .hs__slide.is-on, .hs__img, .js .hs__copy > * { transition: none !important; }
  .hs__img { transform: none; }
}

/* ───────────── 2. ranges ───────────── */
.section-head__aside > p { margin-bottom: 18px; }
.rng-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.rng {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  padding: 18px 24px 22px; border-bottom: 1px solid var(--rule); border-left: 1px solid var(--rule);
}
.rng__top { display: flex; justify-content: space-between; gap: 12px; }
.rng__top .num { color: var(--ink-4); }
.rng__media { height: clamp(150px, 14vw, 210px); margin: 22px 0 24px; display: flex; align-items: flex-end; justify-content: center; }
.rng__media img { height: 100%; width: auto; max-width: 100%; object-fit: contain; object-position: center bottom; transition: transform .3s var(--ease); }
.rng__name { font-size: clamp(22px, 1.8vw, 27px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.05; }
.rng__link { transition: color .15s; }
.rng__link::after { content: ""; position: absolute; inset: 0; }
.rng__link:focus-visible { outline: none; }
.rng:focus-within { outline: 2px solid var(--red); outline-offset: -2px; }
.rng__short { margin: 8px 0 20px; font-size: 15px; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.rng__data {
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 14px;
  font: 500 12px/1.4 var(--f-mono); color: var(--ink-3);
}
.rng__count { color: var(--ink); }
.rng:hover .rng__link { color: var(--red-ink); }
.rng:hover .rng__media img { transform: translateY(-4px); }

@media (min-width: 901px) {
  .rng:nth-child(4n+1) { border-left: 0; padding-left: 0; }
  .rng:nth-child(4n) { padding-right: 0; }
}
@media (max-width: 900px) {
  .rng-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rng { padding: 16px 16px 18px; }
  .rng:nth-child(odd) { border-left: 0; padding-left: 0; }
  .rng:nth-child(even) { padding-right: 0; }
  .rng__media { height: clamp(130px, 30vw, 190px); margin: 16px 0 18px; }
  .rng__short { font-size: 14px; }
}

/* ───────────── 3. annular cutting ───────────── */
.home-annular__grid { row-gap: 40px; }
.home-annular__fig { grid-column: 1 / span 6; }
.home-annular__img { background: var(--tint); overflow: hidden; }
.home-annular__img--crop { aspect-ratio: 3 / 2; }
.home-annular__img--crop img { width: 100%; height: 100%; object-fit: cover; object-position: 40% 50%; }
.home-annular__copy { grid-column: 8 / -1; }

.xsec { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; border-top: 1px solid var(--ink); padding-top: 20px; }
.xsec__defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.xsec__item { margin: 0; display: flex; align-items: flex-start; gap: 16px; }
.xsec__svg { width: 84px; height: 84px; flex: none; }
.xsec__item figcaption { display: flex; flex-direction: column; gap: 6px; padding-top: 16px; }
.xsec__note { font-size: 14px; line-height: 1.35; color: var(--ink-2); }

.points { margin-top: 22px; border-top: 1px solid var(--ink); }
.points li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 15px 0 16px; border-bottom: 1px solid var(--rule); }
.points__n { padding-top: 4px; color: var(--ink-4); }
.points__t { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.points p { margin: 4px 0 0; font-size: 15px; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.home-annular__more { margin-top: 24px; }

@media (max-width: 1100px) {
  .home-annular__fig { grid-column: 1 / span 6; }
  .home-annular__copy { grid-column: 7 / -1; }
}
@media (max-width: 860px) {
  .home-annular__fig, .home-annular__copy { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
  .xsec { grid-template-columns: 1fr; gap: 14px; }
}

/* ───────────── 4. featured machines ───────────── */
.cards.home-cards { --cols: 4; }
/* keep every card's image in the same box so names and figures line up across the row */
.home-cards .card__media { position: relative; aspect-ratio: 1 / 1; padding: 0; }
.home-cards .card__media img { position: absolute; inset: 6% 12%; width: 76%; height: 88%; max-height: none; object-fit: contain; object-position: center bottom; }
@media (max-width: 760px) { .cards.home-cards { --cols: 2; } }

/* ───────────── 5. film ───────────── */
.home-film__grid { grid-template-rows: auto 1fr; row-gap: 0; align-items: start; }
.home-film__head { grid-column: 1 / span 4; grid-row: 1; }
.home-film__head .label, .home-dealer__head .label { margin: 0; }
.home-film__head .h2 { margin-top: 18px; }
.home-film__head .body { margin: 20px 0 0; }
.home-film__detail { grid-column: 1 / span 4; grid-row: 2; padding-top: 24px; }
.home-film__links { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin-top: 28px; }
.home-film__fig { grid-column: 6 / -1; grid-row: 1 / span 2; }

.vid { position: relative; aspect-ratio: 16 / 9; background: var(--ink); }
.vid__el { width: 100%; height: 100%; object-fit: cover; background: var(--ink); }
.vid__play {
  position: absolute; inset: 0; width: 100%; padding: 0; border: 0; background: transparent;
  display: flex; align-items: flex-end; justify-content: flex-start;
}
.vid__play[hidden] { display: none; }
.vid__play:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }
.vid__badge { display: inline-flex; align-items: stretch; margin: 0 0 20px 20px; background: var(--paper); color: var(--ink); }
.vid__icon { width: 52px; height: 52px; display: grid; place-items: center; background: var(--ink); color: var(--white); transition: background-color .15s var(--ease); }
.vid__icon svg { width: 14px; height: 14px; }
.vid__text { display: flex; align-items: center; padding: 0 18px; font: 600 15px/1 var(--f-sans); letter-spacing: -0.005em; }
.vid__play:hover .vid__icon, .vid__play:focus-visible .vid__icon { background: var(--red); }

@media (max-width: 1100px) {
  .home-film__head, .home-film__detail { grid-column: 1 / span 5; }
  .home-film__fig { grid-column: 6 / -1; }
}
@media (max-width: 860px) {
  .home-film__grid { grid-template-rows: none; }
  .home-film__head, .home-film__detail, .home-film__fig { grid-column: 1 / -1; grid-row: auto; }
  .home-film__fig { margin-top: 28px; }
}

/* ───────────── 6. made in Bhavnagar ───────────── */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.facts__item { padding: 16px 24px 22px 0; border-bottom: 1px solid var(--rule); }
.facts__item + .facts__item { padding-left: 24px; border-left: 1px solid var(--rule); }
.facts__v { margin-top: 14px; font-size: clamp(40px, 4.4vw, 64px); font-weight: 800; letter-spacing: -0.04em; line-height: .95; font-stretch: 104%; }
.facts__t { margin-top: 12px; max-width: 30ch; font-size: 15px; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }

.works { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 28px 20px; margin-top: clamp(40px, 5vw, 64px); }
.works__img { aspect-ratio: 5 / 4; overflow: hidden; background: var(--tint); }
.works__img img { width: 100%; height: 100%; object-fit: cover; }
.works__cap { display: flex; gap: 10px; margin-top: 10px; font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.works__cap .label { flex: none; color: var(--ink-4); line-height: 1.6; }

@media (max-width: 1100px) {
  .works { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts__item:nth-child(odd) { padding-left: 0; border-left: 0; }
  .facts__item:nth-child(even) { padding-right: 0; }
}
@media (max-width: 560px) {
  .works { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; }
  .facts__item, .facts__item + .facts__item { padding-left: 0; padding-right: 12px; }
  .facts__item:nth-child(even) { padding-left: 14px; }
}

/* ───────────── 7. dealers ───────────── */
.home-dealer { background: var(--tint); border-top: 1px solid var(--rule); }
.home-dealer__inner { align-items: end; row-gap: 24px; }
.home-dealer__head { grid-column: 1 / span 6; }
.home-dealer__head .h2 { margin-top: 18px; }
.home-dealer__body { grid-column: 8 / -1; }
.home-dealer__body .body { margin-bottom: 24px; }
@media (max-width: 860px) {
  .home-dealer__head, .home-dealer__body { grid-column: 1 / -1; }
}

/* range colour codes: a 3px bar across the top of each range cell, name tints on hover */
.rng.rc-top::before { top: -1px; }
.rng:hover .rng__link { color: var(--rc-ink, var(--red-ink)); }
.rng:focus-within { outline-color: var(--rc, var(--red)); }
