/* css/pages.css — Page-Specific Layouts & Compositions
   Aaina Makeup Studio (Odisha)
   Follows DESIGN.md ("The Magazine Cover") & Anti-Slop Guidelines
*/

/* ==========================================================================
   1. Home Page — "Quiet Cover" Hero (DESIGN §5, Decision D23)
   ========================================================================== */

/* Theme Paper (Single Issue: Bridal — DESIGN §5) */
.hero-cover {
  --hero-bg: var(--paper);
  --hero-text: var(--ink);
  --hero-text-muted: var(--muted);
  --hero-masthead: var(--ink);
  --hero-line: var(--line);
  position: relative;
  background-color: var(--hero-bg);
  border-bottom: 1px solid var(--hero-line);
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Desktop Single-Screen Framing (≥ 1100px)
   -------------------------------------------------------------------------- */
@media (min-width: 1100px) {
  .hero-cover {
    height: calc(100svh - var(--header-height, 80px) - 52px);
    min-height: 540px;
    max-height: 960px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: stretch;
  }

  .hero-cover__container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    position: relative;
  }

  .hero-cover__body {
    display: grid;
    grid-template-columns: minmax(0, 48%) minmax(0, 52%);
    align-items: center;
    flex: 1;
    position: static;
    margin-top: -1.5svh; /* Remove dead gap between masthead and content */
    padding-bottom: clamp(12px, 2svh, 24px);
  }

  .hero-cover__narrative {
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 520px;
    position: relative;
    z-index: 4;
  }

  /* Art Stage: Sits fully inside container's right side, bottom on baseline */
  .hero-cover__art {
    position: absolute;
    right: 0;
    bottom: 0;
    height: 100%;
    width: 56%;
    pointer-events: none;
    z-index: 2;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
  }
}

/* --------------------------------------------------------------------------
   L1 Masthead "AAINA" — Tight Word Spanning Container Width
   -------------------------------------------------------------------------- */
.hero-cover__masthead-wrap {
  position: relative;
  width: 100%;
  padding-top: 0;
  padding-bottom: 0;
  z-index: 1;
  user-select: none;
  pointer-events: none;
}

.hero-cover__masthead {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 28.5cqw, 24rem);
  font-weight: 800;
  line-height: 0.82;
  letter-spacing: 0.015em;
  white-space: nowrap;
  color: var(--hero-masthead);
  font-optical-sizing: none;
  font-variation-settings: "opsz" var(--display-opsz);
  -webkit-text-stroke: 0.012em currentColor;
  transition: color 600ms cubic-bezier(.2,.7,.2,1);
}

/* --------------------------------------------------------------------------
   Narrative Typography (Eyebrow -> 24px -> H1 -> 24px -> Support -> 32px -> CTAs)
   -------------------------------------------------------------------------- */
.hero-cover__eyebrow {
  display: inline-block;
  color: var(--sindoor);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: clamp(12px, 2svh, 22px);
}

.hero-cover__headline {
  font-family: var(--font-display);
  font-size: clamp(2.15rem, 3.8vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--hero-text);
  font-weight: 750;
  font-optical-sizing: none;
  font-variation-settings: "opsz" var(--display-opsz);
  margin-bottom: clamp(12px, 2svh, 22px);
  text-wrap: balance;
  transition: color 600ms cubic-bezier(.2,.7,.2,1);
}

.hero-cover__support {
  font-size: clamp(0.925rem, 1.1vw, 1.05rem);
  line-height: 1.55;
  color: var(--hero-text-muted);
  margin-bottom: clamp(16px, 2.8svh, 28px);
  max-width: 44ch;
  transition: color 600ms cubic-bezier(.2,.7,.2,1);
}

.hero-cover__actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.hero-cover__secondary-link {
  color: var(--hero-text);
  font-family: var(--font-text);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 6px;
  transition: color var(--transition-fast);
}

.hero-cover__secondary-link:hover {
  color: var(--sindoor);
}

/* --------------------------------------------------------------------------
   Standalone Art Stage (No Oval, Subject Directly on Background)
   -------------------------------------------------------------------------- */
.hero-cover__stage {
  position: absolute;
  right: 0;
  bottom: 0;
  height: 80%; /* 78–85% of hero height */
  width: 100%;
  pointer-events: none;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
}

/* 1px Baseline Hairline Rule: Solid hairline rule across the hero bottom */
.hero-cover__baseline {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background-color: var(--hero-line);
  z-index: 5;
  pointer-events: none;
}

/* Standalone subject image: bottom on baseline, inside container */
.hero-cover__img {
  position: absolute;
  bottom: 0;
  right: 0;
  height: 100%;
  width: auto;
  aspect-ratio: 1393 / 1129;
  max-width: none;
  max-height: none;
  object-fit: contain;
  object-position: bottom right;
  display: block;
  transform: translateY(var(--issue-offset-y, 0px)) scale(var(--issue-scale, 1));
  transform-origin: bottom right;
}

/* --------------------------------------------------------------------------
   Dedicated Mobile Layout (≤ 700px, 390×844 Reference)
   -------------------------------------------------------------------------- */
