/* Web de Hopper. Mateix món visual que l'app (tema Hopper): nit blava, blau Hopper, vidre fi. */
:root {
  --bg: #0a1122;
  --bg-2: #0e1730;
  --surface: #121d3a;
  --line: #1f2c50;
  --line-2: #2a3a66;
  --ink: #eaf0fc;
  --ink-2: #b4c1de;
  --muted: #8d9bbd;
  --blue: #2b6bff;
  --blue-2: #5ea3ff;
  --amber: #f3b23d;
  --green: #48d597;
  --radius-l: 22px;
  --radius-m: 14px;
  --radius-s: 9px;
  --font: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  --display: "Bricolage Grotesque", "Instrument Sans", ui-sans-serif, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --wrap: 1160px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: color-mix(in srgb, var(--blue) 55%, transparent); color: #fff; }
:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; display: block; }
a { color: var(--blue-2); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: #9cc6ff; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.025em; line-height: 1.05; margin: 0; text-wrap: balance; }
p { margin: 0; }
html { scrollbar-color: var(--line-2) var(--bg); }

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

/* El cel nocturn: un sol halo blau darrere de l'escenari, fix. */
.sky {
  position: absolute; inset: 0 0 auto; height: 1100px; pointer-events: none; z-index: -1;
  background:
    radial-gradient(60% 50% at 50% 38%, rgba(43, 107, 255, 0.28), transparent 70%),
    radial-gradient(40% 30% at 85% 10%, rgba(94, 163, 255, 0.12), transparent 70%);
}

/* ---------- Capçalera ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.top .wrap { display: flex; align-items: center; gap: 22px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 19px var(--display); letter-spacing: -0.02em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.top nav { display: flex; gap: 22px; margin-left: 12px; }
.top nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; }
.top nav a:hover { color: var(--ink); }
.top .spacer { flex: 1; }

.lang { position: relative; }
.lang summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 7px;
  color: var(--ink-2); font-size: 14.5px; padding: 7px 11px; border-radius: 10px;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover, .lang[open] summary { background: var(--surface); color: var(--ink); }
.lang ul {
  position: absolute; right: 0; top: calc(100% + 8px); margin: 0; padding: 6px; list-style: none; min-width: 180px;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 14px;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.6);
}
.lang li a { display: block; padding: 7px 11px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: 15px; }
.lang li a:hover { background: var(--surface); color: var(--ink); }
.lang li a[aria-current="true"] { color: var(--ink); background: color-mix(in srgb, var(--blue) 22%, transparent); }

/* ---------- Botons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 46px; padding: 0 20px; border-radius: 12px; border: 0; cursor: pointer;
  font: 600 16px var(--font); text-decoration: none; white-space: nowrap;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(180deg, #3a78ff, var(--blue)); color: #fff; box-shadow: 0 8px 24px -8px rgba(43, 107, 255, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.2); }
.btn-primary:hover { color: #fff; background: linear-gradient(180deg, #4c85ff, #326fff); }
.btn-quiet { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-quiet:hover { color: var(--ink); background: #172447; }
.btn-small { height: 36px; padding: 0 14px; font-size: 14.5px; border-radius: 10px; }
.btn[aria-disabled="true"] { opacity: 0.55; cursor: default; pointer-events: none; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- Portada ---------- */
.hero { padding: 92px 0 38px; text-align: center; }
.hero h1 { font-size: clamp(44px, 7.4vw, 92px); max-width: 15ch; margin-inline: auto; }
.lede { margin: 24px auto 0; max-width: 58ch; font-size: clamp(18px, 2vw, 21px); color: var(--ink-2); }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }
.fine { margin-top: 16px; color: var(--muted); font-size: 14.5px; }

