/* ============ MILANO · Interactive Guide ============ */

:root {
  --ink: #46525e;
  --ink-soft: #5a6b7d;
  --paper: #f3f5f7;
  --card: #ffffff;
  --slate: #708090;
  --accent: #e5aa70;
  --accent-dark: #d98d4f;
  --accent-deep: #b06a28;
  --gold: #e5aa70; /* legacy alias */
  --muted: #6a7683;
  --line: #e2e6ea;
  --sky-top: #5d6f80;
  --sky-bottom: #2f3b46;
  --shadow: 0 2px 12px rgba(70, 82, 94, 0.12);
  --shadow-lg: 0 10px 30px rgba(70, 82, 94, 0.18);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, .brand-text {
  font-family: "Playfair Display", Georgia, serif;
}

img { display: block; max-width: 100%; }

code {
  font-family: ui-monospace, "Cascadia Mono", Menlo, monospace;
  font-size: 0.85em;
  background: rgba(16, 27, 45, 0.06);
  padding: 1px 6px;
  border-radius: 5px;
}

.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 22px; }

/* ============ Header ============ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 240, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 10px;
  padding-bottom: 10px;
  flex-wrap: wrap;
}

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

.brand-plane {
  width: 46px;
  height: auto;
  transition: transform 0.4s ease;
}

.brand:hover .brand-plane {
  transform: translateX(6px) rotate(-8deg);
}

.brand-text {
  display: flex;
  flex-direction: column;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.1;
}

.brand-sub {
  font-family: "Inter", sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--muted);
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.nav-btn {
  appearance: none;
  background: none;
  border: none;
  font: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  opacity: 0.72;
  cursor: pointer;
  padding: 8px 11px;
  border-radius: 8px;
  position: relative;
  transition: opacity 0.2s, color 0.2s, background 0.2s;
}

.nav-btn:hover { opacity: 1; background: rgba(16, 27, 45, 0.05); }

.nav-btn.active { opacity: 1; color: var(--ink); font-weight: 600; }

.nav-btn.active::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 3px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

/* ============ Pages ============ */

.page { display: none; }

.page.active { display: block; animation: page-in 0.55s ease both; }

@keyframes page-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.page-body { padding-top: 34px; padding-bottom: 60px; }

/* ============ Hero (home) ============ */

.hero {
  position: relative;
  min-height: min(86vh, 720px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--sky-bottom);
}

.hero-img { position: absolute; inset: 0; }

.hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  /* soft blur + slight zoom so the text stays the star */
  filter: blur(4px) brightness(0.92);
  transform: scale(1.06);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(47, 59, 70, 0.3) 0%,
    rgba(47, 59, 70, 0.06) 40%,
    rgba(47, 59, 70, 0.78) 100%
  );
}

.hero-flight {
  position: absolute;
  left: 0;
  right: 0;
  top: 56%;
  height: 70px;
  pointer-events: none;
  z-index: 2;
}

.hero-route {
  position: absolute;
  left: 7%;
  right: 7%;
  top: 34px;
  border-top: 2px dashed rgba(255, 255, 255, 0.5);
}

.hero-plane-move {
  position: absolute;
  top: 0;
  left: 7%;
  width: 84px;
  animation: hero-fly 30s linear infinite;
}

.hero-plane-move img { width: 100%; height: auto; filter: drop-shadow(0 3px 6px rgba(0,0,0,0.35)); }

@keyframes hero-fly {
  0%   { transform: translate(0, -8px); }
  22%  { transform: translate(21vw, -18px); }
  48%  { transform: translate(43vw, -4px); }
  72%  { transform: translate(65vw, -14px); }
  100% { transform: translate(86vw, -8px); }
}

.hero-text {
  position: relative;
  z-index: 3;
  padding-bottom: 56px;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 10px;
}

.eyebrow.light { color: var(--accent); }

.hero-text h1 {
  font-size: clamp(3.2rem, 9vw, 6.2rem);
  line-height: 1;
  margin-bottom: 14px;
}

.hero-text h1::after {
  content: "";
  display: block;
  width: 96px;
  height: 4px;
  margin-top: 14px;
  background: var(--accent);
  border-radius: 2px;
}

.hero-sub {
  max-width: 560px;
  font-size: 1.08rem;
  margin-bottom: 26px;
  color: rgba(255, 255, 255, 0.92);
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ============ Buttons ============ */

.btn {
  appearance: none;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 10px;
  padding: 11px 22px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s, color 0.2s;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: none; }

.btn.primary {
  background: var(--slate);
  color: #fff;
  box-shadow: 0 6px 18px rgba(112, 128, 144, 0.4);
}

.btn.primary:hover { background: #5c6b7b; }

.btn.ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.65);
}

.btn.ghost:hover { background: rgba(255, 255, 255, 0.14); }

