/*
 * RoamWise editorial shell for the homepage and country finder.
 * Keeps both entry pages visually aligned with the approved country-page V4 language.
 */

body.rw-home,
body.rw-country-index {
  --rw-shell-page: #f7faf8;
  --rw-shell-sky: #edf6f5;
  --rw-shell-white: #fffefb;
  --rw-shell-surface: #f5f7f3;
  --rw-shell-accent-surface: #edf5f1;
  --rw-shell-ink: #0c3130;
  --rw-shell-text: #425b59;
  --rw-shell-muted: #697b78;
  --rw-shell-border: #dde5e0;
  --rw-shell-border-strong: #cbd6d0;
  --rw-shell-emerald: #006b57;
  --rw-shell-emerald-hover: #005646;
  --rw-shell-emerald-soft: #e8f3ee;
  --rw-shell-focus: #087a62;
  --rw-shell-shadow: 0 20px 56px rgba(24, 60, 51, 0.10);
  --rw-shell-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, Cambria, "Times New Roman", serif;
}

html[data-theme="light"] body.rw-home,
html[data-theme="light"] body.rw-country-index {
  --bg: var(--rw-shell-page);
  --bg-soft: var(--rw-shell-sky);
  --surface: var(--rw-shell-white);
  --surface-strong: var(--rw-shell-surface);
  --surface-soft: var(--rw-shell-surface);
  --border: var(--rw-shell-border);
  --border-strong: var(--rw-shell-border-strong);
  --text: var(--rw-shell-ink);
  --muted: var(--rw-shell-text);
  --subtle: var(--rw-shell-muted);
  --accent: var(--rw-shell-emerald);
  --accent-light: #278f87;
  --accent-dark: var(--rw-shell-emerald-hover);
  --accent-soft: var(--rw-shell-emerald-soft);
  --accent-border: rgba(8, 122, 98, 0.34);
  --shadow: var(--rw-shell-shadow);
  --focus-ring: var(--rw-shell-focus);
  background:
    radial-gradient(circle at 84% 4%, rgba(187, 220, 216, 0.46), transparent 30rem),
    radial-gradient(circle at 8% 26%, rgba(246, 228, 196, 0.22), transparent 25rem),
    linear-gradient(180deg, #edf6f5 0, rgba(250, 251, 247, 0.98) 40rem, var(--rw-shell-page) 100%);
  color: var(--rw-shell-ink);
}

html[data-theme="light"] body.rw-home::before,
html[data-theme="light"] body.rw-country-index::before {
  opacity: 0;
}

body.rw-home h1,
body.rw-home h2,
body.rw-home h3,
body.rw-country-index h1,
body.rw-country-index h2,
body.rw-country-index h3,
body.rw-home .brand-name,
body.rw-country-index .brand-name {
  font-family: var(--rw-shell-serif);
  letter-spacing: -0.025em;
}

html[data-theme="light"] body.rw-home h1,
html[data-theme="light"] body.rw-home h2,
html[data-theme="light"] body.rw-home h3,
html[data-theme="light"] body.rw-country-index h1,
html[data-theme="light"] body.rw-country-index h2,
html[data-theme="light"] body.rw-country-index h3,
html[data-theme="light"] body.rw-home .brand,
html[data-theme="light"] body.rw-country-index .brand {
  color: var(--rw-shell-ink);
}

html[data-theme="light"] body.rw-home p,
html[data-theme="light"] body.rw-country-index p,
html[data-theme="light"] body.rw-home .section-lead,
html[data-theme="light"] body.rw-country-index .results-lead {
  color: var(--rw-shell-text);
}

html[data-theme="light"] body.rw-home .eyebrow,
html[data-theme="light"] body.rw-country-index .eyebrow {
  color: var(--rw-shell-emerald-hover);
  font-weight: 700;
  letter-spacing: 0.07em;
}

body.rw-home .shell,
body.rw-country-index .shell {
  width: min(calc(100% - 36px), 1304px);
  max-width: 1304px;
}

html[data-theme="light"] body.rw-home .site-header,
html[data-theme="light"] body.rw-country-index .site-header {
  border-bottom: 1px solid rgba(103, 132, 123, 0.17);
  background: rgba(247, 250, 248, 0.86);
  box-shadow: none;
  backdrop-filter: blur(18px);
}

body.rw-home .header-inner,
body.rw-country-index .header-inner {
  min-height: 68px;
}

body.rw-home .brand-mark,
body.rw-country-index .brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--rw-shell-emerald);
  color: #fff;
  box-shadow: 0 8px 20px rgba(8, 122, 98, 0.18);
}

