/* =====================================================================
   OSE · Contact page · styles/pages/lien-he.css
   ---------------------------------------------------------------------
   Page layout only for /lien-he/: how the components sit on the page.
   Semantic and component tokens only, private knobs use --_. Loaded
   after styles/pages/inner.css. Static page: no scenes, no reveals.

   Page
     night band (.lien-he-top, data-surface="night")
       page header (.page-header--night --lg): breadcrumb, label, h1,
         lead, facts row
       01 · Kênh liên hệ: three large tap targets (Zalo · Gọi · Messenger)
         on hairlines, one under another on phones, three columns from
         48em
     02 · Đăng ký tư vấn (cream): the form (#form, other pages link to
       /lien-he/#form) beside its header and "Bắt đầu thế nào" from 64em
     03 · Địa chỉ (cream, ruled header): facts + Google Maps link beside
       the embedded map from 64em
   Grid      the container (--layout-max); two-part layouts are two equal
             halves from 64em, the channels three equal columns from 48em.
   Aurora    none here: only the shared focus ring and link hovers.
   ===================================================================== */

@layer page {
  /* ---- Night band: page header + channels ---------------------------- */
  /* The night page header pads its own bottom; the channels carry on
     straight under it, on the same surface (one painted background, so
     the two never show a seam). Beats inner.css's .page-header + .section. */
  .page-header + .lien-he-channels {
    padding-block-start: var(--space-none);
  }

  .lien-he-channels__title {
    margin-block-end: var(--space-stack-sm);
    color: var(--section-header-label-color);
    font: var(--section-header-label-font);
    letter-spacing: var(--section-header-label-tracking);
    text-transform: var(--section-header-label-case);
  }

  /* Phones: one row per channel between hairlines. From 48em: three
     columns, a hairline above each (like the feature list). */
  .lien-he-channels__list {
    display: grid;
    padding: 0;
    list-style: none;
    border-block-end: var(--border-width-hairline) solid var(--color-border);
  }

  @media (min-width: 48em) {
    .lien-he-channels__list {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      column-gap: var(--space-inline-xl);
      border-block-end: 0;
    }
  }

  .lien-he-channels__item {
    display: grid;
    min-inline-size: 0;
    border-block-start: var(--border-width-hairline) solid var(--color-border);
  }

  /* One channel = one link: mark · name over its number · arrow. The
     whole row is the tap target (well over 44px tall). */
  .lien-he-channel {
    display: grid;
    grid-template-columns: var(--size-icon-lg) minmax(0, 1fr) var(--size-icon-md);
    align-items: center;
    column-gap: var(--space-inline-sm);
    min-block-size: var(--size-control-lg);
    padding-block: var(--space-inset-lg);
    border-radius: var(--radius-indicator);
    color: var(--color-text);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }

  /* Official Zalo / Messenger logos: unmodified, icon-sized, smaller than
     the OSE logo (reference/third-party-logos.md). */
  .lien-he-channel__logo {
    inline-size: var(--size-icon-lg);
    block-size: var(--size-icon-lg);
  }

  /* No phone brand mark exists: the shared phone glyph, in the text colour. */
  .lien-he-channel__icon {
    inline-size: var(--size-icon-lg);
    block-size: var(--size-icon-lg);
    background-color: currentColor;
    -webkit-mask: var(--icon-phone) center / contain no-repeat;
    mask: var(--icon-phone) center / contain no-repeat;
    forced-color-adjust: none;
  }

  .lien-he-channel__text {
    display: grid;
    gap: var(--space-stack-3xs);
    min-inline-size: 0;
  }

  /* Hover: the link's lilac underline under the name, as on every link. */
  .lien-he-channel__name {
    font: var(--text-title);
    letter-spacing: var(--text-title-tracking);
    text-decoration-line: underline;
    text-decoration-color: var(--color-none);
    text-decoration-thickness: var(--border-width-thick);
    text-underline-offset: var(--underline-offset);
    transition: text-decoration-color var(--motion-fast) var(--ease-standard);
  }

  .lien-he-channel__value {
    color: var(--color-text-muted);
    font: var(--text-data);
    letter-spacing: var(--text-data-tracking);
    overflow-wrap: anywhere;
  }

  .lien-he-channel__arrow {
    inline-size: var(--size-icon-md);
    block-size: var(--size-icon-md);
    background-color: currentColor;
    -webkit-mask: var(--icon-arrow-right) center / contain no-repeat;
    mask: var(--icon-arrow-right) center / contain no-repeat;
    forced-color-adjust: none;
    transition: transform var(--motion-fast) var(--ease-standard);
  }

  .lien-he-channel:focus-visible {
    box-shadow: var(--focus-ring);
  }

  @media (hover: hover) {
    .lien-he-channel:hover .lien-he-channel__name {
      text-decoration-color: var(--color-accent);
    }

    .lien-he-channel:hover .lien-he-channel__arrow {
      transform: translateX(var(--motion-distance-xs));
    }
  }

  .lien-he-channel:active .lien-he-channel__name {
    color: var(--color-text-muted);
    text-decoration-color: var(--color-accent);
  }

  /* "Liên hệ để nhận học phí và lịch học.": a fact, as a mono data line. */
  .lien-he-channels__note {
    margin-block-start: var(--space-stack-lg);
    color: var(--color-text-muted);
    font: var(--text-data);
    letter-spacing: var(--text-data-tracking);
  }

  /* ---- 02 · Đăng ký tư vấn -------------------------------------------- */
  /* Phones and tablets: header, form, next steps. From 64em: header and
     next steps in the first half, the form in the second. */
  .lien-he-signup {
    display: grid;
    grid-template-areas:
      "intro"
      "form"
      "after";
    row-gap: var(--space-stack-xl);
  }

  @media (min-width: 64em) {
    .lien-he-signup {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      grid-template-rows: auto 1fr;
      grid-template-areas:
        "intro form"
        "after form";
      column-gap: var(--space-inline-2xl);
      align-items: start;
    }
  }

  .lien-he-signup__intro {
    grid-area: intro;
    margin-block-end: var(--space-none);
  }

  .lien-he-signup__after {
    grid-area: after;
    display: grid;
    gap: var(--space-stack-md);
  }

  .lien-he-signup__subtitle {
    color: var(--section-header-label-color);
    font: var(--section-header-label-font);
    letter-spacing: var(--section-header-label-tracking);
    text-transform: var(--section-header-label-case);
  }

  /* Fields stay a comfortable form width, even on tablets. */
  .lien-he-form {
    grid-area: form;
    display: grid;
    gap: var(--space-stack-md);
    inline-size: 100%;
    max-inline-size: var(--layout-dialog);
  }

  /* The button keeps its own width from 48em; the status box spans. */
  .lien-he-form__actions {
    display: grid;
    gap: var(--space-stack-sm);
    justify-items: start;
    margin-block-start: var(--space-stack-xs);
  }

  .lien-he-form__status {
    justify-self: stretch;
  }

  /* ---- 03 · Địa chỉ ---------------------------------------------------- */
  .lien-he-visit {
    display: grid;
    row-gap: var(--space-stack-xl);
  }

  @media (min-width: 64em) {
    .lien-he-visit {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      column-gap: var(--space-inline-2xl);
      align-items: start;
    }
  }

  .lien-he-visit__info {
    display: grid;
    gap: var(--space-stack-md);
    justify-items: start;
  }

  /* Facts as data: a hairline above each row, the term as a mono label. */
  .lien-he-facts {
    display: grid;
    inline-size: 100%;
    border-block-end: var(--border-width-hairline) solid var(--color-border);
  }

  .lien-he-facts__row {
    display: grid;
    gap: var(--space-stack-3xs);
    padding-block: var(--space-inset-sm);
    border-block-start: var(--border-width-hairline) solid var(--color-border);
  }

  /* From 48em: term in the first third, value across the other two. */
  @media (min-width: 48em) {
    .lien-he-facts__row {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      column-gap: var(--space-inline-lg);
      align-items: baseline;
    }

    .lien-he-facts__value {
      grid-column: span 2;
    }
  }

  .lien-he-facts__term {
    color: var(--color-text-muted);
    font: var(--text-data);
    letter-spacing: var(--text-data-tracking);
  }

  .lien-he-facts__value {
    color: var(--color-text);
    overflow-wrap: anywhere;
  }

  /* The map fills the image frame's ratio box (styles/components/image-frame.css). */
  .lien-he-map {
    display: block;
    inline-size: 100%;
    block-size: 100%;
    border: 0;
  }
}