.btn.ghost.dark { color: var(--slate); border-color: var(--slate); }
.btn.ghost.dark:hover { background: rgba(112, 128, 144, 0.12); }

/* ============ Boarding pass ============ */

.boarding-pass {
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  margin-top: -46px;
  position: relative;
  z-index: 5;
  padding: 22px 26px 18px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.bp-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.bp-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.bp-top h3 {
  font-family: "Inter", sans-serif;
  font-size: 1.15rem;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

.bp-emoji { font-size: 1.9rem; }

.bp-route {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0 10px;
}

.bp-route > div { display: flex; flex-direction: column; }

.bp-route strong {
  font-family: "Playfair Display", serif;
  font-size: 1.25rem;
}

.bp-arrow { font-size: 1.5rem; color: var(--accent-deep); }

.bp-meta {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  padding-bottom: 12px;
}

.bp-meta span { display: flex; flex-direction: column; }
.bp-meta em {
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.bp-perf {
  position: relative;
  border-top: 2px dashed #cbd2da;
  margin: 4px 0 12px;
}

.bp-perf::before,
.bp-perf::after {
  content: "";
  position: absolute;
  top: -9px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--paper);
}

.bp-perf::before { left: -26px; }
.bp-perf::after { right: -26px; }

.bp-note { font-size: 0.85rem; color: var(--muted); }

/* ============ Section titles & grids ============ */

.section-title {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: 1.65rem;
  margin: 54px 0 22px;
}

.section-title span {
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #4a3a24;
  background: var(--accent);
  border-radius: 6px;
  padding: 4px 10px;
  white-space: nowrap;
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.tile {
  position: relative;
  background: var(--card);
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 22px;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  overflow: hidden;
}

.tile:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.tile-emoji { font-size: 2rem; }

.tile h3 { font-size: 1.3rem; margin: 10px 0 6px; }

.tile p { font-size: 0.92rem; color: var(--muted); }

.tile-go {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
  transition: transform 0.2s;
}

.tile:hover .tile-go { transform: translateX(5px); }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
}

.stat strong {
  font-family: "Playfair Display", serif;
  font-size: 1.7rem;
  color: var(--ink-soft);
}

.stat span { font-size: 0.83rem; color: var(--muted); }

/* ============ Page heroes ============ */

.page-hero {
  background: linear-gradient(150deg, var(--sky-top), var(--sky-bottom));
  color: #fff;
  padding: 64px 0 54px;
}

/* All page heroes share the slate brand gradient defined on .page-hero */

.page-hero h2 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.1;
  margin-bottom: 12px;
}

.page-hero p:last-child { max-width: 640px; color: rgba(255, 255, 255, 0.88); }

/* ============ Cards ============ */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}

.card {
  background: var(--card);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.card-img {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #eef1f6, #dde4ee);
  position: relative;
  overflow: hidden;
}

.card-img img { width: 100%; height: 100%; object-fit: cover; }

.card-body { padding: 18px 20px 22px; }

.card-body h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.card-body p { font-size: 0.94rem; color: var(--muted); }

.card-note { margin-top: 12px; font-size: 0.85rem; }

/* Image placeholder (shown until the real file is added) */

.img-ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 100%;
  padding: 16px;
  text-align: center;
  color: #8a93a5;
}

.img-ph .ph-emoji { font-size: 2.6rem; }

.img-ph .ph-name {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #98a1b0;
  background: #fff;
  border: 1.5px dashed #c6cedb;
  border-radius: 6px;
  padding: 3px 9px;
}

.img-ph .ph-label { font-size: 0.8rem; }

/* ============ Italy map ============ */

/* The map card spans the full row for a big, readable map */

.map-card { grid-column: 1 / -1; }

.map-card .card-body { text-align: center; }

.italy-map { max-width: 560px; margin: 10px auto 0; }

.italy-map img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

/* ============ Route table ============ */

.route-card { margin-top: 22px; }

.route-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }

.route-table th {
  text-align: left;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 2px solid var(--line);
  padding: 8px 10px;
}

.route-table td {
  border-bottom: 1px solid var(--line);
  padding: 11px 10px;
}

.route-table tr:last-child td { border-bottom: none; }

.route-table td:first-child { font-weight: 600; }

/* ============ Events ============ */

.event-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 30px;
}

.event-row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.event-row:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.event-date {
  flex: 0 0 auto;
  background: var(--ink);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  border-radius: 8px;
  padding: 6px 12px;
  margin-top: 3px;
}

.event-row h3 { font-size: 1.2rem; margin-bottom: 4px; }
.event-row p { font-size: 0.93rem; color: var(--muted); }

/* ============ Lists & callout ============ */

.check-list { list-style: none; }

.check-list li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
  font-size: 0.93rem;
  color: var(--muted);
}

