/* =========================================================
   TRIPUFY · Estils (una sola pàgina, fons blau marí)
   Fonts del sistema: no carreguem Google Fonts per no enviar
   la IP dels visitants a tercers (RGPD més senzill).
   ========================================================= */

:root {
  --navy-950: #050f22;
  --navy-900: #081a33;
  --navy-800: #0d2444;
  --navy-700: #163663;
  --line-dark: rgba(255, 255, 255, .1);
  --ink-soft: #a9bbd4;      /* text secundari sobre blau */
  --ink-faint: #6f86a6;
  --white: #ffffff;
  --gold: #f5b942;
  --gold-600: #e3a52a;
  --green: #22b47a;

  --text: #13233a;          /* text dins targetes blanques */
  --muted: #5d6b7e;
  --line: #e3e8ef;

  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-accent: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;

  --r: 16px;
  --r-lg: 24px;
  --shadow-lg: 0 40px 80px -30px rgba(0, 0, 0, .6);
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--white);
  -webkit-font-smoothing: antialiased;
  /* Cel nocturn: degradat blau marí + punts com estrelles */
  background:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,.55) 50%, transparent 51%),
    radial-gradient(1px 1px at 72% 9%, rgba(255,255,255,.45) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 88% 34%, rgba(255,255,255,.4) 50%, transparent 51%),
    radial-gradient(1px 1px at 36% 42%, rgba(255,255,255,.35) 50%, transparent 51%),
    radial-gradient(1px 1px at 55% 22%, rgba(255,255,255,.3) 50%, transparent 51%),
    radial-gradient(900px 600px at 85% -10%, rgba(64, 120, 200, .35), transparent 60%),
    radial-gradient(700px 500px at -10% 40%, rgba(245, 185, 66, .10), transparent 60%),
    var(--navy-900);
  background-repeat: no-repeat;
  position: relative;
  overflow-x: hidden;
}
svg { display: block; }
.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none; }
[hidden] { display: none !important; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; letter-spacing: -0.025em; margin: 0; }
h1 { font-size: clamp(2.5rem, 6vw, 4.4rem); font-weight: 700; }
h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; }
h3 { font-size: 1.35rem; font-weight: 700; }
h1 em {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: -0.01em;
}

/* Ruta de vol de fons */
.sky-route { position: absolute; top: 0; left: 0; width: 100%; height: 900px; pointer-events: none; z-index: 0; }
.sky-route path { fill: none; stroke: rgba(169, 187, 212, .35); stroke-width: 1.5; stroke-dasharray: 2 10; stroke-linecap: round; }

/* ===== Capçalera ===== */
.site-header { position: relative; z-index: 2; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 84px; gap: 16px; }
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 1.8rem var(--font-display); letter-spacing: -0.03em;
  color: var(--white); text-decoration: none;
}
.logo-mark { display: block; width: 60px; height: 60px; }
/* La "p" i la "y" baixen per sota de la línia i fan que el text sembli més avall que la brúixula */
.logo-text { line-height: 1; transform: translateY(-.07em); }
.logo-accent { color: var(--gold); }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line-dark); background: rgba(255,255,255,.05);
  border-radius: 999px; padding: 6px 14px 6px 11px;
  font-size: .85rem; font-weight: 600; color: var(--ink-soft);
}
.pill-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(245,185,66,.25); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(245,185,66,0); } }

/* ===== Hero ===== */
.hero { position: relative; z-index: 1; padding: 48px 0 0; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 64px; align-items: center; }
.lead { font-size: 1.2rem; color: var(--ink-soft); margin: 24px 0 40px; max-width: 32em; }

