/* ==========================================================================
   ARSH TOWNSHIPS INDIA PVT LTD — Global design system
   Tokens, reset, typography, layout primitives.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */

:root {
  /* ---- Brand palette (derived from the Arsh Group logo) ---- */
  --color-primary:        #DEB266;  /* logo gold — accents, icons, active states */
  --color-primary-deep:   #B98E43;  /* pressed / hover gold */
  --color-primary-soft:   rgba(222, 178, 102, 0.12);
  --color-primary-line:   rgba(222, 178, 102, 0.32);

  --color-secondary:      #161616;  /* ink — dark surfaces, headings */
  --color-secondary-soft: #1F1F1F;
  --color-tertiary:       #EDEDED;

  --color-background:     #F5F4F2;
  --color-surface:        #FFFFFF;
  --color-surface-alt:    #EFEDE9;

  --color-heading:        #161616;
  --color-text:           #585858;
  --color-muted:          #6E6E6E;

  --color-border:         rgba(22, 22, 22, 0.10);
  --color-border-strong:  rgba(22, 22, 22, 0.16);

  /* On dark surfaces */
  --color-on-dark:            #FFFFFF;
  --color-on-dark-text:       rgba(255, 255, 255, 0.72);
  --color-on-dark-border:     rgba(255, 255, 255, 0.14);
  --color-on-dark-surface:    #202020;

  --color-white: #FFFFFF;
  --color-black: #000000;

  /* ---- Typography ---- */
  --font-display: "Josefin Sans", "Trebuchet MS", sans-serif;
  --font-body:    "DM Sans", "Helvetica Neue", Arial, sans-serif;

  /* Fluid scale measured from the reference at 390px → 1440px */
  --text-h1:   clamp(2.4375rem, 1.985rem + 1.857vw, 3.375rem);   /* 39   → 54    */
  --text-h2:   clamp(1.925rem, 1.6525rem + 1.118vw, 2.6625rem);  /* 30.8 → 42.6  */
  --text-h3:   clamp(1.25rem, 1.1875rem + 0.256vw, 1.4166rem);   /* 20   → 22.67 */
  --text-h4:   clamp(1.25rem, 1.1571rem + 0.381vw, 1.5rem);      /* 20   → 24    */
  --text-h5:   clamp(1.15rem, 1.0761rem + 0.303vw, 1.3875rem);   /* 18.4 → 22.2  */
  --text-h6:   1.125rem;

  --text-xs:   0.8125rem;   /* 13 */
  --text-sm:   0.875rem;    /* 14 */
  --text-base: 1rem;        /* 16 */
  --text-lg:   1.125rem;    /* 18 */
  --text-xl:   1.25rem;     /* 20 */

  --leading-tight:  1.2;
  --leading-snug:   1.35;
  --leading-normal: 1.6;
  --leading-loose:  1.75;

  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;

  /* ---- Layout ---- */
  --container-wide:   1380px;
  --container:        1300px;
  --container-narrow: 1250px;
  --container-text:   760px;
  --gutter:           30px;

  --section-y:       clamp(64px, 6.95vw, 100px);
  --section-y-lg:    clamp(80px, 12.5vw, 180px);
  --section-y-sm:    clamp(48px, 4.2vw, 60px);

  /* ---- Radii (measured from the reference) ---- */
  --radius-pill:   40px;
  --radius-shell:  30px;   /* header pill, hero shell, footer shell */
  --radius-card:   20px;   /* cards, media, panels */
  --radius-sm:     12px;
  --radius-xs:     8px;
  --radius-circle: 50%;

  /* ---- Elevation ---- */
  --shadow-card:  0 18px 40px -28px rgba(22, 22, 22, 0.30);
  --shadow-lift:  0 26px 60px -32px rgba(22, 22, 22, 0.42);
  --shadow-pill:  0 10px 24px -16px rgba(22, 22, 22, 0.45);

  /* ---- Motion ---- */
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-inout: cubic-bezier(0.7, 0, 0.3, 1);
  --dur-fast:   180ms;
  --dur-base:   375ms;
  --dur-slow:   700ms;
  --transition: all var(--dur-base) var(--ease-inout);

  --header-h: 102px;
  --header-offset: 30px;
}

