/* ============================================================
   Container — shared responsive layout constraint
   Provides 1024px max content width with responsive side padding.
   Import this in any component that uses the .container class.
   ============================================================ */

.container {
  position:   relative;
  width:      100%;
  max-width:  calc(1024px + 160px); /* 1024px content + 80px × 2 */
  padding:    0 80px;
  margin:     0 auto;
  box-sizing: border-box;
}

/* Tablet (≤991px): 60px sides */
@media (max-width: 991px) {
  .container {
    padding: 0 60px;
  }
}

/* Landscape mobile (≤767px): 2rem sides */
@media (max-width: 767px) {
  .container {
    padding: 0 2rem;
  }
}



/* ============================================================
   Wide container — 1360px content + 48px side padding
   Used for full-bleed section content blocks (slider, big cards)
   that need to be wider than the standard 1024px text container.
   ============================================================ */

.container-wide {
  width:      100%;
  max-width:  calc(1384px + 96px);   /* 1384px content + 48px × 2 */
  padding:    0 3rem;                /* 48px sides */
  margin:     0 auto;
  box-sizing: border-box;
}

/* Tablet (≤991px): 16px less than .container (60px → 44px) */
@media (max-width: 991px) {
  .container-wide {
    padding: 0 44px;
  }
}

/* Landscape mobile (≤767px): 16px less than .container (2rem → 1rem) */
@media (max-width: 767px) {
  .container-wide {
    padding: 0 1rem;
  }
}


/* ============================================================
   AirCustomizeSection — "Deep customizations" section.

   The card shell, floating tab nav, media frame and content
   column all come from the shared TabbedCard primitive. The media
   visuals (shared TAB_BG + per-tab inner svg) live in
   AirCustomizeSection.visuals.tsx. This file only carries the
   content-column layout (copy + company + bottom-pinned CTA).
   ============================================================ */

.air-customize { background: var(--background); }

/* Header uses the shared .section-header convention (section.css). */


/* ---- Visual frame -----------------------------------------
   Customize diagrams are separate centered SVG layers over a shared
   background. Let the background frame keep the card's full height on
   desktop; the SVG diagrams still scale from the frame's smaller dimension
   via cqmin, so only the chart artwork shrinks when width gets constrained. */

@media (min-width: 992px) {
  .air-customize__card {
    min-height: 800px;   /* Figma h-800 (node 4021:8951) */
    display:flex;

  }
  .air-customize__card .tabbed-card__panel{
    flex: 1 1 auto;
  }

  .tabbed-card__media.air-customize__media {
    align-self: stretch;
  }

  .air-customize__media .tabbed-card__frame {
    height:       100%;
    aspect-ratio: unset;
  }
}


/* ============================================================
   Content styling

   The content-column layout (vertical centering, per-panel crossfade,
   bottom-pinned footer) lives in the TabbedCard primitive. This file
   only styles what the section puts inside each panel: the copy, the
   company attribution, and the CTA.
   ============================================================ */

.air-customize__copy {
  display:        flex;
  flex-direction: column;
  gap:            var(--spacing-3);
}

.air-customize__heading {
  margin:      0;
  font-size:   var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-2xl);
  color:       var(--foreground);
}

.air-customize__body {
  margin:      0;
  font-size:   var(--font-size-xl);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-xl);
  color:       var(--foreground);
}


/* ---- Company attribution ---------------------------------- */

.air-customize__company {
  display:     flex;
  align-items: center;
  gap:         var(--spacing-3);
}

.air-customize__avatar {
  flex-shrink:   0;
  width:         60px;
  height:        60px;
  border-radius: var(--radius-full);
  background:    var(--muted-foreground);
}

.air-customize__author {
  display:        flex;
  flex-direction: column;
  gap:            2px;
}

.air-customize__author-name {
  font-size:   var(--font-size-sm);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-sm);
  color:       var(--foreground);
  white-space: nowrap;
}

.air-customize__author-meta {
  font-size:   var(--font-size-sm);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-sm);
  color:       var(--muted-foreground);
  white-space: nowrap;
}


/* ---- Full-width CTA --------------------------------------- */

.air-customize__cta.btn {
  width:           100%;
  justify-content: center;
}

/* In the stacked layout (≤991px) the CTA is a centered auto-width pill,
   not full-width — the stack footer centers it. */
@media (max-width: 991px) {
  .air-customize__cta.btn { width: auto; }
}


/* ============================================================
   Mobile (≤767px)
   ============================================================ */

