/*
 * Design D — AllVisaUpdates portal design system (2026-10-29).
 *
 * Implements the owner's reference composition on the repo tokens
 * (tokens.css): ink navy + blue + gold, soft-shadow rounded cards,
 * mobile-first. Loaded on every production page between tokens.css
 * and articles.css (article-body components live in articles.css).
 */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--avu-font);
  color: var(--avu-ink-950);
  background: var(--avu-surface);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

a { color: var(--avu-blue-600); }

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--avu-cyan-500);
  outline-offset: 2px;
}

.container {
  width: min(calc(100% - 40px), var(--avu-container));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 60;
  background: var(--avu-ink-950);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--avu-radius-pill);
  transition: top .2s var(--avu-ease);
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Header ---------- */

.dd-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--avu-border);
  box-shadow: 0 1px 12px rgba(7, 27, 49, .05);
}

.dd-header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 0;
  flex-wrap: wrap;
}

.dd-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--avu-ink-950);
}

.dd-brand-mark { width: 40px; height: 40px; }

.dd-brand-copy { display: flex; flex-direction: column; line-height: 1.15; }

.dd-brand-copy strong { font-size: 1.28rem; font-weight: 800; letter-spacing: -.01em; }
.dd-brand-copy strong::first-letter { color: var(--avu-blue-600); }

.dd-brand-copy small {
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--avu-ink-500);
}

.dd-nav {
  display: none;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  order: 5;
  padding: 8px 0 4px;
}

.dd-nav.open { display: flex; }

.dd-nav a {
  color: var(--avu-ink-900);
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
  padding: 8px 10px;
  border-radius: var(--avu-radius-sm);
}

.dd-nav a:hover { background: var(--avu-blue-50); color: var(--avu-blue-700); }
.dd-nav a[aria-current="page"] { color: var(--avu-blue-700); }

.dd-menu-toggle {
  margin-left: auto;
  background: var(--avu-blue-50);
  border: 1px solid var(--avu-border);
  border-radius: var(--avu-radius-sm);
  font-size: 1.1rem;
  padding: 7px 12px;
  cursor: pointer;
}

.dd-search { position: relative; flex: 1 1 180px; max-width: 300px; }

.dd-search input {
  width: 100%;
  border: 1px solid var(--avu-border-strong);
  border-radius: var(--avu-radius-pill);
  padding: 9px 16px;
  font: inherit;
  font-size: .9rem;
  background: var(--avu-surface);
}

.dd-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: #fff;
  border: 1px solid var(--avu-border);
  border-radius: var(--avu-radius-md);
  box-shadow: var(--avu-shadow-md);
  overflow: hidden;
  z-index: 55;
}

.dd-search-results a {
  display: block;
  padding: 10px 14px;
  color: var(--avu-ink-950);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 600;
}

.dd-search-results a small {
  display: block;
  color: var(--avu-ink-500);
  font-weight: 500;
}

.dd-search-results a:hover { background: var(--avu-blue-50); }

.dd-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--avu-blue-600);
  color: #fff;
  font-weight: 700;
  font-size: .92rem;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: var(--avu-radius-pill);
  box-shadow: var(--avu-shadow-sm);
  white-space: nowrap;
}

.dd-cta:hover { background: var(--avu-blue-700); color: #fff; }

@media (min-width: 1020px) {
  .dd-menu-toggle { display: none; }
  .dd-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2px;
    width: auto;
    order: 0;
    padding: 0;
    margin-inline: auto;
  }
  .dd-nav a { padding: 8px 9px; }
}

/* ---------- Hero ---------- */

.dd-hero {
  background:
    radial-gradient(1100px 480px at 85% -10%, rgba(20, 184, 200, .28), transparent 60%),
    linear-gradient(120deg, var(--avu-ink-950) 0%, var(--avu-ink-900) 45%, #0d4d8f 100%);
  color: #fff;
  padding: 52px 0 60px;
  overflow: hidden;
}

.dd-hero-grid {
  display: grid;
  gap: 36px;
  align-items: center;
}

@media (min-width: 960px) {
  .dd-hero-grid { grid-template-columns: 1.05fr .95fr; }
}

.dd-eyebrow {
  display: inline-block;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .18em;
  color: var(--avu-cyan-500);
  margin-bottom: 14px;
}

.dd-eyebrow-dark { color: var(--avu-blue-700); }

.dd-hero h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -.02em;
  margin: 0 0 16px;
  font-weight: 850;
}

