/* Mobile composition overrides for the public site. */
@media (max-width: 720px) {
  .container {
    width: min(calc(100% - 32px), var(--container));
  }

  /* Header: keep the brand readable without using a large part of the viewport. */
  .header-inner {
    min-height: 72px;
    gap: 12px;
  }

  .logo {
    min-width: 0;
    gap: 8px;
  }

  .logo-mark {
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
  }

  .logo strong {
    font-size: 16px;
    line-height: 1.05;
    letter-spacing: .055em;
    white-space: nowrap;
  }

  .logo small {
    margin-top: 3px;
    font-size: 11px;
    line-height: 1.2;
  }

  .burger {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
  }

  .main-nav {
    top: 72px;
    left: 16px;
    right: 16px;
  }

  /* General mobile rhythm. */
  .section {
    padding: 40px 0;
  }

  .section-heading {
    margin-bottom: 24px;
  }

  .section-heading .eyebrow {
    margin-bottom: 8px;
  }

  /* Hero: use horizontal space before adding vertical height. */
  .hero {
    padding: 20px 0 28px;
  }

  .hero-grid {
    gap: 18px;
  }

  .hero-actions {
    gap: 10px;
    margin-top: 14px;
  }

  .hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    width: 100%;
    max-width: none;
    margin-top: 20px;
  }

  .stat-item {
    min-width: 0;
    padding: 0 10px;
    border-left: 1px solid var(--line);
    text-align: center;
    align-content: start;
  }

  .stat-item:first-child {
    border-left: 0;
    padding-left: 0;
  }

  .stat-item:last-child {
    padding-right: 0;
  }

  .stat-item strong {
    font-size: 21px;
    line-height: 1.15;
    white-space: nowrap;
  }

  .stat-item span {
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.25;
  }

  /* Archive hero labels are too long for three narrow columns. */
  .post-type-archive-akashi_service .hero-stats,
  .post-type-archive-akashi_course .hero-stats {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .post-type-archive-akashi_service .stat-item,
  .post-type-archive-akashi_course .stat-item {
    grid-template-columns: minmax(120px, .8fr) minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px 0;
    border-left: 0;
    border-top: 1px solid var(--line);
    text-align: left;
  }

  .post-type-archive-akashi_service .stat-item:first-child,
  .post-type-archive-akashi_course .stat-item:first-child {
    padding-top: 0;
    border-top: 0;
  }

  .post-type-archive-akashi_service .stat-item:last-child,
  .post-type-archive-akashi_course .stat-item:last-child {
    padding-bottom: 0;
  }

  .post-type-archive-akashi_service .stat-item strong,
  .post-type-archive-akashi_course .stat-item strong {
    font-size: 19px;
    white-space: normal;
  }

  .post-type-archive-akashi_service .stat-item span,
  .post-type-archive-akashi_course .stat-item span {
    margin-top: 0;
    text-align: right;
  }

  .home .hero-photo,
  .home .hero-photo img {
    width: 100%;
    min-height: 300px;
    height: 300px;
  }

  .home .hero-photo {
    max-width: 380px;
  }

  .hero-card {
    left: 12px;
    right: 12px;
    bottom: 12px;
    padding: 14px 16px;
    border-radius: 16px;
  }

  .hero-card strong {
    font-size: 18px;
  }

  /* Direction cards: icon and title share the first row; text gets full width below. */
  .section-directions {
    padding-top: 38px;
    padding-bottom: 38px;
  }

  .direction-grid {
    gap: 14px;
    justify-items: stretch;
    text-align: left;
  }

  .direction-card {
    width: 100%;
    min-height: 0;
    grid-template-columns: 58px minmax(0, 1fr);
    column-gap: 14px;
    row-gap: 14px;
    align-items: center;
    padding: 20px;
    border-radius: 22px;
  }

  .direction-card-content {
    display: contents;
  }

  .direction-card .icon-circle {
    grid-column: 1;
    grid-row: 1;
    width: 58px;
    height: 58px;
  }

  .direction-card .icon-circle svg {
    width: 30px;
    height: 30px;
  }

  .direction-card h3 {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    font-size: 24px;
    line-height: 1.1;
  }

  .direction-card p {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 0;
    font-size: 15.5px;
    line-height: 1.5;
  }

  .direction-card .text-link {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-self: start;
    margin-top: 2px;
  }

  /* The same experience figures already appear in the hero on mobile. */
  .about-preview .about-numbers {
    display: none;
  }

  .about-grid {
    gap: 20px;
  }

  .about-photo {
    width: min(240px, 100%);
  }
}

@media (max-width: 390px) {
  .logo-mark {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }

  .logo strong {
    font-size: 15px;
    letter-spacing: .04em;
  }

  .stat-item {
    padding-inline: 7px;
  }

  .stat-item strong {
    font-size: 19px;
  }

  .stat-item span {
    font-size: 10.5px;
  }

  .home .hero-photo,
  .home .hero-photo img {
    min-height: 280px;
    height: 280px;
  }
}