/* --------------------------------------------------------------------------
   2. Reset
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* `clip` contains stray horizontal overflow without creating a scroll
     container, so the sticky header keeps sticking. `hidden` would not. */
  overflow-x: clip;
}

body {
  margin: 0;
  background-color: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  font-weight: var(--weight-regular);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.is-locked { overflow: hidden; }

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em;
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  color: var(--color-heading);
  text-wrap: balance;
}

h1 { font-size: var(--text-h1); text-transform: capitalize; }
h2 { font-size: var(--text-h2); text-transform: capitalize; line-height: 1.2; }
h3 { font-size: var(--text-h3); text-transform: capitalize; }
h4 { font-size: var(--text-h4); }
h5 { font-size: var(--text-h5); }
h6 { font-size: var(--text-h6); }

p {
  margin: 0 0 1.25rem;
  text-wrap: pretty;
}

p:last-child { margin-bottom: 0; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur-base) var(--ease-inout);
}

img,
picture,
video,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

ul, ol { margin: 0; padding: 0; list-style: none; }

/* Component rules like `.project-card { display: block }` outrank the UA
   default for [hidden], so the filter could not hide anything without this. */
[hidden] { display: none !important; }

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

address { font-style: normal; }

hr {
  height: 1px;
  margin: 0;
  border: 0;
  background-color: var(--color-border);
}

::selection {
  background-color: var(--color-primary);
  color: var(--color-secondary);
}

/* --------------------------------------------------------------------------
   3. Accessibility
   -------------------------------------------------------------------------- */

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--color-primary-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

.dark-surface :where(a, button, input, select, textarea):focus-visible {
  outline-color: var(--color-primary);
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--gutter);
  z-index: 200;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  background-color: var(--color-secondary);
  color: var(--color-white);
  font-size: var(--text-sm);
  transition: top var(--dur-base) var(--ease-out);
}

.skip-link:focus { top: 20px; }

/* --------------------------------------------------------------------------
   4. Layout primitives
   -------------------------------------------------------------------------- */

