/* ============================================================
   TYPOGRAPHY PAGE — components
   ============================================================ */

/* ----------------------------------------------------------
   TYPE SPEC GRID — two-column "Use for / Personality" spec
   ---------------------------------------------------------- */

.type-spec-grid {
  display: flex;
  flex-direction: row;
  gap: 16px;
}

.type-spec-col {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 4px;
}

.type-spec-col--bordered {
  border-right: 1px solid rgba(0, 0, 0, 0.4);
  padding-right: 16px;
}

.type-spec-col__title {
  font-family: var(--font-beausite);
  font-weight: 500;
  font-size: var(--text-label);
  line-height: var(--lh-label);
  color: var(--color-black);
}

.type-spec-col__desc {
  font-family: var(--font-beausite);
  font-weight: 400;
  font-size: var(--text-label);
  line-height: var(--lh-label);
  color: #737373;
}

/* ----------------------------------------------------------
   TYPE DEMO GRID — two-column typesetting cards
   ---------------------------------------------------------- */

.type-demo-grid {
  display: flex;
  flex-direction: row;
  gap: 16px;
}

.type-demo-card {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.type-demo-visual {
  height: 280px;
  overflow: hidden;
}

.type-demo-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.type-demo-caption {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.type-demo-caption__title {
  font-family: var(--font-beausite);
  font-weight: 500;
  font-size: var(--text-label);
  line-height: var(--lh-label);
  color: var(--color-black);
}

.type-demo-caption__desc {
  font-family: var(--font-beausite);
  font-weight: 400;
  font-size: var(--text-label);
  line-height: var(--lh-label);
  color: #737373;
}

/* picture: block to avoid inline gaps */
.view--typography picture { display: block; }

/* Typesetting spec intro strips: shown at desktop + tablet, hidden at mobile */
.type-spec-intro-img { display: block; }
.img-cell picture { height: 100%; }
.type-demo-visual picture { height: 100%; }

/* ----------------------------------------------------------
   TYPESETTING SPECIMEN BLOCKS — label row + image
   ---------------------------------------------------------- */

.typeset-spec-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Hidden at mobile — mobile-only cards handle the spec labels */
@media (max-width: 440px) {
  .typeset-spec-block { display: none; }
}

.typeset-spec-label {
  display: flex;
  gap: var(--col-gap);
  align-items: flex-start;
  font-family: var(--font-beausite);
  font-weight: 400;
  font-size: 14px;
  line-height: 18px;
  letter-spacing: -0.03em;
  color: #737373;
}

.typeset-spec-label__left {
  flex: 0 0 var(--label-col);
  display: flex;
  flex-direction: column;
}

.typeset-spec-label__right {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.typeset-spec-label__props,
.typeset-spec-label__vals {
  display: flex;
  flex-direction: column;
}

/* Mobile-only typesetting cards: hidden at desktop/tablet */
.type-demo-card--mob-only { display: none; }

/* Narrow card typography info header (mobile-only component) */
.type-demo-narrow-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-family: var(--font-beausite);
  font-size: 13px;
  line-height: 18px;
  letter-spacing: -0.01em;
}

.type-demo-narrow-header__left {
  display: flex;
  flex-direction: column;
}

.type-demo-narrow-header__name {
  font-weight: 500;
  color: var(--color-black);
}

.type-demo-narrow-header__font {
  font-weight: 400;
  color: #737373;
}

.type-demo-narrow-header__right {
  display: flex;
  flex-direction: column;
  text-align: right;
  font-weight: 400;
  color: var(--color-black);
}

/* ----------------------------------------------------------
   TYPE DON'T ROWS — three-column incorrect usage cards
   ---------------------------------------------------------- */

.type-dont-row {
  display: flex;
  flex-direction: row;
  gap: 16px;
  align-items: flex-start;
}

.type-dont-card {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.type-dont-card__visual img {
  width: 100%;
  display: block;
}

.type-dont-card__caption {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.type-dont-card__title {
  font-family: var(--font-beausite);
  font-weight: 500;
  font-size: var(--text-label);
  line-height: var(--lh-label);
  color: var(--color-black);
}

.type-dont-card__desc {
  font-family: var(--font-beausite);
  font-weight: 400;
  font-size: var(--text-label);
  line-height: var(--lh-label);
  color: #737373;
}

/* ----------------------------------------------------------
   CTA TERTIARY — full-width bordered link row
   ---------------------------------------------------------- */

.cta-tertiary {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border-top: 1px solid var(--color-black);
  padding: 10px 0;
  background: none;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

/* Orange wipe fill: sweeps left → right on hover */
.cta-tertiary::before {
  content: '';
  position: absolute;
  top: -1px; /* covers the 1px top border */
  left: 0;
  right: 0;
  bottom: 0;
  background: #FE7141;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s cubic-bezier(0.65, 0, 0.35, 1);
  z-index: 0;
}

.cta-tertiary:hover::before {
  transform: scaleX(1);
}

.cta-tertiary__label {
  flex: 1;
  font-family: var(--font-beausite);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--color-black);
  text-align: left;
  position: relative;
  z-index: 1;
  transition: transform 0.45s cubic-bezier(0.65, 0, 0.35, 1);
}

.cta-tertiary:hover .cta-tertiary__label {
  transform: translateX(8px);
}

.cta-tertiary__icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5px; /* matches Figma inset: 16.67% of 15.188px ≈ 2.53px */
  overflow: hidden;
  position: relative;
  z-index: 1;
  transition: transform 0.45s cubic-bezier(0.65, 0, 0.35, 1);
}

.cta-tertiary:hover .cta-tertiary__icon {
  transform: translateX(-8px);
}

/* Disable hover animation on touch breakpoints */
@media (max-width: 999px) {
  .cta-tertiary::before { transition: none; }
  .cta-tertiary:hover::before { transform: scaleX(0); }
  .cta-tertiary__label { transition: none; }
  .cta-tertiary:hover .cta-tertiary__label { transform: none; }
  .cta-tertiary__icon { transition: none; }
  .cta-tertiary:hover .cta-tertiary__icon { transform: none; }
}

.cta-tertiary__icon img {
  width: 100%;
  height: 100%;
  display: block;
}

/* ----------------------------------------------------------
   IMAGE ROW — flex 2-col image pairs
   ---------------------------------------------------------- */

.img-row {
  display: flex;
  gap: 16px;
}

.img-cell {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.img-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.img-cell--h280 {
  height: 280px;
}

.img-cell--h303 {
  height: 303px;
}

.img-cell--h451 {
  height: 451px;
}

.img-cell--billboard {
  height: 315px;
}

/* ----------------------------------------------------------
   MOTION PLACEHOLDER — grey video placeholder boxes
   ---------------------------------------------------------- */

.motion-placeholder {
  background: rgba(0, 0, 0, 0.08);
  flex: 1;
  min-width: 0;
}

.motion-placeholder--h437 {
  height: 437px;
}

.motion-placeholder--h209 {
  height: 209px;
}

.motion-placeholder--h451 {
  height: 451px;
}

.motion-row {
  display: flex;
  gap: 16px;
}

/* ----------------------------------------------------------
   WEB HERO — centered mockup in tall container
   ---------------------------------------------------------- */

.web-hero-wrap {
  width: 100%;
  height: 451px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.04);
}

.web-hero-inner {
  width: 459px;
  height: 286.875px;
  overflow: hidden;
}

.web-hero-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ----------------------------------------------------------
   TYPE SPECIMEN BLOCKS — Sections 02, 03, 07
   ---------------------------------------------------------- */

.type-specimen {
  display: flex;
  flex-direction: column;
  gap: var(--col-gap);
}

/* Hero — colored background with oversized letter display */
.type-specimen-hero {
  aspect-ratio: 933 / 451;
  position: relative;
  border-top: 1px solid;
  overflow: hidden;
  container-type: inline-size;
}

.type-specimen-hero--orange { background: #FE7141; border-color: #000; color: #000; }
.type-specimen-hero--purple { background: #C4AAFF; border-color: #000; color: #000; }
.type-specimen-hero--black  { background: #000;    border-color: rgba(255,255,255,.4); color: #fff; }

.type-specimen-hero__label {
  position: absolute;
  top: 16px;
  left: 26px;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0;
  color: inherit;
}

.type-specimen-hero__letters {
  position: absolute;
  left: 16px;
  bottom: -0.08em;
  font-size: 56cqw;
  font-weight: 500;
  line-height: 1;
  color: inherit;
  white-space: nowrap;
}

/* Section 07 variant: two typefaces side by side */
.type-specimen-hero__letters--split {
  left: 16px;
  right: 16px;
  bottom: -0.08em;
  display: flex;
  gap: 0;
  white-space: nowrap;
}

.type-specimen-hero__letters--split > span {
  flex: 1;
  overflow: hidden;
  font-size: 56cqw;
  font-weight: 500;
  line-height: 1;
}

/* Detail rows — dark panels with glyph showcases */
.type-specimen-details {
  display: flex;
  gap: var(--col-gap);
}

.type-specimen-cell {
  flex: 1;
  min-width: 0;
  background: #000;
  border-top: 1px solid rgba(255,255,255,.4);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  container-type: inline-size;
}

.type-specimen-cell__label {
  font-size: 13px;
  line-height: 1;
  color: #fff;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.25);
  flex-shrink: 0;
}

.type-specimen-cell__sm {
  font-size: 13px;
  line-height: 1.5;
  color: #fff;
}

.type-specimen-cell__lg {
  font-size: 11cqw;
  font-weight: 500;
  line-height: 1.1;
}

.type-specimen-cell__nums {
  font-size: 15cqw;
  font-weight: 500;
  line-height: 1.15;
  margin-top: auto;
}

.type-specimen-cell__aabb {
  font-size: 38cqw;
  font-weight: 500;
  line-height: 1;
  margin-top: auto;
  margin-bottom: auto;
}

.type-specimen-cell__headline {
  font-size: 9cqw;
  font-weight: 500;
  line-height: 1.1;
  color: #C4AAFF;
}

.type-specimen-cell__body {
  font-size: 13px;
  line-height: 1.5;
  color: #fff;
  margin-top: auto;
}

/* EVERYDAY USAGE 2×2 GRID */
.type-everyday-grid {
  display: flex;
  flex-direction: column;
  gap: var(--col-gap);
}

/* ----------------------------------------------------------
   TYPE SPECIMEN HERO — constrain to Figma 451px at desktop
   Hero images are 1866×942 (471px natural height at 933px width).
   Figma crops to 933×451; overflow:hidden clips the 20px bottom.
   ---------------------------------------------------------- */

@media (min-width: 1000px) {
  .view--typography .media-stack > .logo-img-block:first-child {
    aspect-ratio: 933 / 451;
  }
}

/* ----------------------------------------------------------
   TABLET (441px – 999px)
   ---------------------------------------------------------- */

@media (max-width: 999px) {

  .img-cell--h303 {
    height: 281px;
  }

  /* Billboard cells: Figma tablet = 426×293px */
  .img-cell--billboard {
    height: 293px;
  }
}

/* ----------------------------------------------------------
   MOBILE (≤ 440px)
   ---------------------------------------------------------- */

@media (max-width: 440px) {

  /* Media stack: 16px inset wrapper for grouped content */
  .media-stack {
    padding: 0 16px;
  }

  .img-cell--h303 {
    height: 280px;
  }

  /* Billboard cells: Figma mobile = 361×280px stacked */
  .img-cell--billboard {
    height: 280px;
  }

  /* Image rows: stack to 1-col (parent handles margin) */
  .img-row {
    flex-direction: column;
  }

  .img-cell {
    flex: none;
    width: 100%;
  }

  /* Motion rows: stack to 1-col (parent handles margin) */
  .motion-row {
    flex-direction: column;
  }

  /* Type demo grid: stack to 1-col, add 16px inset */
  .type-demo-grid {
    flex-direction: column;
    padding: 0 16px;
  }

  /* Type don't rows: stack to 1-col, add 16px inset */
  .type-dont-row {
    flex-direction: column;
    padding: 0 16px;
  }

  /* Type specimen: stack detail cells, add 16px inset */
  .type-specimen-details {
    flex-direction: column;
    padding: 0 16px;
  }

  .type-specimen-hero__label {
    font-size: 11px;
    left: 12px;
    top: 12px;
  }

  /* Everyday 2×2 grid: add 16px inset */
  .type-everyday-grid {
    padding: 0 16px;
  }

  /* Section spacing: 40px gap between header and content */
  .view--typography .section-block { gap: 40px; }

  /* Use For / Personality: stack vertically */
  .type-spec-grid { flex-direction: column; }
  .type-spec-col--bordered {
    border-right: none;
    padding-right: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.4);
    padding-bottom: 16px;
  }

  /* Type demo visuals: let mob image natural height control */
  .type-demo-visual { height: auto; }

  /* Typesetting intro strips: hide at mobile (mobile cards handle it) */
  .type-spec-intro-img { display: none; }

  /* Mobile-only typesetting cards: show as column card */
  .type-demo-card--mob-only {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0 16px;
    width: 100%;
  }

  /* Web hero: scale inner to fit container width */
  .web-hero-wrap {
    height: auto;
    padding: 24px 0;
  }

  .web-hero-inner {
    width: 100%;
    height: auto;
    aspect-ratio: 459 / 286.875;
  }
}