@media (max-width: 700px) {
  .hero-cover {
    padding-bottom: var(--space-5);
    height: auto;
    min-height: auto;
    position: relative;
    overflow: hidden;
  }

  .hero-cover__container {
    display: flex;
    flex-direction: column;
    padding-inline: var(--page-pad);
    position: relative;
  }

  .hero-cover__masthead-wrap {
    padding-top: var(--space-2);
    padding-bottom: 0;
    z-index: 1;
  }

  .hero-cover__masthead {
    font-size: clamp(3.2rem, 24vw, 5.8rem);
    line-height: 0.85;
    white-space: nowrap;
    letter-spacing: 0.015em;
  }

  .hero-cover__body {
    display: flex;
    flex-direction: column;
    position: relative;
  }

  /* Mobile Art: Large subject on baseline overlapping masthead on top */
  .hero-cover__art {
    order: 1;
    position: relative;
    width: 100%;
    margin-top: clamp(-68px, -9svh, -48px);
    margin-bottom: var(--space-2);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    z-index: 2;
  }

  .hero-cover__stage {
    position: relative;
    height: auto;
    width: auto;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    pointer-events: none;
  }

  .hero-cover__img {
    position: relative;
    bottom: 0;
    right: auto;
    height: clamp(330px, 45svh, 400px);
    width: auto;
    max-width: none;
    aspect-ratio: 1393 / 1129;
    object-fit: contain;
    object-position: bottom center;
    display: block;
    transform: translateY(var(--issue-offset-y, 0px)) scale(var(--issue-scale, 1));
    transform-origin: bottom center;
  }

  .hero-cover__narrative {
    order: 2;
    display: flex;
    flex-direction: column;
    width: 100%;
    z-index: 3;
  }

  .hero-cover__eyebrow {
    margin-bottom: var(--space-2);
  }

  .hero-cover__headline {
    font-size: clamp(2.1rem, 8.5vw, 2.75rem);
    line-height: 1.05;
    margin-bottom: var(--space-3);
  }

  .hero-cover__support {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: var(--space-4);
  }

  .hero-cover__actions {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: var(--space-3);
  }

  .hero-cover__primary-btn {
    width: 100%;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .hero-cover__secondary-link {
    text-align: center;
    padding-block: var(--space-2);
  }
}

/* Tablet Layout (701px – 1099px) */
@media (min-width: 701px) and (max-width: 1099px) {
  .hero-cover {
    padding-top: var(--space-4);
    padding-bottom: var(--space-6);
    height: auto;
    overflow: hidden;
  }

  .hero-cover__container {
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .hero-cover__body {
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
  }

  .hero-cover__art {
    order: 1;
    position: relative;
    width: 100%;
    height: clamp(400px, 52svh, 540px);
    display: flex;
    justify-content: center;
    margin-block: var(--space-2) var(--space-4);
    overflow: hidden;
    z-index: 2;
  }

  .hero-cover__stage {
    position: relative;
    height: 100%;
    width: auto;
    aspect-ratio: 1393 / 1129;
    display: flex;
    justify-content: center;
    align-items: flex-end;
  }

  .hero-cover__img {
    position: absolute;
    bottom: 0;
    height: 100%;
    width: auto;
    aspect-ratio: 1393 / 1129;
    object-fit: contain;
    object-position: bottom center;
    display: block;
    transform: translateY(var(--issue-offset-y, 0px)) scale(var(--issue-scale, 1));
    transform-origin: bottom center;
  }

  .hero-cover__narrative {
    order: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 600px;
    z-index: 3;
  }

  .hero-cover__actions {
    justify-content: flex-start;
  }
}

/* --------------------------------------------------------------------------
   Cover Lines Strip (Slim Nav Directly Below Hero)
   -------------------------------------------------------------------------- */
.cover-lines-strip {
  background-color: var(--hero-bg, var(--paper));
  border-top: 1px solid var(--hero-line, var(--line));
  border-bottom: 1px solid var(--hero-line, var(--line));
  padding-block: var(--space-4);
  transition: background-color 600ms cubic-bezier(.2,.7,.2,1), border-color 600ms cubic-bezier(.2,.7,.2,1);
}

.cover-lines-strip__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.cover-lines-strip__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-text);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hero-text, var(--ink));
  text-decoration: none;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.cover-lines-strip__link:hover {
  color: var(--sindoor);
  transform: translateX(2px);
}

.cover-lines-strip__sep {
  width: 1px;
  height: 14px;
  background-color: var(--hero-line, var(--line));
  display: inline-block;
}