.container,
.container--wide {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container        { max-width: calc(var(--container) + var(--gutter) * 2); }
.container--wide  { max-width: calc(var(--container-wide) + var(--gutter) * 2); }

/* Entrance transforms briefly extend past the container gutter; clipping the
   main region contains them. The header is a sibling, so it still sticks. */
main { overflow-x: clip; }

.section { padding-block: var(--section-y); }
.section--lg { padding-block: var(--section-y-lg); }
.section--sm { padding-block: var(--section-y-sm); }
.section--flush-top { padding-top: 0; }

.dark-surface {
  background-color: var(--color-secondary);
  color: var(--color-on-dark-text);
}

.dark-surface :is(h1, h2, h3, h4, h5, h6) { color: var(--color-on-dark); }
.dark-surface hr { background-color: var(--color-on-dark-border); }

/* Light cards sitting on a dark section keep their own light-surface colours —
   without this the inherited on-dark text renders white on white. */
.dark-surface :is(.card, .service-card, .contact-card, .tabs__tab, .filter-bar__btn, .primary-nav__submenu) {
  color: var(--color-text);
}
.dark-surface :is(.card, .service-card, .contact-card) :is(h1, h2, h3, h4, h5, h6) {
  color: var(--color-heading);
}
.dark-surface :is(.card, .service-card, .contact-card) hr {
  background-color: var(--color-border);
}
.dark-surface :is(.card, .service-card) .link-arrow { color: var(--color-heading); }
.dark-surface :is(.card, .service-card) .link-arrow:hover { color: var(--color-primary-deep); }

/* --------------------------------------------------------------------------
   5. Section headers — eyebrow / title / lede
   -------------------------------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--color-primary-deep);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: var(--radius-circle);
  background-color: var(--color-primary);
}

.eyebrow--boxed {
  padding: 7px 18px;
  border: 1px solid var(--color-primary-line);
  border-radius: var(--radius-pill);
}

.dark-surface .eyebrow { color: var(--color-primary); }

.section-head { max-width: 640px; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head__title { margin-bottom: 0; }
.section-head__lede {
  margin-top: 18px;
  margin-bottom: 0;
  max-width: 56ch;
}
.section-head--center .section-head__lede { margin-inline: auto; }

.section-head--split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  max-width: none;
  margin-bottom: 52px;
}

/* --------------------------------------------------------------------------
   6. Text utilities
   -------------------------------------------------------------------------- */

.lede {
  font-size: var(--text-lg);
  line-height: var(--leading-loose);
  max-width: 60ch;
}

.text-muted { color: var(--color-muted); }
.text-gold  { color: var(--color-primary-deep); }
.dark-surface .text-gold { color: var(--color-primary); }
.text-center { text-align: center; }

.measure { max-width: 68ch; }

/* --------------------------------------------------------------------------
   7. Content rhythm
   Spacing between adjacent blocks lives here rather than on the elements, so
   every section keeps the same vertical cadence without inline overrides.
   -------------------------------------------------------------------------- */

:is(p, h2, h3) + .check-list { margin-top: 26px; }

.section-head + :is(
  .pillar-grid, .project-mosaic, .gallery-grid, .spec-list,
  .filter-bar, .amenity-grid, .compare, .process-grid, .contact-cards
) { margin-top: 52px; }

.section-head--split + :is(.process-grid, .gallery-grid, .project-mosaic) { margin-top: 0; }

:is(p, ul, ol, .check-list, .spec-list, .locality-list, .accordion, .amenity-grid, .tabs__panel, [data-tabs])
  + :is(.btn, .link-arrow) { margin-top: 34px; }

.filter-bar + .project-mosaic { margin-top: 0; }

.section-head + :is(.btn, .text-center) { margin-top: 34px; }

/* A trailing CTA under a grid. Set on the block itself rather than through an
   adjacent-sibling rule, because a hidden empty-state paragraph can sit between
   the grid and the button and silently break the match. */
.section-cta { margin-top: 52px; }

:is(.pillar-grid, .project-mosaic, .gallery-grid, .amenity-grid, .process-grid, .compare, .spec-list)
  + :is(.btn, .link-arrow) { margin-top: 52px; }

.split + :is(.spec-list, .amenity-grid) { margin-top: 56px; }

/* One block of cards followed by another block — without this they butt up
   against each other, as the highlights and amenities did. */
:is(.pillar-grid, .gallery-grid, .spec-list, .process-grid)
  + :is(.amenity-grid, .pillar-grid, .spec-list, .gallery-grid, .locality-list, .check-list) { margin-top: 40px; }

.compare + .amenity-grid { margin-top: 52px; }

/* --------------------------------------------------------------------------
   8. Layout utilities
   These exist so no element needs an inline style attribute. A strict
   Content-Security-Policy blocks inline styles outright, which silently
   collapses any padding set that way.
   -------------------------------------------------------------------------- */

.flush        { margin: 0; }
.section-flush{ padding-block: 0; }
.p-0          { padding: 0; }

/* Inset dark/!light panel inside a section */
.panel {
  border-radius: var(--radius-shell);
  padding: var(--section-y) 0;
}
.panel--gutter {
  border-radius: var(--radius-shell);
  padding: var(--section-y) var(--gutter);
}
.panel--cta {
  border-radius: var(--radius-shell);
  padding: var(--section-y) var(--gutter);
  text-align: center;
}
.panel--media {
  position: relative;
  border-radius: var(--radius-shell);
  overflow: hidden;
  isolation: isolate;
}
.panel__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.panel__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, rgba(22, 22, 22, 0.96) 42%, rgba(22, 22, 22, 0.75) 100%);
}

/* Spacing */
.mb-0  { margin-bottom: 0; }
.mb-sm { margin-bottom: 20px; }
.mb-md { margin-bottom: 26px; }
.mb-lg { margin-bottom: 40px; }
.mb-xl { margin-bottom: 52px; }
.mb-2xl{ margin-bottom: 56px; }

/* A row separated from what precedes it by a hairline */
.rule-above {
  margin-top: 38px;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
}
.rule-above--section {
  margin-top: var(--section-y);
  padding-top: var(--section-y-sm);
  border-top: 1px solid var(--color-border);
}

/* Small pieces */
.split--tight   { gap: 34px; align-items: start; }
.split--stretch { align-items: stretch; }
.btn--block     { width: 100%; justify-content: center; }
.measure-46     { max-width: 46ch; }
.measure-42     { margin: 0; max-width: 42ch; }
.min-h-panel    { min-height: 420px; }
.text-h2        { font-size: var(--text-h2); }
.actions-row {
  margin-top: 38px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