.check-list li::before {
  content: "✈";
  position: absolute;
  left: 0;
  top: 1px;
  font-size: 0.82rem;
  color: var(--accent-deep);
}

.check-list li:last-child { margin-bottom: 0; }

.callout {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 34px;
  background: linear-gradient(135deg, #fdf6ee, #faead9);
  border: 1px solid #ecd6bb;
  border-radius: 14px;
  padding: 18px 22px;
  font-size: 0.98rem;
}

.callout span { font-size: 1.8rem; }

/* ============ Page nav ============ */

.page-nav {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* ============ Footer ============ */

.site-footer {
  margin-top: auto;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
  padding: 26px 0;
  font-size: 0.92rem;
}

.footer-small { margin-top: 4px; font-size: 0.8rem; opacity: 0.65; }

.site-footer code { background: rgba(255, 255, 255, 0.1); }

/* Hubris Network branding */

.hubris-link { display: inline-block; text-decoration: none; }

.hubris-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(229, 170, 112, 0.6);
  border-radius: 999px;
  padding: 7px 18px;
  margin-bottom: 14px;
  transition: border-color 0.2s, background 0.2s;
}

.hubris-link:hover .hubris-brand {
  border-color: var(--accent);
  background: rgba(229, 170, 112, 0.1);
}

.hubris-mark { color: var(--accent); font-size: 1.05rem; }

.hubris-name {
  font-weight: 800;
  letter-spacing: 0.28em;
  font-size: 0.95rem;
  color: #fff;
}

.hubris-net { color: var(--accent); margin-left: 8px; }

.hubris-tag {
  margin-top: 4px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.55;
}

/* ============ Flight transition overlay ============ */

.flight-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  background: linear-gradient(170deg, var(--sky-top) 0%, var(--sky-bottom) 70%);
  transition: opacity 0.35s ease, visibility 0.35s;
  overflow: hidden;
}

.flight-overlay.active { opacity: 1; visibility: visible; }

.cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  filter: blur(14px);
  opacity: 0;
}

.flight-overlay.active .cloud { animation: drift 4.5s ease-in-out; }

.c1 { width: 260px; height: 90px; top: 18%; left: -8%; }
.c2 { width: 340px; height: 110px; top: 58%; left: -12%; }
.c3 { width: 220px; height: 80px; top: 36%; right: -10%; }

@keyframes drift {
  from { opacity: 0; transform: translateX(0); }
  30% { opacity: 1; }
  to { opacity: 0.6; transform: translateX(60px); }
}

.plane-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  pointer-events: none;
}

.plane-move {
  position: relative;
  flex: 0 0 auto;
  width: 210px;
  opacity: 0;
}

.flight-overlay.active .plane-move {
  opacity: 1;
  animation: fly-across 4s cubic-bezier(0.45, 0, 0.55, 1) forwards;
}

/* Straight, level flight through the centre of the screen */
@keyframes fly-across {
  from { transform: translateX(-260px); }
  to   { transform: translateX(calc(100vw + 220px)); }
}

.contrail {
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  width: 240px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8));
}

.plane { width: 100%; height: auto; display: block; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.4)); }

/* Loading-screen status: progress bar + destination, fixed under the flight line */

.flight-status {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, 150px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transition: opacity 0.3s ease 0.15s;
}

.flight-overlay.active .flight-status { opacity: 1; }

.flight-progress {
  width: min(320px, 56vw);
  height: 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
}

.progress-fill {
  width: 100%;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), #f6c99e);
  transform: scaleX(0);
  transform-origin: left center;
}

.flight-overlay.active .progress-fill {
  animation: fill-across 4s cubic-bezier(0.45, 0, 0.55, 1) forwards;
}

@keyframes fill-across { to { transform: scaleX(1); } }

.fly-label {
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* ============ Responsive ============ */

@media (max-width: 760px) {
  .header-inner { justify-content: center; }
  .main-nav { justify-content: center; }
  .hero { min-height: 72vh; }
  .hero-text { padding-bottom: 36px; }
  .event-row { flex-direction: column; gap: 10px; }
  .boarding-pass { margin-top: -30px; }
  .page-nav { flex-direction: column; }
  .page-nav .btn { width: 100%; }
}

/* ============ Reduced motion ============ */

@media (prefers-reduced-motion: reduce) {
  .flight-overlay,
  .flight-overlay.active,
  .plane-move,
  .flight-overlay.active .plane-move,
  .flight-overlay.active .cloud,
  .flight-status,
  .flight-overlay.active .flight-status,
  .flight-overlay.active .progress-fill,
  .hero-plane-move {
    animation: none !important;
    transition: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
  }

  .page.active { animation: none; }

  .tile:hover,
  .event-row:hover,
  .btn:hover { transform: none; }
}