.choose-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 14px; }
.choose-label { margin: 0; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }
.benefits-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px 5px 10px; border-radius: 999px;
  background: rgba(245,185,66,.14); border: 1px solid rgba(245,185,66,.45);
  color: var(--gold); font-size: .8rem; font-weight: 700; white-space: nowrap;
}
.benefits-badge svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 600px; }
.choice {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 20px 22px; border-radius: var(--r);
  background: rgba(255,255,255,.06); border: 1.5px solid var(--line-dark);
  color: var(--white); text-decoration: none;
  transition: transform .2s, background .2s, border-color .2s;
}
.choice:hover { transform: translateY(-3px); background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.3); }
.choice-text { display: flex; flex-direction: column; gap: 2px; }
.choice strong { font-size: 1.08rem; }
.choice-text span { font-size: .88rem; color: var(--ink-soft); line-height: 1.4; }
.choice svg { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.choice:hover svg { transform: translateX(4px); }
.choice-primary { background: var(--gold); border-color: var(--gold); color: var(--navy-950); box-shadow: 0 16px 34px -14px rgba(245,185,66,.8); }
.choice-primary:hover { background: var(--gold-600); border-color: var(--gold-600); }
.choice-primary .choice-text span { color: rgba(5,15,34,.75); }

/* --- Targeta d'embarcament --- */
.hero-visual { justify-self: center; width: 100%; max-width: 410px; }
.pass {
  background: var(--white); color: var(--text);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: rotate(3deg);
  transition: transform .4s;
}
.pass:hover { transform: rotate(0deg) translateY(-4px); }
.pass-top { display: flex; justify-content: space-between; align-items: center; background: var(--gold); color: var(--navy-950); padding: 15px 22px; }
.pass-brand { font: 700 1.1rem var(--font-display); letter-spacing: -0.02em; }
.pass-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .16em; opacity: .9; }
.pass-route { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 22px 22px 6px; }
.pass-route .right { text-align: center; }
.pass-code { display: block; font: 700 2rem var(--font-display); color: var(--navy-900); letter-spacing: -0.02em; line-height: 1; }
.pass-city { font-size: .8rem; color: var(--muted); }
.pass-plane { flex: 1; display: flex; align-items: center; gap: 4px; min-width: 50px; max-width: 110px; }
.pass-dots { flex: 1; border-top: 2px dotted #9fb3cc; }
.pass-plane svg { width: 26px; height: 26px; flex-shrink: 0; fill: var(--gold); transform: rotate(90deg); }
.pass-grid { display: grid; grid-template-columns: auto auto auto auto; justify-content: space-between; padding: 14px 22px 20px; }
.pass-grid div { padding: 0 10px; border-left: 1px solid var(--line); }
.pass-grid div:first-child { padding-left: 0; border-left: 0; }
.pass-grid div:last-child { padding-right: 0; }
.pass-grid span { display: block; font-size: .62rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.pass-grid strong { font-size: .86rem; color: var(--navy-900); white-space: nowrap; }
.pass-cut { position: relative; border-top: 2px dashed var(--line); margin: 0 18px; }
.pass-cut::before, .pass-cut::after {
  content: ""; position: absolute; top: -13px; width: 24px; height: 24px; border-radius: 50%; background: var(--navy-900);
}
.pass-cut::before { left: -32px; }
.pass-cut::after { right: -32px; }
.pass-steps { list-style: none; margin: 0; padding: 20px 22px 6px; display: grid; gap: 12px; }
.pass-steps li { display: flex; align-items: center; gap: 12px; font-size: .92rem; color: var(--muted); }
.pass-steps li::before { content: ""; width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; border: 2px solid var(--line); }
.pass-steps li.done { color: var(--navy-900); }
.pass-steps li.done::before {
  border-color: var(--green);
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 10 3 3 7-7' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
}
.pass-steps li.current { color: var(--navy-900); font-weight: 600; }
.pass-steps li.current::before { border-color: var(--gold); background: var(--gold); box-shadow: inset 0 0 0 4px #fff; }
/* Codi de barres en SVG: es veu net encara que la targeta estigui girada */
.pass-barcode { display: block; width: calc(100% - 44px); height: 44px; margin: 14px 22px 22px; }
.pass-barcode rect { fill: var(--navy-900); }

/* --- Aerolínies --- */
.airlines { padding-top: 80px; padding-bottom: 88px; text-align: center; }
.airlines p { margin: 0 0 18px; font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); }
.airline-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.airline-list li {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--white); color: var(--c1);
  padding: 8px 16px 8px 12px; border-radius: 999px;
  font: 700 .95rem var(--font-display); letter-spacing: -0.01em;
  box-shadow: 0 6px 16px -8px rgba(0,0,0,.5);
  transition: transform .2s;
}
.airline-list li:hover { transform: translateY(-2px); }
.airline-list li::before {
  content: ""; width: 12px; height: 12px; border-radius: 50%;
  background: linear-gradient(135deg, var(--c1) 50%, var(--c2) 50%);
}

/* ===== Blocs (azafata / mentor) ===== */
.block { position: relative; z-index: 1; padding: 104px 0; border-top: 1px solid var(--line-dark); scroll-margin-top: 0; }
.block-alt { background: var(--navy-950); }
.block-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.tag {
  display: inline-block; margin-bottom: 16px;
  padding: 5px 12px; border-radius: 999px;
  background: rgba(245,185,66,.14); color: var(--gold);
  font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.tag-gold { background: rgba(245,185,66,.14); color: var(--gold); }

/* Passos numerats amb línia vertical */
.steps { list-style: none; margin: 36px 0 0; padding: 0; counter-reset: step; }
.steps li {
  position: relative; counter-increment: step;
  padding: 0 0 30px 64px;
}
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: -4px;
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: var(--navy-700); border: 1px solid rgba(255,255,255,.15);
  font: 700 1rem var(--font-display); color: var(--white);
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; left: 20px; top: 44px; bottom: 4px;
  border-left: 2px dashed rgba(255,255,255,.15);
}
.steps strong { display: block; font-size: 1.1rem; margin-bottom: 4px; }
.steps span { color: var(--ink-soft); font-size: .97rem; }
#azafata .steps li:first-child::before { background: var(--gold); border-color: var(--gold); color: var(--navy-950); }
#mentor .steps li:first-child::before { background: var(--gold); border-color: var(--gold); color: var(--navy-950); }

/* ===== Botons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; padding: 15px 24px; border: 0; border-radius: 999px;
  background: var(--gold); color: var(--navy-950);
  font: 700 1rem var(--font); cursor: pointer;
  box-shadow: 0 12px 24px -12px rgba(245,185,66,.9);
  transition: background .2s, transform .15s;
}
.btn:hover { background: var(--gold-600); transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: var(--navy-950); box-shadow: 0 12px 24px -12px rgba(245,185,66,.9); }
.btn-gold:hover { background: var(--gold-600); }
.link {
  background: none; border: 0; padding: 0; font: inherit; color: inherit;
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}

/* ===== Formularis ===== */
.form-card {
  position: relative;
  background: var(--white); color: var(--text);
  border-radius: var(--r-lg); padding: 36px;
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 18px;
}
.form-card h3 { color: var(--navy-900); }
.form-sub { margin: -10px 0 4px; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-weight: 600; font-size: .9rem; color: var(--navy-900); }
.field input {
  width: 100%; padding: 14px 16px;
  font: 1rem var(--font); color: var(--text);
  background: #f6f8fb; border: 1.5px solid var(--line); border-radius: 12px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field input::placeholder { color: #a2adbb; }
/* Preu amb selector de moneda (€ / $) */
.input-money { position: relative; }
.input-money input { padding-right: 76px; }
.input-money select {
  position: absolute; top: 6px; right: 6px; bottom: 6px;
  appearance: none; -webkit-appearance: none;
  padding: 0 26px 0 14px; border: 0; border-radius: 8px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%235d6b7e' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 8px center/12px no-repeat;
  box-shadow: 0 0 0 1px var(--line);
  font: 700 1rem var(--font); color: var(--navy-900); cursor: pointer;
}
.input-money select:focus { outline: none; box-shadow: 0 0 0 2px var(--navy-700); }
.field input:focus { outline: none; background: #fff; border-color: var(--navy-700); box-shadow: 0 0 0 4px rgba(22,54,99,.14); }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: .87rem; color: var(--muted); line-height: 1.5; cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--navy-700); cursor: pointer; }
.consent .link { color: var(--navy-700); }
/* Benefici per registrar-se abans del llançament */
.perk {
  position: relative; margin-top: 8px;
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: 12px;
  background: #fdf5e2; border: 1px solid #f3dca4;
}
.perk-badge {
  position: absolute; top: -11px; left: 14px;
  padding: 2px 10px; border-radius: 999px;
  background: var(--green); color: #fff;
  font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; line-height: 1.6;
  box-shadow: 0 4px 10px -4px rgba(34,180,122,.7);
}
.perk { padding-top: 18px; }
.perk svg { width: 22px; height: 22px; flex-shrink: 0; margin-top: 1px; fill: none; stroke: var(--gold-600); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.perk p { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.perk strong { color: var(--navy-900); font-size: .95rem; line-height: 1.35; }
.perk p span { color: var(--muted); font-size: .85rem; line-height: 1.45; }
.form-error { margin: 0; color: #c8372d; font-size: .9rem; text-align: center; }

/* Estat "enviat": tapem el formulari amb el missatge */
.form-done {
  position: absolute; inset: 0; border-radius: inherit;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  background: var(--white); padding: 36px;
}
.form-done p { color: var(--muted); margin: 8px 0 0; }
.done-icon { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; background: #e3f6ee; margin-bottom: 18px; }
.done-icon svg { width: 32px; height: 32px; fill: none; stroke: var(--green); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ===== Peu ===== */
.site-footer { position: relative; z-index: 1; border-top: 1px solid var(--line-dark); background: var(--navy-950); color: var(--ink-faint); font-size: .9rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; padding-top: 26px; padding-bottom: 26px; gap: 16px; }
.site-footer .link { color: var(--ink-soft); }

/* ===== Finestra de privacitat ===== */
.privacy {
  width: min(640px, calc(100% - 32px)); max-height: 85vh;
  border: 0; border-radius: var(--r-lg); padding: 0;
  color: var(--text); background: var(--white); box-shadow: var(--shadow-lg);
}
.privacy::backdrop { background: rgba(5, 15, 34, .7); backdrop-filter: blur(4px); }
.privacy-inner { position: relative; padding: 36px; }
.privacy h2 { font-size: 1.6rem; color: var(--navy-900); margin-bottom: 16px; }
.privacy p { margin: 0 0 12px; font-size: .95rem; color: #3c4a5d; }
.privacy-close {
  position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: #eef2f7; color: var(--navy-900); font-size: 1.4rem; line-height: 1; cursor: pointer;
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .hero-grid, .block-grid { grid-template-columns: 1fr; gap: 56px; }
  .hero-visual { max-width: 340px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .header-inner { height: 72px; }
  .logo-mark { width: 50px; height: 50px; }
  .logo { font-size: 1.55rem; }
  .pill { font-size: .78rem; padding: 5px 12px 5px 9px; }
  .hero { padding-top: 24px; }
  .lead { font-size: 1.08rem; margin-bottom: 32px; }
  .choices { grid-template-columns: 1fr; }
  .pass { transform: rotate(2deg); }
  .pass-code { font-size: 1.6rem; }
  .pass-grid strong { font-size: .78rem; }
  .pass-grid div { padding: 0 7px; }
  .airlines { padding-top: 64px; padding-bottom: 64px; }
  .block { padding: 72px 0; }
  .form-card { padding: 26px 20px; }
  .privacy-inner { padding: 28px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