html[data-theme="light"] body.rw-home .brand-tagline,
html[data-theme="light"] body.rw-country-index .brand-tagline {
  color: var(--rw-shell-muted);
}

html[data-theme="light"] body.rw-home .theme-toggle,
html[data-theme="light"] body.rw-country-index .theme-toggle,
html[data-theme="light"] body.rw-country-index .header-link {
  border: 1px solid rgba(94, 121, 114, 0.20);
  background: rgba(255, 254, 250, 0.78);
  color: var(--rw-shell-ink);
  box-shadow: 0 5px 18px rgba(35, 70, 61, 0.04);
}

html[data-theme="light"] body.rw-home .button-primary,
html[data-theme="light"] body.rw-home .button-compact,
html[data-theme="light"] body.rw-country-index .search-match__action {
  border-color: var(--rw-shell-emerald);
  background: var(--rw-shell-emerald);
  color: #fff;
  box-shadow: 0 10px 24px rgba(8, 122, 98, 0.15);
}

html[data-theme="light"] body.rw-home .button-primary:hover,
html[data-theme="light"] body.rw-home .button-compact:hover {
  border-color: var(--rw-shell-emerald-hover);
  background: var(--rw-shell-emerald-hover);
}

html[data-theme="light"] body.rw-home .button-secondary,
html[data-theme="light"] body.rw-home .destinations-cta {
  border-color: rgba(8, 122, 98, 0.25);
  background: rgba(255, 254, 250, 0.64);
  color: var(--rw-shell-emerald-hover);
  box-shadow: none;
}

/* Homepage */
body.rw-home main {
  padding-top: 18px;
}

body.rw-home .hero {
  overflow: visible;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 34px 0 42px;
  box-shadow: none;
}

body.rw-home .hero::before,
body.rw-home .hero::after {
  display: none;
}

body.rw-home .hero-grid {
  grid-template-columns: minmax(0, 1.02fr) minmax(420px, 0.98fr);
  gap: clamp(34px, 5vw, 72px);
  align-items: center;
}

body.rw-home #hero-title {
  max-width: 740px;
  margin-top: 6px;
  font-size: clamp(44px, 5.2vw, 72px);
  line-height: 0.98;
}

body.rw-home .hero-lead {
  max-width: 690px;
  font-size: clamp(17px, 1.45vw, 20px);
  line-height: 1.58;
}

html[data-theme="light"] body.rw-home .hero-support {
  color: var(--rw-shell-muted);
}

body.rw-home .home-hero-side {
  display: grid;
  gap: 14px;
}

body.rw-home .home-hero-visual,
body.rw-country-index .finder-hero-visual {
  position: relative;
  overflow: hidden;
  margin: 0;
  border-radius: 16px;
  background: var(--rw-shell-accent-surface);
  box-shadow: var(--rw-shell-shadow);
}

body.rw-home .home-hero-visual {
  aspect-ratio: 3 / 2;
}

body.rw-home .home-hero-visual img,
body.rw-country-index .finder-hero-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.rw-home .home-hero-visual::after,
body.rw-country-index .finder-hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 58%, rgba(4, 63, 54, 0.20));
}

html[data-theme="light"] body.rw-home .comparison-panel {
  border: 1px solid var(--rw-shell-border);
  border-radius: 14px;
  background: rgba(255, 254, 251, 0.94);
  padding: 19px 20px;
  box-shadow: 0 14px 34px rgba(24, 60, 51, 0.07);
}

body.rw-home .comparison-panel h2 {
  font-size: 24px;
}

html[data-theme="light"] body.rw-home .comparison-step,
html[data-theme="light"] body.rw-home .quick-destination-grid a,
html[data-theme="light"] body.rw-home .trust-chip {
  border-color: var(--rw-shell-border);
  background: var(--rw-shell-white);
  color: var(--rw-shell-ink);
}

body.rw-home .section {
  margin-top: 18px;
  border-radius: 18px;
}