/* L'escenari: el selector de modes de l'app sobre una finestra amb captures reals. */
.stage { position: relative; margin: 34px auto 0; width: min(1240px, 100% - 32px); }
.modes {
  position: relative; display: inline-flex; padding: 5px; gap: 2px; margin: 0 auto 22px;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 14px;
}
.stage-head { display: flex; justify-content: center; }
.modes button {
  position: relative; z-index: 1; border: 0; background: none; color: var(--ink-2); cursor: pointer;
  font: 600 15px var(--font); padding: 9px 18px; border-radius: 10px; display: flex; align-items: center; gap: 8px;
}
.modes button[aria-selected="true"] { color: #fff; }
.modes button svg { width: 17px; height: 17px; }
.modes .pill {
  position: absolute; z-index: 0; top: 5px; bottom: 5px; left: 5px; width: 0; border-radius: 10px;
  background: linear-gradient(180deg, #3a78ff, var(--blue));
  box-shadow: 0 6px 18px -6px rgba(43, 107, 255, 0.9);
  transition: left 0.42s cubic-bezier(0.22, 1, 0.36, 1), width 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}
/* El salt del conill: la píndola fa un bot en canviar de mode. */
.modes .pill.hop { animation: hop 0.42s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes hop { 0% { transform: translateY(0); } 45% { transform: translateY(-9px) scaleX(0.94); } 100% { transform: translateY(0); } }

.window {
  position: relative; border-radius: 16px; overflow: hidden;
  background: #0d1530;
  box-shadow: 0 0 0 1px rgba(150, 175, 235, 0.16), 0 40px 90px -30px rgba(0, 0, 0, 0.85), 0 20px 50px -30px rgba(43, 107, 255, 0.55);
}
.window-bar { position: absolute; z-index: 2; top: 14px; left: 16px; display: flex; gap: 8px; }
.window-bar i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.window-bar i:nth-child(2) { background: #febc2e; }
.window-bar i:nth-child(3) { background: #28c840; }
.shots { position: relative; aspect-ratio: 1280 / 800; }
.shots img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.012); filter: blur(6px);
  transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), filter 0.5s ease;
}
.shots img.on { opacity: 1; transform: none; filter: none; }
.caption { margin: 18px auto 0; text-align: center; color: var(--muted); font-size: 15px; min-height: 1.6em; max-width: 70ch; }

/* ---------- Seccions ---------- */
section { padding: 110px 0 0; }
.sec-title { font-size: clamp(34px, 4.6vw, 56px); max-width: 18ch; }
.sec-lede { margin-top: 18px; color: var(--ink-2); font-size: 19px; max-width: 60ch; }

/* Les cinc eines que ja no cal obrir. */
.replaces { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin-top: 44px; border-top: 1px solid var(--line); }
.replaces li { list-style: none; padding: 22px 18px 0 0; }
.replaces svg { width: 26px; height: 26px; color: var(--blue-2); }
.replaces b { display: block; margin-top: 12px; font-size: 17px; }
.replaces span { display: block; color: var(--muted); font-size: 15px; margin-top: 4px; }
.replaces ol, .replaces ul { margin: 0; padding: 0; }

/* Funcions: files alternes de text i un detall de la captura. */
.feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: center; margin-top: 90px; }
.feature:nth-of-type(even) { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature:nth-of-type(even) .feature-text { order: 2; }
.feature h3 { font-size: clamp(28px, 3.2vw, 40px); }
.feature p { margin-top: 16px; color: var(--ink-2); }
.feature ul { margin: 22px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.feature li { display: flex; gap: 11px; color: var(--ink); font-size: 16px; }
.feature li svg { width: 19px; height: 19px; color: var(--green); flex: none; margin-top: 4px; }
.crop {
  border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 11;
  box-shadow: 0 0 0 1px rgba(150, 175, 235, 0.14), 0 30px 70px -30px rgba(0, 0, 0, 0.9);
}
.crop img { width: 100%; height: 100%; object-fit: cover; }
.crop.files img { object-position: 78% 0; transform: scale(1.5); transform-origin: 70% 0; }
.crop.db img { object-position: 100% 0; transform: scale(1.45); transform-origin: 100% 10%; }
.crop.requests img { object-position: 60% 0; transform: scale(1.4); transform-origin: 60% 0; }

.more { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 42px 48px; margin-top: 56px; }
.more div { display: grid; grid-template-columns: 30px 1fr; gap: 4px 14px; align-content: start; }
.more svg { width: 24px; height: 24px; color: var(--blue-2); grid-row: span 2; margin-top: 2px; }
.more b { font-size: 17px; }
.more span { color: var(--muted); font-size: 15.5px; }

/* ---------- Preus ---------- */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 48px; max-width: 920px; }
.plan { padding: 32px; border-radius: var(--radius-l); background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; }
.plan.pro { background: linear-gradient(180deg, #13214a, #0f1938); box-shadow: inset 0 0 0 1px rgba(94, 163, 255, 0.45), 0 30px 70px -40px rgba(43, 107, 255, 0.9); }
.plan h3 { font-size: 26px; display: flex; align-items: center; gap: 10px; }
.plan h3 svg { width: 22px; height: 22px; color: var(--amber); }
.plan .for { color: var(--muted); margin-top: 6px; font-size: 15.5px; }
.price { margin-top: 22px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.price strong { font: 700 52px/1 var(--display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.price s { color: var(--muted); font-size: 20px; }
.price em { font-style: normal; color: var(--amber); font-size: 14.5px; font-weight: 600; }
.price-note { color: var(--muted); font-size: 14.5px; margin-top: 6px; }
.plan ul { list-style: none; margin: 24px 0 28px; padding: 0; display: grid; gap: 10px; }
.plan li { display: flex; gap: 10px; font-size: 16px; }
.plan li svg { width: 18px; height: 18px; color: var(--green); flex: none; margin-top: 4px; }
.plan .btn { margin-top: auto; }
.plans-note { margin-top: 22px; color: var(--muted); font-size: 14.5px; max-width: 80ch; }

/* ---------- Preguntes ---------- */
.faq { margin-top: 36px; max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative;
  font: 600 18px var(--font);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 8px; top: 27px; width: 10px; height: 10px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(225deg); top: 31px; }
.faq details p { padding: 0 0 22px; color: var(--ink-2); max-width: 70ch; }

/* ---------- Final i peu ---------- */
.closing { text-align: center; padding: 130px 0 120px; }
.closing img { width: 96px; height: 96px; margin: 0 auto 26px; border-radius: 22px; box-shadow: 0 24px 50px -20px rgba(43, 107, 255, 0.8); }
.closing h2 { font-size: clamp(36px, 5vw, 64px); max-width: 16ch; margin-inline: auto; }
.closing .actions { margin-top: 30px; }

footer { border-top: 1px solid var(--line); padding: 40px 0 56px; color: var(--muted); font-size: 14.5px; }
footer .wrap { display: grid; grid-template-columns: 1.2fr 2fr 1fr; gap: 32px; }
footer h4 { margin: 0 0 10px; color: var(--ink-2); font: 600 14.5px var(--font); }
footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--ink); }

/* Avís d'idioma (només a la portada en anglès). */
.lang-hint {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 30;
  display: none; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; border-radius: 14px;
  background: var(--bg-2); box-shadow: 0 0 0 1px var(--line-2), 0 20px 40px -12px rgba(0, 0, 0, 0.7); font-size: 15px;
}
.lang-hint.on { display: flex; }
.lang-hint button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 20px; line-height: 1; padding: 4px 8px; }

/* ---------- Pàgines legals ---------- */
.legal { padding: 72px 0 40px; max-width: 760px; }
.legal h1 { font-size: clamp(36px, 5vw, 52px); }
.legal h2 { font-size: 24px; margin: 40px 0 10px; }
.legal p, .legal li { color: var(--ink-2); margin-top: 12px; }
.legal .updated { color: var(--muted); margin-top: 12px; font-size: 15px; }

/* ---------- Mòbil ---------- */
@media (max-width: 900px) {
  .top nav { display: none; }
  .feature, .feature:nth-of-type(even) { grid-template-columns: 1fr; gap: 28px; margin-top: 70px; }
  .feature:nth-of-type(even) .feature-text { order: 0; }
  .replaces { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .more { grid-template-columns: 1fr 1fr; }
  .plans { grid-template-columns: 1fr; }
  footer .wrap { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero { padding-top: 56px; }
  .top .btn span { display: none; }
  .top .btn { padding: 0 12px; }
  .modes button { padding: 8px 11px; font-size: 14px; }
  .modes button svg { display: none; }
  .more { grid-template-columns: 1fr; }
  .window { border-radius: 10px; }
  .window-bar { display: none; }
  section { padding-top: 80px; }
  .plan { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.replaces { padding: 0; margin-left: 0; }
.lang summary svg { width: 17px; height: 17px; }
/* Enquadraments dels detalls (la captura sencera és a la portada). */
.crop { aspect-ratio: 16 / 10.5; background: #0d1530; }
.crop.files img { object-position: 0 0; transform: scale(1.75); transform-origin: 100% 100%; }
.crop.db img { object-position: 0 0; transform: scale(1.6); transform-origin: 88% 22%; }
.crop.requests img { object-position: 0 0; transform: scale(1.6); transform-origin: 40% 100%; }
.crop, .crop.files, .crop.db, .crop.requests { aspect-ratio: auto; }
.crop img, .crop.files img, .crop.db img, .crop.requests img { transform: none; height: auto; object-fit: initial; }
/* Botó desactivat (descàrrega encara no disponible): visible però sense acció. */
.btn[aria-disabled="true"] { opacity: 0.7; cursor: default; box-shadow: none; }
.btn-primary[aria-disabled="true"] { background: var(--surface); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-2); }
