/* Homepage — mobile-first travel digest layout */

.page-home {
  --home-ink: #122029;
  --home-muted: #5d6d78;
  --home-line: #d5e0e6;
  --home-surface: #ffffff;
  --home-soft: #e8f4f5;
  --home-accent: #0e7c86;
  --home-accent-2: #c9852f;
  --ad-h: 250px;
  --ad-visible: 0.8;
}

/*
  Mobile rem root (375 design width → 1rem ≈ 10px).
  Also capped by vh so short phones shrink the fold above the ad.
*/
@media (max-width: 860px) {
  html:has(body.page-home) {
    font-size: clamp(8px, min(100vw / 37.5, 100dvh / 72), 10.5px);
    --header-h: 4.8rem;
  }
}


.page-home .brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-home main.container {
  padding-block: 0.85rem 2.8rem;
}

.page-home .home-intro {
  margin: 0.15rem 0 0.85rem;
}

.page-home .home-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--home-accent);
}

.page-home .home-intro h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 5.2vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--home-ink);
}

.page-home .home-lead {
  margin: 0.45rem 0 0;
  max-width: 46ch;
  color: var(--home-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.page-home .topic-strip {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0.15rem 0 0.85rem;
  margin: 0 0 0.35rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.page-home .topic-strip::-webkit-scrollbar {
  display: none;
}

.page-home .topic-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 34px;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--home-line);
  border-radius: 999px;
  background: var(--home-surface);
  color: var(--home-ink);
  font-size: 0.8rem;
  font-weight: 650;
  white-space: nowrap;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.page-home .topic-chip:hover,
.page-home .topic-chip:focus-visible {
  border-color: rgba(14, 124, 134, 0.45);
  background: var(--home-soft);
  color: var(--home-accent);
}

.page-home .topic-chip i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--home-accent-2);
}

.page-home .home-top {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}

.page-home .feature-panel {
  border: 1px solid var(--home-line);
  border-radius: 12px;
  background: var(--home-surface);
  overflow: clip;
  box-shadow: 0 4px 18px rgba(18, 32, 41, 0.04);
}

.page-home .feature-panel .top-title {
  margin: 0;
  padding: 0.7rem 0.85rem 0.45rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.page-home .hero-media {
  width: calc(100% - 1.4rem);
  margin: 0 0.7rem 0.7rem;
  border-radius: 8px;
  aspect-ratio: 16 / 10;
  min-height: 0;
}

.page-home .hero-tag {
  background: var(--home-soft);
  color: #0a4f56;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.page-home .hero-overlay strong {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 3.8vw, 1.45rem);
}

.page-home .hero-overlay small {
  display: none;
}

.page-home .latest-panel {
  border: 1px solid var(--home-line);
  border-radius: 12px;
  background: var(--home-surface);
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(18, 32, 41, 0.04);
}

.page-home .latest-panel .top-title {
  margin: 0;
  padding: 0.7rem 0.85rem 0.35rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
}

.page-home .latest-list {
  padding-bottom: 0.25rem;
}

.page-home .latest-item {
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 0.7rem;
  padding: 0.72rem 0.85rem;
  border-top: 1px solid #e7eef2;
}

.page-home .latest-item:hover {
  background: #f7fbfb;
}

.page-home .latest-item img {
  width: 84px;
  height: 63px;
  border-radius: 6px;
  aspect-ratio: 4 / 3;
}

.page-home .latest-item .post-tag {
  color: var(--home-accent);
  font-size: 0.72rem;
  font-weight: 700;
}

.page-home .latest-item strong {
  font-size: 0.95rem;
  line-height: 1.3;
  font-weight: 700;
}

.page-home .latest-item .meta {
  color: var(--home-muted);
  font-size: 0.8rem;
}

/* Stable 300×250 mid-feed slot — after 2 list items */
.page-home .mid-ad-slot {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 0.85rem 0.75rem;
  border-top: 1px solid #e7eef2;
  background: #f7fafb;
  min-height: calc(250px + 1.7rem);
}

.page-home .ad-frame {
  width: 300px;
  height: 250px;
  max-width: 100%;
  border: 1px dashed #c9d6dd;
  border-radius: 8px;
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(14, 124, 134, 0.03),
      rgba(14, 124, 134, 0.03) 8px,
      transparent 8px,
      transparent 16px
    ),
    #fff;
  display: grid;
  place-items: center;
  color: #7a8b95;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex: 0 0 auto;
}