html[data-theme="light"] body.rw-home .section {
  border: 1px solid rgba(221, 229, 224, 0.86);
  background: rgba(255, 254, 251, 0.78);
  box-shadow: 0 18px 42px rgba(24, 60, 51, 0.055);
}

body.rw-home .section-heading h2 {
  font-size: clamp(31px, 3.2vw, 46px);
}

html[data-theme="light"] body.rw-home .destination-card,
html[data-theme="light"] body.rw-home .process-card,
html[data-theme="light"] body.rw-home .use-case,
html[data-theme="light"] body.rw-home .benefit {
  border-color: var(--rw-shell-border);
  background: var(--rw-shell-white);
  color: var(--rw-shell-ink);
  box-shadow: none;
}

html[data-theme="light"] body.rw-home .destination-card:hover,
html[data-theme="light"] body.rw-home .destination-card:focus-visible {
  border-color: rgba(8, 122, 98, 0.35);
  background: var(--rw-shell-emerald-soft);
  transform: translateY(-2px);
}

html[data-theme="light"] body.rw-home .destination-code,
html[data-theme="light"] body.rw-home .process-number,
html[data-theme="light"] body.rw-home .use-case-number {
  border-color: rgba(8, 122, 98, 0.18);
  background: var(--rw-shell-emerald-soft);
  color: var(--rw-shell-emerald-hover);
}

html[data-theme="light"] body.rw-home .why-panel,
html[data-theme="light"] body.rw-home .app-preview {
  border: 1px solid var(--rw-shell-border);
  background:
    radial-gradient(circle at 92% 8%, rgba(187, 220, 216, 0.34), transparent 25rem),
    linear-gradient(145deg, var(--rw-shell-white), #f3f7f4);
  color: var(--rw-shell-ink);
  box-shadow: none;
}

body.rw-home .app-preview {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.78fr);
  align-items: center;
}

body.rw-home .app-visual--editorial {
  display: grid;
  gap: 12px;
  align-content: center;
  min-height: 280px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(3, 57, 50, 0.06), rgba(3, 57, 50, 0.18)),
    url("/assets/destinations/generic/generic-travel-desktop.webp") center / cover no-repeat;
  padding: 22px;
}

body.rw-home .app-feature-card {
  width: min(100%, 420px);
  margin-left: auto;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 13px;
  background: rgba(255, 254, 251, 0.90);
  padding: 14px 16px;
  color: var(--rw-shell-ink);
  box-shadow: 0 12px 30px rgba(12, 49, 48, 0.10);
  backdrop-filter: blur(12px);
}

body.rw-home .app-feature-card strong,
body.rw-home .app-feature-card span {
  display: block;
}

body.rw-home .app-feature-card span {
  margin-top: 3px;
  color: var(--rw-shell-text);
  font-size: 13px;
  line-height: 1.4;
}

html[data-theme="light"] body.rw-home .site-footer,
html[data-theme="light"] body.rw-country-index .site-footer {
  border-top-color: var(--rw-shell-border);
  background: transparent;
  color: var(--rw-shell-text);
}

html[data-theme="light"] body.rw-home .footer-links a,
html[data-theme="light"] body.rw-country-index .footer-links a {
  color: var(--rw-shell-emerald-hover);
}

/* Country finder */
body.rw-country-index main {
  padding-top: 18px;
}

body.rw-country-index .finder-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.72fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  min-height: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 34px 0 42px;
  box-shadow: none;
}

body.rw-country-index .finder-hero::before,
body.rw-country-index .finder-hero::after {
  display: none;
}

body.rw-country-index .hero-content {
  max-width: 760px;
  margin: 0;
}

body.rw-country-index #page-title {
  max-width: 650px;
  font-size: clamp(46px, 5vw, 70px);
  line-height: 0.98;
}

body.rw-country-index .hero-lead {
  max-width: 650px;
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
}

body.rw-country-index .finder-hero-visual {
  aspect-ratio: 3 / 2;
}

html[data-theme="light"] body.rw-country-index .search-panel {
  border: 1px solid var(--rw-shell-border);
  border-radius: 14px;
  background: rgba(255, 254, 251, 0.93);
  padding: 12px;
  box-shadow: 0 14px 34px rgba(24, 60, 51, 0.07);
}

html[data-theme="light"] body.rw-country-index .search-box {
  border: 1px solid var(--rw-shell-border-strong);
  background: var(--rw-shell-white);
  box-shadow: none;
}