.dd-hero h1 em {
  font-style: normal;
  color: #57c8f5;
}

.dd-hero-sub {
  font-size: 1.05rem;
  color: #cfdff2;
  max-width: 34rem;
  margin: 0 0 26px;
}

.dd-hero-search {
  display: flex;
  background: #fff;
  border-radius: var(--avu-radius-pill);
  padding: 6px;
  max-width: 560px;
  box-shadow: var(--avu-shadow-md);
}

.dd-hero-search input {
  flex: 1;
  border: 0;
  font: inherit;
  padding: 10px 16px;
  min-width: 0;
  background: transparent;
  color: var(--avu-ink-950);
}

.dd-hero-search input:focus-visible { outline-offset: -3px; }

.dd-hero-search button {
  border: 0;
  background: var(--avu-blue-600);
  color: #fff;
  font: inherit;
  font-weight: 700;
  padding: 11px 30px;
  border-radius: var(--avu-radius-pill);
  cursor: pointer;
}

.dd-hero-search button:hover { background: var(--avu-blue-700); }

.dd-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 20px;
}

.dd-chip {
  color: #eaf4ff;
  text-decoration: none;
  font-size: .85rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .08);
  padding: 7px 15px;
  border-radius: var(--avu-radius-pill);
}

.dd-chip:hover { background: rgba(255, 255, 255, .18); color: #fff; }

.dd-hero-visual { position: relative; }

.dd-hero-art {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--avu-radius-lg);
  box-shadow: var(--avu-shadow-md);
  display: block;
}

.dd-trust-card {
  background: #fff;
  color: var(--avu-ink-950);
  border-radius: var(--avu-radius-md);
  box-shadow: var(--avu-shadow-md);
  padding: 18px 20px;
  display: grid;
  gap: 13px;
  margin-top: 16px;
}

@media (min-width: 960px) {
  .dd-trust-card {
    position: absolute;
    right: 18px;
    bottom: 18px;
    width: 300px;
    margin-top: 0;
    background: rgba(255, 255, 255, .97);
  }
}

.dd-trust-item { display: flex; gap: 12px; align-items: flex-start; }

.dd-trust-icon {
  font-size: 1.15rem;
  background: var(--avu-blue-50);
  border-radius: 10px;
  padding: 6px 8px;
  line-height: 1;
}

.dd-trust-item strong { display: block; font-size: .93rem; }
.dd-trust-item small { color: var(--avu-ink-600); font-size: .8rem; }

/* ---------- Sections ---------- */

.dd-section { padding: 44px 0 8px; }

.dd-section-heading { margin-bottom: 22px; }

.dd-section-heading h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.8rem);
  letter-spacing: -.01em;
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dd-section-heading p { color: var(--avu-ink-600); margin: 0; }

.dd-section-heading-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.dd-view-all {
  font-weight: 700;
  font-size: .9rem;
  text-decoration: none;
  white-space: nowrap;
}

.dd-view-all:hover { text-decoration: underline; }

/* Standalone page title (e.g. /updates/) + the RSS note under a
 * listing: the updates page is a page, not a homepage section, so
 * its heading is an h1 in the section-heading register. */
.dd-page-title {
  font-size: clamp(1.4rem, 2.6vw, 1.8rem);
  letter-spacing: -.01em;
  margin: 0 0 6px;
}


/* Fresh rail cards reuse .hub-card; keep their thumbs bounded. */
.hub-card .hub-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  height: auto;
  max-height: 220px;
}

/* ---------- Destinations ---------- */

.dd-dest-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) { .dd-dest-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .dd-dest-grid { grid-template-columns: repeat(5, 1fr); } }

.dd-dest-card {
  background: #fff;
  border: 1px solid var(--avu-border);
  border-radius: var(--avu-radius-md);
  overflow: hidden;
  box-shadow: var(--avu-shadow-sm);
  text-decoration: none;
  color: var(--avu-ink-950);
  display: flex;
  flex-direction: column;
}

a.dd-dest-card:hover { box-shadow: var(--avu-shadow-md); }