@media (max-width: 767px) {
  .air-customize__heading {
    font-size:   var(--font-size-xl);
    line-height: var(--line-height-xl);
  }

  .air-customize__body {
    font-size:   var(--font-size-lg);
    line-height: var(--line-height-lg);
  }
}


/* ============================================================
   Stacked layout (≤991px) — author block sits tighter (Figma gap 0).
   ============================================================ */

@media (max-width: 991px) {
  .air-customize__author { gap: var(--spacing-0); }
}



/* ============================================================
   Design refresh — docs/design-refresh-rules.md (BG-4). A section card, like
   the homepage's practice areas: the card itself comes from `refresh.css`;
   the white TabbedCard and its nav pill already sit on it (BG-8).
   ============================================================ */

/* Panel title: Rowan Semibold 24/32 (TY-3). */
[data-design="refresh"] .air-customize__heading {
  font-family: var(--font-family-serif);
  font-weight: 600;   /* no semibold token */
}

@media (max-width: 767px) {
  /* TY-3's size holds on phones; the stock heading steps to 20/28. */
  [data-design="refresh"] .air-customize__heading {
    font-size:   var(--font-size-2xl);
    line-height: var(--line-height-2xl);
  }
}

/* ============================================================
   TabbedCard — framed tabbed card with a floating top-right nav.

   Layout + sizing are lifted from the homepage SolutionSection
   step-by-step panel (the reference with correct calculations):
   a content-driven media frame on the left + a content column on
   the right, with the nav absolutely positioned top-right.
   ============================================================ */

.tabbed-card {
  position:      relative;   /* bounds the absolutely-positioned nav */
  background:    var(--card);
  border-radius: var(--radius-lg);   /* 24px */
  width:         100%;
  box-sizing:    border-box;
  overflow:      hidden;
}


/* ---- Nav — floats top-right within the content column ----- */

/* The nav fills the content column's inner box (its width minus the
   1rem/2rem side padding), so the width TabsOrDropdown measures against
   is exactly the space the tabs have. When the strip can't fit it, it
   collapses to a dropdown. left/right mirror .tabbed-card__content's
   horizontal padding. pointer-events are re-enabled only on the control
   so the empty strip above the heading doesn't eat clicks. */
.tabbed-card__nav {
  position:        absolute;
  top:             2rem;
  left:            1rem;
  right:           2rem;
  z-index:         2;
  display:         flex;
  justify-content: flex-end;
  pointer-events:  none;
}

.tabbed-card__tod {
  flex:            1;
  display:         flex;
  justify-content: flex-end;
}

.tabbed-card__tod > .seg-tabs,
.tabbed-card__tod > .pill-drop {
  pointer-events: auto;
}


/* ---- Panel — media + content row ------------------------- */

.tabbed-card__panel {
  display:        flex;
  container-type: inline-size;   /* enables cqi units for the frame */
}


/* ---- Media area (left ~2/3) ------------------------------ */

.tabbed-card__media {
  padding:    1rem;
  display:    flex;
  flex:       0 1 auto;     /* content-driven width; the frame dictates size */
  align-self: flex-start;
  min-width:  50%;
}

.tabbed-card__frame {
  --max-h:          calc(100vh - var(--navheight, 0px) - 5rem - 2rem);
  width:            min(66.666cqi, calc(var(--max-h) * 806 / 768));
  min-width:        100%;
  max-width:        806px;
  height:           auto;
  aspect-ratio:     806 / 768;
  border-radius:    12px;
  overflow:         hidden;
  position:         relative;
  box-shadow:       inset 0 0 0 0.5px rgba(40, 40, 37, 0.2);
  background:       var(--accent) center / cover no-repeat;
  /* `size` container so a visual's inner content can be sized in cqmin
     (a % of the frame's smaller dimension) and scale fluidly with it. */
  container-type:   size;
}

/* Crossfade visual stack — layers stacked, active one fades in.
   Centered so an inner svg sized in cqmin sits in the middle of the
   frame; a full-bleed <img> fills it via its own object-fit. */
.tabbed-card__visual {
  position:        absolute;
  inset:           0;
  display:         flex;
  align-items:     center;
  justify-content: center;
  opacity:         0;
  pointer-events:  none;
  transition:      opacity 400ms ease;
}

.tabbed-card__visual[data-active="true"] {
  opacity:        1;
  pointer-events: auto;
}


/* ---- Content column (right ~1/3) ------------------------- */