html[data-theme="light"] body.rw-country-index .search-box:focus-within {
  border-color: var(--rw-shell-emerald);
  box-shadow: 0 0 0 3px rgba(8, 122, 98, 0.10);
}

html[data-theme="light"] body.rw-country-index .search-input,
html[data-theme="light"] body.rw-country-index .search-icon {
  color: var(--rw-shell-ink);
}

html[data-theme="light"] body.rw-country-index .quick-link,
html[data-theme="light"] body.rw-country-index .show-destinations,
html[data-theme="light"] body.rw-country-index .result-count {
  border-color: var(--rw-shell-border);
  background: var(--rw-shell-white);
  color: var(--rw-shell-emerald-hover);
}

html[data-theme="light"] body.rw-country-index .trust-row li {
  color: var(--rw-shell-text);
}

html[data-theme="light"] body.rw-country-index .trust-row li::before {
  color: var(--rw-shell-emerald);
}

body.rw-country-index .results {
  border-radius: 18px;
}

html[data-theme="light"] body.rw-country-index .results {
  border: 1px solid rgba(221, 229, 224, 0.90);
  background: rgba(255, 254, 251, 0.82);
  box-shadow: 0 18px 42px rgba(24, 60, 51, 0.055);
}

body.rw-country-index .results-heading h2 {
  font-size: clamp(30px, 3vw, 44px);
}

html[data-theme="light"] body.rw-country-index .country-result {
  border: 1px solid var(--rw-shell-border);
  background: var(--rw-shell-white);
  color: var(--rw-shell-ink);
  box-shadow: none;
}

html[data-theme="light"] body.rw-country-index .country-result:hover,
html[data-theme="light"] body.rw-country-index .country-result:focus-visible,
html[data-theme="light"] body.rw-country-index .country-result--match {
  border-color: rgba(8, 122, 98, 0.34);
  background: var(--rw-shell-emerald-soft);
  transform: translateY(-1px);
}

html[data-theme="light"] body.rw-country-index .country-code {
  border-color: rgba(8, 122, 98, 0.14);
  background: var(--rw-shell-emerald-soft);
  color: var(--rw-shell-emerald-hover);
}

html[data-theme="light"] body.rw-country-index .country-copy small {
  color: var(--rw-shell-muted);
}

html[data-theme="light"] body.rw-country-index .country-action {
  color: var(--rw-shell-emerald-hover);
}

@media (max-width: 979px) {
  body.rw-home .hero-grid,
  body.rw-country-index .finder-hero,
  body.rw-home .app-preview {
    grid-template-columns: minmax(0, 1fr);
  }

  body.rw-home .home-hero-side {
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
    align-items: stretch;
  }

  body.rw-home .home-hero-visual,
  body.rw-country-index .finder-hero-visual {
    aspect-ratio: 16 / 7;
  }
}

@media (max-width: 679px) {
  body.rw-home .shell,
  body.rw-country-index .shell {
    width: min(calc(100% - 24px), 1304px);
  }

  body.rw-home .header-inner,
  body.rw-country-index .header-inner {
    min-height: 62px;
  }

  body.rw-home .hero,
  body.rw-country-index .finder-hero {
    padding: 22px 0 28px;
  }

  body.rw-home #hero-title,
  body.rw-country-index #page-title {
    font-size: clamp(36px, 11vw, 48px);
    line-height: 1.00;
  }

  body.rw-home .hero-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  body.rw-home .hero-actions .button {
    width: 100%;
  }

  body.rw-home .home-hero-side {
    grid-template-columns: minmax(0, 1fr);
  }

  body.rw-home .home-hero-visual,
  body.rw-country-index .finder-hero-visual {
    aspect-ratio: 3 / 2;
    border-radius: 14px;
  }

  body.rw-home .comparison-panel {
    padding: 16px;
  }

  body.rw-home .section,
  body.rw-country-index .results {
    border-radius: 14px;
  }

  body.rw-home .app-visual--editorial {
    min-height: 240px;
    border-radius: 14px;
    background-image:
      linear-gradient(180deg, rgba(3, 57, 50, 0.06), rgba(3, 57, 50, 0.18)),
      url("/assets/destinations/generic/generic-travel-mobile.webp");
  }

  body.rw-home .app-feature-card {
    width: 100%;
  }
}