.dd-dest-art {
  display: block;
  aspect-ratio: 16 / 10;
  max-height: 220px;
  overflow: hidden;
  background: #123a63;
}

.dd-dest-art img,
.dd-dest-art svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dd-dest-body { padding: 14px 16px 16px; position: relative; display: block; }
.dd-dest-body h3 { margin: 0 0 4px; font-size: 1.02rem; }
.dd-dest-body p { margin: 0; color: var(--avu-ink-600); font-size: .85rem; }

.dd-dest-arrow {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 30px; height: 30px;
  border: 1.5px solid var(--avu-blue-600);
  color: var(--avu-blue-600);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.dd-prep-chip {
  display: inline-block;
  margin-top: 10px;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--avu-amber-700);
  background: var(--avu-amber-100);
  padding: 4px 10px;
  border-radius: var(--avu-radius-pill);
}

.dd-dest-prep { opacity: .92; }

/* ---------- Latest updates + popular ---------- */

.dd-updates-grid {
  display: grid;
  gap: 28px;
}

@media (min-width: 1020px) {
  .dd-updates-grid { grid-template-columns: 1.9fr 1fr; }
}

.dd-update-list {
  display: grid;
  gap: 16px;
}

@media (min-width: 760px) {
  .dd-update-list { grid-template-columns: 1fr 1fr; }
}

.dd-update-card {
  background: #fff;
  border: 1px solid var(--avu-border);
  border-radius: var(--avu-radius-md);
  overflow: hidden;
  box-shadow: var(--avu-shadow-sm);
  display: flex;
  flex-direction: column;
}

.dd-update-media { display: block; aspect-ratio: 16 / 9; max-height: 220px; overflow: hidden; }

.dd-update-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dd-update-thumb-empty {
  display: grid;
  place-items: center;
  background: linear-gradient(130deg, var(--avu-ink-900), #0d4d8f);
  color: #9fd8ef;
  font-weight: 800;
  letter-spacing: .08em;
  font-size: .85rem;
}

.dd-update-body { padding: 16px 18px 18px; }

.dd-update-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  color: var(--avu-ink-500);
  font-size: .82rem;
  font-weight: 600;
}

.dd-tag {
  background: var(--avu-blue-600);
  color: #fff;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .05em;
  padding: 3px 9px;
  border-radius: 6px;
  text-transform: uppercase;
}

.dd-update-body h3 { margin: 0 0 7px; font-size: 1.05rem; line-height: 1.35; }
.dd-update-body h3 a { color: var(--avu-ink-950); text-decoration: none; }
.dd-update-body h3 a:hover { color: var(--avu-blue-700); }
.dd-update-body p { margin: 0; color: var(--avu-ink-600); font-size: .9rem; }

.dd-empty {
  background: #fff;
  border: 1px dashed var(--avu-border-strong);
  border-radius: var(--avu-radius-md);
  padding: 26px;
}

.dd-empty h3 { margin: 0 0 8px; }
.dd-empty p { margin: 0; color: var(--avu-ink-600); }

.dd-popular {
  background: #fff;
  border: 1px solid var(--avu-border);
  border-radius: var(--avu-radius-md);
  box-shadow: var(--avu-shadow-sm);
  padding: 20px 22px;
  align-self: start;
}

.dd-pop-list { list-style: none; margin: 0; padding: 0; display: grid; }

.dd-pop-list li {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 13px 0;
  border-bottom: 1px solid var(--avu-border);
}

.dd-pop-list li:last-child { border-bottom: 0; }

.dd-pop-num {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: .9rem;
  background: var(--avu-red-100);
  color: var(--avu-red-700);
}

