/* Pianificatore di Viaggi — tema "montagna d'inverno" · craft alla Apple (profondità, materiali, tipografia). */
:root {
  --bg: #f3eee2; --bg2: #e9e0cf; --card: #fffdf8; --card2: #fbf7ee;
  --ink: #1f2b33; --ink-soft: #46545f; --ink-faint: #808c96;
  --line: #e5dcc9; --line-soft: #efe8d9;
  --pine-950: #0a2721; --pine-900: #0e332d; --pine-800: #144a42; --pine-700: #1c6b60; --pine-600: #2a897b; --pine-300: #9fd0c3;
  --sky-1: #cfe3ea; --sky-2: #e7eef0; --snow: #fbfdff;
  --amber: #c8722e; --amber-soft: #f3e3cd; --terra: #b4552f;
  --red: #b23b32; --green: #2f8f5b; --gold: #b8892b;
  --r-xl: 22px; --r-lg: 18px; --r-md: 12px; --r-sm: 9px;
  --shadow-1: 0 1px 2px rgba(16,40,34,.05), 0 10px 24px rgba(16,40,34,.07);
  --shadow-2: 0 2px 6px rgba(16,40,34,.06), 0 24px 60px rgba(16,40,34,.13);
  --font-display: "Fraunces", Georgia, serif; --font-ui: "Public Sans", system-ui, sans-serif; --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-ui); color: var(--ink); background: var(--bg); min-height: 100vh; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--pine-700); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; margin: 0; color: var(--ink); font-optical-sizing: auto; }
h1 { letter-spacing: -0.02em; line-height: 1.05; }
h2 { letter-spacing: -0.015em; line-height: 1.12; }
h3 { letter-spacing: -0.01em; line-height: 1.18; }
.mono { font-family: var(--font-mono); } .muted { color: var(--ink-faint); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 28px 24px 64px; }

/* header translucido (materiale) */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 12px 24px; color: #eef6f1;
  background: linear-gradient(180deg, rgba(14,51,45,.86), rgba(10,39,33,.82)); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid rgba(159,208,195,.18); box-shadow: 0 8px 24px rgba(10,39,33,.18); }