@media (max-width: 768px) {
  .cover-lines-strip__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
  }
  .cover-lines-strip__sep {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Hero Debug Overlay Mode (?debug=hero)
   -------------------------------------------------------------------------- */
.hero-debug-overlay {
  position: absolute;
  inset: 0;
  outline: 1px dashed var(--sindoor);
  pointer-events: none;
  z-index: 9999;
}

.hero-debug-line--center {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background-color: var(--sindoor);
  box-shadow: 0 0 2px rgba(193, 18, 31, 0.8);
}

.hero-debug-line--baseline {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background-color: var(--sindoor);
  box-shadow: 0 0 2px rgba(193, 18, 31, 0.8);
}

.hero-debug-hud {
  position: absolute;
  top: 4px;
  left: 4px;
  font-family: monospace;
  font-size: 11px;
  background: rgba(15, 14, 13, 0.85);
  color: #fff;
  padding: 2px 6px;
  border: 1px solid var(--sindoor);
}

/* Reduced Motion Fallback */
@media (prefers-reduced-motion: reduce) {
  .hero-cover,
  .hero-cover__masthead,
  .hero-cover__subject,
  .hero-cover__headline {
    transition: none !important;
    transform: none !important;
    animation: none !important;
  }
}


/* ==========================================================================
   2. Home Page — Statement Band ("Why Aaina" - DESIGN §5)
   ========================================================================== */
.statement-band {
  background-color: var(--ink);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}

.statement-band__grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}

.statement-band__headline {
  font-size: var(--fs-h2);
  line-height: 1.05;
  color: var(--paper);
  margin-block: var(--space-3) var(--space-4);
}

.statement-band__body {
  font-size: 1.1rem;
  line-height: 1.6;
  color: rgba(243, 238, 230, 0.85);
  margin-bottom: var(--space-5);
}

.statement-facts {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  border-top: var(--border-hairline-inv);
  padding-top: var(--space-4);
}

.statement-fact {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  color: var(--paper);
}

.statement-fact__bullet {
  color: var(--sindoor);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  font-optical-sizing: none;
  font-variation-settings: "opsz" var(--display-opsz);
}

.statement-visuals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.statement-visual-item--tall {
  grid-row: span 2;
}

@media (max-width: 900px) {
  .statement-band__grid {
    grid-template-columns: 1fr;
  }
  .statement-visuals {
    margin-top: var(--space-4);
  }
}

/* ==========================================================================
   3. Home Page — Studios Teaser & Final CTA (DESIGN §5)
   ========================================================================== */
.studios-teaser__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-5);
}

.studio-card {
  border: var(--border-hairline);
  padding: var(--space-5);
  background-color: var(--bone);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-4);
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.studio-card:hover {
  background-color: var(--paper);
  transform: translateY(-2px);
}

.studio-card__num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--sindoor);
  font-optical-sizing: none;
  font-variation-settings: "opsz" var(--display-opsz);
}

.studio-card__name {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 750;
  color: var(--ink);
  margin-top: 4px;
  font-optical-sizing: none;
  font-variation-settings: "opsz" var(--display-opsz);
}

.studio-card__area {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 2px;
}

.studio-card__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: var(--border-hairline);
  padding-top: var(--space-3);
}

/* Final CTA Band (DESIGN §2: Optional Sindoor / High Impact Band) */
.final-cta {
  background-color: var(--ink);
  color: var(--paper);
  text-align: center;
  padding-block: clamp(5rem, 9vw, 9rem);
  position: relative;
}

.final-cta__content {
  max-width: 720px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.final-cta__title {
  font-size: clamp(2.2rem, 5vw, 4.25rem);
  line-height: 1.05;
  color: var(--paper);
}

/* ==========================================================================
   4. Services Page Layout & FAQ Details (CONTENT §Services, FAQ)
   ========================================================================== */
.services-header {
  border-bottom: var(--border-hairline);
  padding-bottom: var(--space-6);
  margin-bottom: var(--space-6);
}

.services-notice {
  background-color: var(--bone);
  border-left: 3px solid var(--sindoor);
  padding: var(--space-4);
  margin-block: var(--space-5);
  font-size: 0.95rem;
  color: var(--ink);
}

/* Native Accessible FAQ <details> (CONTENT §FAQ, DESIGN §4) */
.faq-list {
  display: flex;
  flex-direction: column;
  margin-top: var(--space-5);
  border-top: var(--border-hairline);
}

.faq-item {
  border-bottom: var(--border-hairline);
  transition: background-color var(--transition-fast);
}

.faq-item summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) 0;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  font-optical-sizing: none;
  font-variation-settings: "opsz" var(--display-opsz);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-icon {
  font-family: var(--font-text);
  font-size: 1.25rem;
  color: var(--sindoor);
  transition: transform var(--transition-fast);
}

.faq-item[open] .faq-icon {
  transform: rotate(45deg);
}

.faq-content {
  padding-bottom: var(--space-4);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 65ch;
}

/* ==========================================================================
   5. 404 Page (CONTENT §404, DESIGN §1)
   ========================================================================== */
.page-404 {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-block: var(--space-8);
}

.page-404__content {
  max-width: 580px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.page-404__numeral {
  font-family: var(--font-display);
  font-size: clamp(6rem, 18vw, 12rem);
  font-weight: 800;
  line-height: 0.8;
  color: var(--sindoor);
  letter-spacing: -0.04em;
  font-optical-sizing: none;
  font-variation-settings: "opsz" var(--display-opsz);
  -webkit-text-stroke: 0.012em currentColor;
}

.page-404__links {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-3);
  flex-wrap: wrap;
  justify-content: center;
}

@media (max-width: 600px) {
  .page-404__links .btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }
}