.page-home .plan-section {
  margin: 1.35rem 0 1.5rem;
}

.page-home .section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.75rem;
}

.page-home .section-head .section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 700;
}

.page-home .section-note {
  color: var(--home-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.page-home .plan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.page-home .plan-card {
  display: grid;
  gap: 0.2rem;
  padding: 0.85rem 0.8rem;
  border: 1px solid var(--home-line);
  border-radius: 10px;
  background: var(--home-surface);
  min-height: 92px;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.page-home .plan-card:hover {
  border-color: rgba(14, 124, 134, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(18, 32, 41, 0.06);
}

.page-home .plan-card b {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--home-accent);
}

.page-home .plan-card strong {
  font-size: 0.95rem;
  line-height: 1.25;
  color: var(--home-ink);
}

.page-home .plan-card span {
  font-size: 0.8rem;
  color: var(--home-muted);
  line-height: 1.35;
}

.page-home .mini-feature-strip {
  margin-top: 0.4rem;
}

.page-home .mini-cards {
  gap: 0.55rem;
}

.page-home .mini-card {
  border-radius: 10px;
  aspect-ratio: 16 / 9;
  box-shadow: none;
}

.page-home .mini-tag {
  background: rgba(14, 124, 134, 0.92);
  color: #fff;
  border-radius: 999px;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.page-home .mini-overlay strong {
  font-family: var(--font-display);
  font-size: 0.98rem;
}

.page-home section[aria-label="Featured articles"] .section-title {
  font-family: var(--font-display);
  font-size: 1.28rem;
}

.page-home .post-card {
  border-radius: 10px;
  box-shadow: none;
}

.page-home .post-content h3 {
  font-family: var(--font-display);
  font-weight: 700;
}

.page-home .post-tag {
  color: var(--home-accent);
}

.page-home .site-footer {
  background: #10242f;
  border-top: 0;
  color: rgba(255, 255, 255, 0.88);
}

.page-home .footer-grid h4,
.page-home .footer-brand span {
  color: #fff;
}

.page-home .footer-grid p,
.page-home .footer-grid li,
.page-home .copyright {
  color: rgba(255, 255, 255, 0.72);
}

.page-home .footer-grid a:hover {
  color: #9fd8dd;
}

.page-home .footer-logo {
  border-radius: 5px;
}

@media (min-width: 861px) {
  .page-home .home-top {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: stretch;
    gap: 0.75rem;
  }

  .page-home .feature-panel .top-title,
  .page-home .latest-panel .top-title {
    font-size: 1.45rem;
    padding-top: 0.85rem;
  }

  .page-home .hero-media {
    aspect-ratio: 16 / 10.2;
    min-height: 360px;
  }

  .page-home .hero-overlay small {
    display: block;
    font-size: 0.9rem;
  }

  .page-home .latest-panel {
    display: flex;
    flex-direction: column;
  }

  .page-home .latest-list {
    flex: 1;
  }

  .page-home .latest-item {
    flex: 1;
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .page-home .latest-item img {
    width: 96px;
    height: 72px;
  }

  .page-home .plan-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .page-home .mini-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .page-home .mini-card {
    aspect-ratio: 16 / 8;
  }
}

@media (max-width: 860px) {
  /*
    Fold budget: leave ≥80% of 300×250 ad in the first screen.
    Non-hero above-ad chrome ≈ 19rem; hero fills the rest under a max-height cap.
  */
  .page-home {
    /* More chrome budget = airier intro/topics; hero shrinks to keep ad ≥80% */
    --fold-chrome: 22rem;
    --fold-ad: calc(var(--ad-h) * var(--ad-visible));
    --fold-hero-max: calc(
      100dvh - var(--header-h) - env(safe-area-inset-top, 0px) - var(--fold-chrome) - var(--fold-ad)
    );
  }

  .page-home .site-header .brand-row {
    min-height: 4.8rem;
    gap: 0.4rem;
  }

  .page-home .brand-logo {
    height: 2.8rem;
    width: 2.8rem;
  }

  .page-home .brand-name {
    font-size: 1.5rem;
  }

  .page-home .menu-toggle,
  .page-home .brand-row > .search-icon-link.search-quick {
    width: 3.2rem;
    height: 3.2rem;
    flex-basis: 3.2rem;
    border-radius: 0.7rem;
  }

  .page-home .site-header .main-nav {
    background: rgba(16, 36, 47, 0.98);
    border-color: rgba(255, 255, 255, 0.1);
  }

  .page-home .site-header .main-nav a {
    color: #fff;
  }

  .page-home .brand-row > .search-icon-link.search-quick {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
  }

  .page-home .brand-row > .search-icon-link.search-quick svg {
    fill: #fff;
    width: 1.6rem;
    height: 1.6rem;
  }

  .page-home .menu-toggle {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.08);
  }

  .page-home main.container {
    width: min(100% - 2.4rem, var(--container));
    padding-block: 1rem 2.8rem;
  }

  .page-home .home-intro {
    margin: 0 0 0.85rem;
  }

  .page-home .home-kicker {
    margin: 0 0 0.45rem;
    font-size: 1rem;
    letter-spacing: 0.1em;
  }

  .page-home .home-intro h1 {
    font-size: 2rem;
    line-height: 1.22;
    letter-spacing: -0.015em;
  }

  .page-home .topic-strip {
    gap: 0.5rem;
    padding: 0.15rem 0 0.9rem;
    margin: 0 0 0.35rem;
  }

  .page-home .topic-chip {
    min-height: 3rem;
    padding: 0.35rem 0.85rem;
    font-size: 1.1rem;
    gap: 0.35rem;
  }

  .page-home .topic-chip i {
    width: 0.5rem;
    height: 0.5rem;
  }

  .page-home .home-top {
    gap: 0.85rem;
    margin-bottom: 1rem;
  }

  .page-home .feature-panel,
  .page-home .latest-panel {
    border-radius: 1rem;
  }

  .page-home .feature-panel .top-title,
  .page-home .latest-panel .top-title {
    padding: 0.75rem 0.85rem 0.5rem;
    font-size: 1.45rem;
    line-height: 1.2;
  }

  .page-home .hero-media {
    width: calc(100% - 1.4rem);
    margin: 0 0.7rem 0.75rem;
    border-radius: 0.8rem;
    aspect-ratio: 16 / 8.4;
    height: auto;
    max-height: max(11rem, var(--fold-hero-max));
    min-height: 0;
  }

  .page-home .hero-slide {
    object-fit: cover;
  }

  /* Avoid first-paint fade eating fold space perception */
  .page-home .feature-panel.reveal-on-scroll,
  .page-home .latest-panel.reveal-on-scroll {
    opacity: 1;
    transform: none;
  }

  .page-home .hero-tag {
    left: 0.7rem;
    top: 0.7rem;
    font-size: 0.95rem;
    padding: 0.15rem 0.55rem;
  }

  .page-home .hero-overlay {
    padding: 0.65rem 0.8rem 0.85rem;
    gap: 0.25rem;
  }

  .page-home .hero-overlay strong {
    font-size: 1.3rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }

  .page-home .hero-overlay em {
    font-size: 1.05rem;
  }

  .page-home .hero-arrow {
    display: none;
  }

  .page-home .hero-dots {
    bottom: 0.45rem;
    gap: 0.45rem;
  }

  .page-home .hero-dots i {
    width: 0.55rem;
    height: 0.55rem;
  }

  /* Ad keeps physical 300×250; slot padding stays light so 80% can enter the fold */
  .page-home .mid-ad-slot {
    padding: 0.35rem 0.5rem 0.45rem;
    border-top: 0;
    background: #f7fafb;
    min-height: var(--ad-h);
  }

  .page-home .ad-frame {
    width: min(300px, 100%);
    height: var(--ad-h);
    border-radius: 0.6rem;
    font-size: 1.05rem;
  }

  .page-home .latest-item {
    grid-template-columns: 5.6rem minmax(0, 1fr);
    gap: 0.55rem;
    padding: 0.55rem 0.75rem;
    align-items: start;
  }

  .page-home .latest-item img {
    width: 5.6rem;
    height: 4.2rem;
  }

  .page-home .latest-item span {
    gap: 0.12rem;
  }

  .page-home .latest-item .post-tag {
    font-size: 1rem;
  }

  .page-home .latest-item strong {
    font-size: 1.2rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }

  .page-home .latest-item .meta {
    font-size: 1rem;
  }

  .page-home .plan-grid {
    grid-template-columns: 1fr 1fr;
  }

  .page-home .mini-cards {
    grid-template-columns: 1fr 1fr;
  }

  .page-home .mini-card {
    aspect-ratio: 16 / 10;
  }

  .page-home .cards-3 {
    grid-template-columns: 1fr;
  }

  /*
    Below-fold copy uses px so it stays readable when the fold rem root shrinks.
  */
  .page-home .plan-section {
    margin: 1.6rem 0 1.7rem;
  }

  .page-home .plan-section .section-title,
  .page-home .mini-feature-strip .section-title,
  .page-home section[aria-label="Featured articles"] .section-title {
    font-size: 22px;
  }

  .page-home .section-note {
    font-size: 13px;
  }

  .page-home .plan-card {
    gap: 0.35rem;
    padding: 14px 14px;
    min-height: 0;
    border-radius: 12px;
  }

  .page-home .plan-card b {
    font-size: 12px;
  }

  .page-home .plan-card strong {
    font-size: 16px;
    line-height: 1.3;
  }

  .page-home .plan-card span {
    font-size: 14px;
    line-height: 1.4;
    color: #4e5d68;
  }

  /* Keep Latest list on rem (not px) so SE / short phones can shrink the fold row */
  .page-home .latest-item .post-tag {
    font-size: 1rem;
  }

  .page-home .latest-item strong {
    font-size: 1.2rem;
    line-height: 1.25;
  }

  .page-home .latest-item .meta {
    font-size: 1rem;
  }

  .page-home .mini-tag {
    font-size: 11px;
    padding: 0.2rem 0.55rem;
  }

  .page-home .mini-overlay strong {
    font-size: 16px;
    line-height: 1.3;
  }

  .page-home .post-content h3 {
    font-size: 18px;
    line-height: 1.3;
  }

  .page-home .post-content p,
  .page-home .post-content .meta {
    font-size: 14px;
  }

  .page-home .post-tag {
    font-size: 12px;
  }

  /* Footer: fixed px so rem fold root does not shrink it */
  .page-home .site-footer {
    padding: 28px 0 22px;
  }

  .page-home .footer-brand span {
    font-size: 18px;
  }

  .page-home .footer-logo {
    width: 22px;
    height: 22px;
  }

  .page-home .footer-grid h4 {
    font-size: 16px;
    margin-bottom: 10px;
  }

  .page-home .footer-grid p,
  .page-home .footer-grid li {
    font-size: 15px;
    line-height: 1.5;
  }

  .page-home .footer-grid ul {
    gap: 8px;
  }

  .page-home .copyright {
    font-size: 13px;
    margin-top: 18px;
  }
}

/* iPhone SE / short phones: compact the Latest row above the ad */
@media (max-width: 860px) and (max-height: 700px) {
  html:has(body.page-home) {
    font-size: clamp(7.5px, min(100vw / 40, 100dvh / 78), 9.5px);
  }

  .page-home {
    --fold-chrome: 24rem;
  }

  .page-home .home-intro h1 {
    font-size: 1.9rem;
  }

  .page-home .hero-media {
    aspect-ratio: 16 / 8;
  }

  .page-home .hero-overlay strong {
    font-size: 1.2rem;
  }

  .page-home .latest-panel .top-title {
    padding: 0.5rem 0.7rem 0.3rem;
    font-size: 1.35rem;
  }

  .page-home .latest-item {
    grid-template-columns: 4.8rem minmax(0, 1fr);
    gap: 0.45rem;
    padding: 0.4rem 0.7rem;
  }

  .page-home .latest-item img {
    width: 4.8rem;
    height: 3.6rem;
    border-radius: 0.45rem;
  }

  .page-home .latest-item .post-tag {
    font-size: 0.95rem;
  }

  .page-home .latest-item strong {
    font-size: 1.1rem;
    -webkit-line-clamp: 2;
  }

  .page-home .latest-item .meta {
    font-size: 0.95rem;
  }
}

@media (max-width: 860px) and (max-height: 620px) {
  html:has(body.page-home) {
    font-size: clamp(7px, min(100vw / 42, 100dvh / 82), 9px);
  }

  .page-home {
    --fold-chrome: 18.5rem;
  }

  .page-home .home-kicker {
    display: none;
  }

  .page-home .home-intro {
    margin-bottom: 0.65rem;
  }

  .page-home .topic-strip {
    padding-bottom: 0.65rem;
  }

  .page-home .feature-panel .top-title {
    padding-top: 0.55rem;
    padding-bottom: 0.35rem;
    font-size: 1.35rem;
  }

  .page-home .hero-media {
    aspect-ratio: 16 / 7.6;
  }
}


@media (max-width: 420px) {
  .page-home .plan-grid {
    grid-template-columns: 1fr;
  }

  .page-home .mini-cards {
    grid-template-columns: 1fr;
  }
}