.topbar .brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.12rem; color: #fff; letter-spacing: -0.01em; }
.topbar .brand svg { width: 26px; height: 26px; }
.topbar .spacer { flex: 1; }
.topbar .who { font-size: .84rem; color: #bfe0d4; }

/* hero con scenografia montana (SVG di sfondo posizionato nell'HTML) */
.hero { position: relative; overflow: hidden; border-radius: var(--r-xl); color: #f2faf6; margin-bottom: 26px; box-shadow: var(--shadow-2);
  background: linear-gradient(180deg, #16414d 0%, #17564c 46%, #0e332d 100%); }
.hero .scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero .inner { position: relative; z-index: 2; padding: 46px 40px; }
.hero .kick { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .24em; text-transform: uppercase; color: #a9d3c6; margin-bottom: 12px; }
.hero h1 { color: #fff; font-size: clamp(2rem, 5.2vw, 3.2rem); text-shadow: 0 2px 20px rgba(0,0,0,.25); }
.hero .lede { max-width: 40ch; margin-top: 12px; color: #e6f2ec; font-size: 1.05rem; }
.hero .meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.hero .chip { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); color: #f2faf6; border-radius: 99px; padding: 6px 13px; font-size: .84rem; backdrop-filter: blur(6px); }

/* card generiche */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); padding: 20px; }
.grid { display: grid; gap: 18px; }
.viaggi { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

/* trip card (home) */
.trip { position: relative; overflow: hidden; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow-1); transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .18s; display: block; color: inherit; }
.trip:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); text-decoration: none; }
.trip .top { position: relative; height: 132px; overflow: hidden; }
.trip .top svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.trip .body { padding: 15px 17px 17px; }
.trip .body h3 { font-size: 1.25rem; }
.trip .dates { color: var(--ink-faint); font-size: .86rem; margin-top: 2px; }
.trip .go { margin-top: 12px; }

/* bottoni */
.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; padding: 9px 16px; border-radius: var(--r-sm); border: 1px solid transparent; cursor: pointer; font-family: var(--font-ui); text-decoration: none; transition: transform .12s, box-shadow .12s, background .12s, filter .12s; }
.btn:active { transform: scale(.98); }
.btn-pine { background: linear-gradient(180deg, #2a897b, #1c6b60); color: #fff; box-shadow: 0 8px 20px rgba(28,107,96,.26); }
.btn-pine:hover { filter: brightness(1.04); text-decoration: none; }
.btn-amber { background: linear-gradient(180deg, #d17e36, #b4552f); color: #fff; } .btn-amber:hover { filter: brightness(1.03); text-decoration: none; }
.btn-ghost { background: rgba(255,255,255,.6); color: var(--ink-soft); border-color: var(--line); } .btn-ghost:hover { background: #fff; text-decoration: none; }
.btn-sm { padding: 6px 12px; font-size: .82rem; }

/* hotel card (dossier) */
.hotel { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow-1); overflow: hidden; margin-bottom: 18px; }
.hotel .head { display: flex; align-items: flex-start; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--line-soft); background: linear-gradient(180deg, var(--card2), var(--card)); }
.hotel .rank { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; color: #fff; background: radial-gradient(circle at 30% 25%, #2a897b, #0e332d); }
.hotel .h-main { flex: 1; min-width: 0; }
.hotel .h-main h3 { font-size: 1.25rem; }
.hotel .h-sub { color: var(--ink-faint); font-size: .86rem; margin-top: 2px; }
.hotel .score { flex: 0 0 auto; text-align: center; background: var(--pine-700); color: #fff; border-radius: 10px; padding: 6px 10px; min-width: 52px; }
.hotel .score b { font-family: var(--font-display); font-size: 1.2rem; display: block; line-height: 1; }
.hotel .score span { font-size: .62rem; opacity: .85; letter-spacing: .04em; }
.hotel .body { padding: 16px 20px 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.chip2 { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; padding: 4px 11px; border-radius: 99px; border: 1px solid var(--line); background: var(--card2); color: var(--ink-soft); }
.chip2.ok { background: #e6f2ea; border-color: #cfe6d8; color: #1f7a4d; }
.chip2.no { background: #f6e7e4; border-color: #eccfc8; color: var(--red); }
.chip2.pay { background: var(--amber-soft); border-color: #e9d3b4; color: var(--amber); }
.price { font-family: var(--font-display); font-weight: 700; color: var(--ink); }
.price .band { font-family: var(--font-ui); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint); margin-left: 8px; }
.src { font-size: .8rem; color: var(--ink-faint); } .src a { color: var(--pine-700); }
.warn { font-size: .82rem; color: var(--amber); background: var(--amber-soft); border-radius: var(--r-sm); padding: 7px 11px; display: inline-block; }

/* tabella comparativa */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); background: var(--card); }
table.cmp { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 720px; }
table.cmp th, table.cmp td { padding: 11px 13px; text-align: left; border-bottom: 1px solid var(--line-soft); }
table.cmp thead th { position: sticky; top: 0; background: var(--card2); font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
table.cmp tbody tr:hover { background: var(--card2); }
table.cmp td.center, table.cmp th.center { text-align: center; }

/* box messaggio copiabile */
.copybox { position: relative; background: #0c2a24; color: #d3ece0; border-radius: var(--r-md); padding: 16px 18px; font-family: var(--font-mono); font-size: .84rem; white-space: pre-wrap; line-height: 1.6; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--amber-soft); color: var(--amber); }
.pill { display: inline-flex; align-items: center; gap: 6px; background: var(--bg2); border: 1px solid var(--line); border-radius: 99px; padding: 3px 11px; font-size: .78rem; color: var(--ink-soft); }
.sep { height: 1px; background: var(--line); border: 0; margin: 22px 0; }
.notice { padding: 11px 13px; border-radius: var(--r-sm); font-size: .88rem; } .notice.err { background: #f6ddd8; color: var(--red); }
.hidden { display: none !important; }
.kicker { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--pine-600); }

@media (max-width: 640px) { .wrap { padding: 20px 16px 48px; } .hero .inner { padding: 34px 24px; } }
@media (prefers-reduced-motion: reduce) { .trip, .btn { transition: none; } .trip:hover { transform: none; } }
@media (prefers-reduced-transparency: reduce) { .topbar { background: var(--pine-900); backdrop-filter: none; -webkit-backdrop-filter: none; } }