.tabbed-card__content {
  position:       relative;   /* positioning context for the nav */
  display:        flex;
  flex-direction: column;
  flex:           1;
  align-self:     stretch;
  box-sizing:     border-box;
  /* Symmetric 5rem top/bottom so content clears the absolute nav
     (~38px + 2rem) and reads as visually centered. */
  padding:        5rem 2rem 5rem 1rem;
  min-width:      340px;
}


/* ---- Content column inner: stacked panels + bottom footer ----
   Two rows — the panel area expands (1fr) and centers its content,
   the footer sits on the bottom (auto). Because a 1fr track can't
   collapse below its content, the footer always reserves its space,
   so when the card gets short the copy and footer stack with a gap
   instead of overlapping. */

.tabbed-card__col {
  flex:               1;          /* fill the content column height */
  min-height:         0;
  display:            grid;
  grid-template-rows: 1fr auto;
}

/* All panel-contents share one grid cell so the column is as tall as
   the tallest panel — the card height never jumps between tabs. */
.tabbed-card__content-stack {
  grid-row:      1;            /* the auto-expanding row */
  align-self:    center;       /* center the content within it */
  padding-block: var(--spacing-6);  /* equal breathing room top & bottom */
  display:       grid;         /* stack every panel in one cell */
}

.tabbed-card__panel-content {
  grid-area:       1 / 1;        /* stack every panel in the same cell */
  display:         flex;
  flex-direction:  column;
  justify-content: center;       /* center content within the cell height */
  gap:             2rem;          /* 32px between copy and any attribution */
  min-width:       0;
  opacity:         0;
  pointer-events:  none;
  transition:      opacity 250ms ease;
}

.tabbed-card__panel-content[data-active="true"] {
  opacity:        1;
  pointer-events: auto;
}

.tabbed-card__footer {
  grid-row: 2;                 /* pinned to the bottom row */
}


/* ============================================================
   Stacked layout — tablet & mobile (≤991px)

   The tabbed panel is replaced by a no-tabs stack: each panel shows
   its visual, a label badge, then its content; the footer renders
   once at the bottom. The white card shell (.tabbed-card) wraps it.
   ============================================================ */

.tabbed-card__stack { display: none; }

@media (max-width: 991px) {
  .tabbed-card__panel { display: none; }
  .tabbed-card__stack { display: block; }
  /* The "3 sections" card has 8px top/bottom padding around the stack. */
  .tabbed-card { padding-block: var(--spacing-2); }   /* 8px */
}

/* Media: full-width framed visual. Reuses the .tabbed-card__frame chrome
   (border, radius, `size` container for cqmin diagrams) but is full-width
   with a fixed height per breakpoint instead of the desktop aspect ratio. */
.tabbed-card__stack-media {
  padding: var(--spacing-2) var(--spacing-4);   /* 8px / 16px */
}

.tabbed-card__stack .tabbed-card__frame {
  width:           100%;
  min-width:       0;
  max-width:       none;
  height:          360px;          /* tablet default; mobile overrides below */
  aspect-ratio:    auto;
  /* The visual is placed directly in the frame (no crossfade wrapper here),
     so center it like the desktop .tabbed-card__visual does. */
  display:         flex;
  align-items:     center;
  justify-content: center;
}

/* Body: label badge, then the panel's content. */
.tabbed-card__stack-body {
  display:        flex;
  flex-direction: column;
  gap:            var(--spacing-9);   /* 36px */
  padding:        var(--spacing-6) var(--spacing-8) 3rem;   /* 24 / 32 / 48 */
}

.tabbed-card__stack-label {
  align-self:      flex-start;
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  height:          26px;
  min-width:       26px;
  padding:         var(--spacing-1) 0.625rem;   /* 4px / 10px */
  background:      var(--background);            /* cream #F5F0E7 — matches the Figma soft badge */
  border-radius:   var(--radius-full);
  font-size:       var(--font-size-xs);
  font-weight:     var(--font-weight-medium);
  line-height:     var(--line-height-xs);
  color:           var(--foreground);
  white-space:     nowrap;
}

/* Footer once at the bottom, centered (overrides the desktop grid-row). */
.tabbed-card__stack-footer {
  display:         flex;
  justify-content: center;
  padding:         0 var(--spacing-4) 3rem;   /* 0 / 16 / 48 */
}


/* ============================================================
   Mobile (≤767px) — shorter visual frame per the mobile spec.
   ============================================================ */

@media (max-width: 767px) {
  .tabbed-card__stack .tabbed-card__frame { height: 297px; }
}