.dd-pop-list li:nth-child(2) .dd-pop-num { background: var(--avu-amber-100); color: var(--avu-amber-700); }
.dd-pop-list li:nth-child(3) .dd-pop-num { background: var(--avu-blue-100); color: var(--avu-blue-700); }
.dd-pop-list li:nth-child(4) .dd-pop-num { background: var(--avu-green-100); color: var(--avu-green-700); }
.dd-pop-list li:nth-child(5) .dd-pop-num { background: #f0e8fd; color: #5b3aa8; }

.dd-pop-list a {
  color: var(--avu-ink-950);
  font-weight: 700;
  text-decoration: none;
  line-height: 1.35;
  display: block;
}

.dd-pop-list a:hover { color: var(--avu-blue-700); }
.dd-pop-list p { margin: 3px 0 0; color: var(--avu-ink-600); font-size: .84rem; }
.dd-pop-arrow { margin-left: auto; color: var(--avu-ink-500); font-size: 1.3rem; line-height: 1; }
.dd-pop-empty { color: var(--avu-ink-600); }

/* ---------- Tools ---------- */

.dd-tools-section { padding-bottom: 48px; }

.dd-tools-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) { .dd-tools-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .dd-tools-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1240px) { .dd-tools-grid { grid-template-columns: repeat(6, 1fr); } }

.dd-tool-card {
  border-radius: var(--avu-radius-md);
  padding: 18px;
  text-decoration: none;
  color: var(--avu-ink-950);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 148px;
  border: 1px solid rgba(7, 27, 49, .05);
}

.dd-tool-card:hover { box-shadow: var(--avu-shadow-md); }
.dd-tool-card h3 { margin: 0; font-size: .98rem; }
.dd-tool-card p { margin: 0; color: var(--avu-ink-700); font-size: .83rem; flex: 1; }

.dd-tool-icon { font-size: 1.5rem; line-height: 1; }
.dd-tool-arrow { font-weight: 800; color: var(--avu-blue-700); }

.dd-tint-rose { background: #fdeeee; }
.dd-tint-blue { background: var(--avu-blue-100); }
.dd-tint-green { background: var(--avu-green-100); }
.dd-tint-violet { background: #f0e8fd; }
.dd-tint-amber { background: var(--avu-amber-100); }
.dd-tint-cyan { background: var(--avu-cyan-100); }

/* ---------- Resources ---------- */

.dd-resources-section { padding-bottom: 56px; }

.dd-resource-grid {
  display: grid;
  gap: 14px;
}

@media (min-width: 760px) { .dd-resource-grid { grid-template-columns: 1fr 1fr; } }

.dd-resource-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--avu-border);
  border-radius: var(--avu-radius-md);
  padding: 18px 20px;
  text-decoration: none;
  color: var(--avu-ink-950);
  box-shadow: var(--avu-shadow-sm);
}

.dd-resource-card p { margin: 2px 0 0; color: var(--avu-ink-600); font-size: .88rem; }
.dd-resource-card > span { margin-left: auto; }
.dd-resource-flag { width: 42px; height: 28px; object-fit: cover; border-radius: 4px; }

/* ---------- Footer ---------- */

.dd-footer {
  background: var(--avu-ink-950);
  color: #cfdff2;
  margin-top: 20px;
}

.dd-footer-inner {
  display: grid;
  gap: 28px;
  padding: 40px 0 26px;
}

@media (min-width: 860px) {
  .dd-footer-inner { grid-template-columns: 1.4fr 1fr 1fr; }
}

.dd-footer strong { color: #fff; font-size: 1.15rem; }
.dd-footer p { margin: 8px 0 0; font-size: .92rem; }
.dd-footer nav { display: flex; flex-direction: column; gap: 8px; }
.dd-footer nav h3 { color: #fff; font-size: .95rem; margin: 0 0 4px; }
.dd-footer a { color: #cfdff2; text-decoration: none; font-size: .92rem; }
.dd-footer a:hover { color: #fff; text-decoration: underline; }
.dd-social a { font-weight: 700; color: #7fd4e6; }

.dd-footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, .14);
  padding: 16px 0 22px;
  font-size: .83rem;
  color: #8fa9c4;
}

.dd-footer-bottom p { margin: 0; }

/* ---------- Search page ---------- */

.dd-search-page-form {
  display: flex;
  gap: 10px;
  margin: 18px 0 24px;
  max-width: 620px;
}

.dd-search-page-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--avu-border-strong);
  border-radius: var(--avu-radius-pill);
  padding: 12px 18px;
  font: inherit;
  background: #fff;
}

.dd-search-page-form button {
  border: 0;
  background: var(--avu-blue-600);
  color: #fff;
  font: inherit;
  font-weight: 700;
  padding: 12px 26px;
  border-radius: var(--avu-radius-pill);
  cursor: pointer;
}

.dd-search-page-form button:hover { background: var(--avu-blue-700); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
