/*
 * SwipePic — marketing page (index.html)
 * Dark by default, system fonts, nothing third-party.
 */

/* ---------- Tokens ---------- */

:root {
  --bg: #151718;
  --text: #f2f4f7;
  --muted: #a4adba;          /* 7.4:1 on --bg */
  --link: #8fb3ff;           /* 8.6:1 on --bg */
  --border: rgb(255 255 255 / 0.09);
  --surface: rgb(255 255 255 / 0.035);

  --brand-1: #2f6fed;
  --brand-2: #5b8def;
  --brand-gradient: linear-gradient(135deg, var(--brand-1), var(--brand-2));

  /* Action colours as RGB triplets so they can be used at any opacity. */
  --blue: 59 130 246;        /* #3B82F6 — next */
  --red: 239 68 68;          /* #EF4444 — delete */
  --green: 34 197 94;        /* #22C55E — save to folder */
  --amber: 245 158 11;       /* #F59E0B — favorite */

  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max: 72rem;
  --pad: clamp(1rem, 4vw, 2rem);
  --radius: 24px;

  color-scheme: dark;
}

/* ---------- Language visibility ----------
 * English is the default (also with JavaScript off). marketing.js sets
 * data-ui-lang on <html> to switch.
 */

:root:not([data-ui-lang="es"]) [data-lang="es"],
:root[data-ui-lang="es"] [data-lang="en"] {
  display: none !important;
}

[hidden] {
  display: none !important;
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 70% 45% at 80% -5%, rgb(47 111 237 / 0.22), transparent 70%),
    radial-gradient(ellipse 50% 35% at 0% 25%, rgb(91 141 239 / 0.07), transparent 70%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img {
  max-width: 100%;
}

h1,
h2,
h3 {
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--link);
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 3px;
  border-radius: 8px;
}

.container {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--pad));
  margin-inline: auto;
  padding-inline: var(--pad);
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  flex: none;
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gradient-text {
  background: linear-gradient(90deg, var(--brand-1), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  color: transparent;
}

/* ---------- Skip link ---------- */

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.75rem 1.1rem;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-250%);
}

.skip-link:focus-visible {
  transform: none;
}

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

.site-header {
  padding-block: 0.75rem;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.wordmark-icon {
  flex: none;
  width: 40px;
  height: 40px;
}

.wordmark-text {
  background: linear-gradient(90deg, var(--brand-1), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-nav {
  order: 3;
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-left: -0.75rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 0.75rem;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: color 0.15s, background-color 0.15s;
}

.site-nav a:hover {
  color: var(--text);
  background: rgb(255 255 255 / 0.06);
}

.lang-toggle {
  order: 2;
  margin-left: auto;
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  /* Keeps its space but stays invisible (and out of the tab order) until
     marketing.js runs, so the header never shifts and no-JS visitors never
     see a toggle that does nothing. */
  visibility: hidden;
}

:root[data-ui-lang] .lang-toggle {
  visibility: visible;
}

.lang-toggle button {
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.6rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.lang-toggle button:hover {
  color: var(--text);
}

.lang-toggle button[aria-pressed="true"] {
  background: var(--brand-1);
  color: #fff;
}

@media (min-width: 40em) {
  .site-nav {
    order: 2;
    flex-basis: auto;
    margin-left: auto;
  }

  .lang-toggle {
    order: 3;
    margin-left: 0;
  }
}

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

.hero {
  overflow: hidden;
  padding-block: clamp(2.5rem, 7vw, 6rem) clamp(3rem, 8vw, 6.5rem);
}

.hero-inner {
  display: grid;
  gap: clamp(3rem, 8vw, 4rem);
  align-items: center;
}

.hero h1 {
  margin-bottom: 1.25rem;
  font-size: clamp(2.4rem, 1.35rem + 4.6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.lead {
  max-width: 36rem;
  margin-bottom: 0;
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  color: var(--muted);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  margin-top: 2.25rem;
}

/* "Coming soon" pill — deliberately not a link until the app is published.
   19 px bold text counts as large text (3:1 needed); white on the gradient
   is 4.5:1 at the dark end and 3.2:1 at the light end. */
.store-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  max-width: 100%;
  min-height: 56px;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  background: var(--brand-gradient);
  color: #fff;
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.25),
    0 14px 34px -12px rgb(47 111 237 / 0.75);
  cursor: default;
  user-select: none;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  font-weight: 600;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.text-link .icon {
  transition: transform 0.2s;
}

.text-link:hover .icon {
  transform: translateX(3px);
}

.text-link .icon-down,
.text-link:hover .icon-down {
  transform: rotate(90deg);
}

/* ---------- Hero illustration (decorative, CSS only) ---------- */

.hero-art {
  display: grid;
  place-items: center;
  padding-block: 2.5rem;
}

.deck {
  position: relative;
  width: clamp(190px, 52vw, 290px);
  aspect-ratio: 3 / 4.2;
}

.deck::before {
  content: "";
  position: absolute;
  inset: -20%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(47 111 237 / 0.35), transparent);
  filter: blur(10px);
}

.card {
  position: absolute;
  inset: 0;
  border-radius: 28px;
  border: 1px solid rgb(255 255 255 / 0.08);
  box-shadow: 0 30px 60px -25px rgb(0 0 0 / 0.7);
}

.card-back {
  background: linear-gradient(160deg, #24345a, #18202e);
  transform: translate(11%, 3%) rotate(10deg);
}

.card-mid {
  background: linear-gradient(160deg, #2b4478, #1c2840);
  transform: translate(4%, 1%) rotate(3deg);
}

.card-front {
  overflow: hidden;
  background: linear-gradient(150deg, var(--brand-2) 0%, var(--brand-1) 55%, #2147b8 100%);
  border-color: rgb(255 255 255 / 0.16);
  box-shadow:
    0 30px 60px -20px rgb(0 0 0 / 0.65),
    -28px 6px 60px -14px rgb(var(--red) / 0.4);
  transform: translate(-9%, -1%) rotate(-9deg);
  transform-origin: 50% 110%;
  animation: deck-swipe 6s ease-in-out infinite;
}

.card-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hint {
  --c: var(--blue);
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  z-index: 1;
  border-radius: 50%;
  /* Tint over a solid base so the badge stays crisp on top of the cards. */
  background: linear-gradient(rgb(var(--c) / 0.2), rgb(var(--c) / 0.2)), #161a22;
  border: 1px solid rgb(var(--c) / 0.45);
  color: rgb(var(--c));
  box-shadow: 0 0 24px -4px rgb(var(--c) / 0.5);
  animation: float 5s ease-in-out infinite;
}

.hint .icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hint-left {
  --c: var(--red);
  top: 44%;
  left: -24%;
}

.hint-left .icon {
  transform: rotate(180deg);
}

.hint-right {
  top: 54%;
  right: -18%;
  animation-delay: -1.6s;
}

.hint-up {
  --c: var(--green);
  top: -9%;
  left: 50%;
  margin-left: -24px;
  animation-delay: -3.2s;
}

.hint-up .icon {
  transform: rotate(-90deg);
}

.hint-down {
  --c: var(--amber);
  bottom: -9%;
  left: 50%;
  margin-left: -24px;
  animation-delay: -2.4s;
}

.hint-down .icon {
  transform: rotate(90deg);
}

@keyframes deck-swipe {
  0%,
  100% {
    transform: translate(-9%, -1%) rotate(-9deg);
  }
  50% {
    transform: translate(-16%, -2%) rotate(-14deg);
  }
}

@keyframes float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -6px;
  }
}

@media (min-width: 56em) {
  .hero-inner {
    grid-template-columns: 1.2fr 0.8fr;
  }

  .hero-art {
    padding-block: 0;
  }
}

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

.section {
  padding-block: clamp(3.5rem, 9vw, 6.5rem);
  scroll-margin-top: 1rem;
}

.eyebrow {
  margin-bottom: 0.75rem;
  color: var(--link);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.875rem, 1.2rem + 2.6vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.section-lead {
  max-width: 40rem;
  margin-bottom: 2.5rem;
  color: var(--muted);
  font-size: 1.125rem;
}

/* ---------- How it works ---------- */

.how-grid,
.feature-grid,
.privacy-list,
.shots-track {
  list-style: none;
  margin: 0;
  padding: 0;
}

.how-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 40em) {
  .how-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64em) {
  .how-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.how-card {
  --c: var(--blue);
  --ink: #7aa7f9;
  padding: 1.75rem;
  border-radius: var(--radius);
  border: 1px solid rgb(var(--c) / 0.3);
  background: linear-gradient(180deg, rgb(var(--c) / 0.13), rgb(var(--c) / 0.03));
}

.tint-blue {
  --c: var(--blue);
  --ink: #7aa7f9;
}

.tint-red {
  --c: var(--red);
  --ink: #f47c7c;
}

.tint-green {
  --c: var(--green);
  --ink: #4ade80;
}

.tint-amber {
  --c: var(--amber);
  --ink: #fbbf24;
}

.how-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 1.5rem;
  border-radius: 18px;
  background: rgb(var(--c) / 0.18);
  color: rgb(var(--c));
  box-shadow: 0 0 28px -8px rgb(var(--c) / 0.6);
}

.how-icon .icon {
  width: 28px;
  height: 28px;
  stroke-width: 2.4;
}

.how-icon.dir-left .icon {
  transform: rotate(180deg);
}

.how-icon.dir-up .icon {
  transform: rotate(-90deg);
}

.how-icon.dir-down .icon {
  transform: rotate(90deg);
}

.how-dir {
  margin-bottom: 0.35rem;
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.how-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.how-card p:last-child {
  margin-bottom: 0;
}

.how-card p:not(.how-dir) {
  color: var(--muted);
}

.note {
  margin: 1.75rem 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* ---------- Screenshots ---------- */

.section-shots {
  padding-bottom: clamp(2.5rem, 7vw, 5rem);
  text-align: center;
}

.shots {
  padding-top: 1.5rem;
}

/* Wrapping, centred grid: 2 frames per row on phones, 3 on tablets, all 5 in
   one row on desktop. Flex (not grid) so an incomplete last row stays centred. */
.shots-track {
  --cols: 2;
  --gap: clamp(1rem, 3vw, 1.75rem);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem var(--gap);
}

.shot {
  --c: 47 111 237;
  flex: none;
  width: calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
  max-width: 230px;
  /* Lets the frame's corners and bezel scale with its width (cqi units). */
  container-type: inline-size;
}

@media (min-width: 40em) {
  .shots-track {
    --cols: 3;
  }
}

@media (min-width: 64em) {
  .shots-track {
    --cols: 5;
  }
}

.shot:nth-child(3) {
  --c: var(--green);
}

.shot:nth-child(4) {
  --c: var(--red);
}

.shot:nth-child(5) {
  --c: 91 141 239;
}

.shot figure {
  margin: 0;
}

.phone {
  position: relative;
  aspect-ratio: 9 / 19.5;
  border-radius: 40px;
  border-radius: 17cqi;
  background: #0d0f10;
  box-shadow:
    0 0 0 1px rgb(255 255 255 / 0.12),
    0 30px 60px -25px rgb(0 0 0 / 0.8);
}

.phone-placeholder,
.phone img {
  position: absolute;
  inset: 8px;
  inset: 3.5cqi;
  width: calc(100% - 16px);
  width: calc(100% - 7cqi);
  height: calc(100% - 16px);
  height: calc(100% - 7cqi);
  border-radius: 32px;
  border-radius: 14cqi;
}

.phone-placeholder {
  display: grid;
  place-items: center;
  padding: 0.75rem;
  background:
    radial-gradient(circle at 30% 20%, rgb(var(--c) / 0.35), transparent 60%),
    linear-gradient(170deg, #1d2330, #121416 75%);
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
}

.phone img {
  object-fit: cover;
}

.shot figcaption {
  margin-top: 1rem;
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: center;
}

/* ---------- Features ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.feature {
  padding: 1.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 1.25rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgb(47 111 237 / 0.28), rgb(91 141 239 / 0.1));
  color: var(--link);
}

.feature-icon .icon {
  width: 24px;
  height: 24px;
}

.feature h3 {
  margin-bottom: 0.5rem;
  font-size: 1.1875rem;
  font-weight: 700;
}

.feature p {
  margin: 0;
  color: var(--muted);
}

/* ---------- Private by design ---------- */

.privacy-band {
  display: grid;
  gap: 2rem;
  padding: clamp(1.75rem, 5vw, 3.5rem);
  border-radius: 32px;
  border: 1px solid rgb(91 141 239 / 0.3);
  background:
    radial-gradient(circle at 0% 0%, rgb(47 111 237 / 0.35), transparent 55%),
    linear-gradient(135deg, #1b2a4a, #182030 60%, #171c24);
  box-shadow: 0 40px 80px -40px rgb(47 111 237 / 0.45);
}

.privacy-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 1.25rem;
  border-radius: 18px;
  background: var(--brand-gradient);
  color: #fff;
}

.privacy-icon .icon {
  width: 28px;
  height: 28px;
}

.privacy-copy p {
  max-width: 34rem;
  color: #c9d2de;
  font-size: 1.125rem;
}

.privacy-list {
  display: grid;
  gap: 0.75rem;
  align-content: center;
}

.privacy-list li {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1.1rem;
  border-radius: 16px;
  border: 1px solid rgb(255 255 255 / 0.08);
  background: rgb(255 255 255 / 0.05);
  font-weight: 600;
}

.privacy-list .icon {
  width: 22px;
  height: 22px;
  color: rgb(var(--green));
  stroke-width: 2.6;
}

@media (min-width: 54em) {
  .privacy-band {
    grid-template-columns: 1.3fr 1fr;
    align-items: center;
    gap: 3rem;
  }
}

/* ---------- Final call to action ---------- */

.final-cta {
  text-align: center;
}

.final-cta .container {
  position: relative;
}

.final-cta .container::before {
  content: "";
  position: absolute;
  inset: -30% 10%;
  z-index: -1;
  background: radial-gradient(closest-side, rgb(47 111 237 / 0.2), transparent);
}

.final-cta p {
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: 1.125rem;
}

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

.site-footer {
  padding-block: 2rem 3rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9375rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  margin-bottom: 0.75rem;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.footer-nav a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.copyright {
  margin-bottom: 0.75rem;
}

.disclaimer {
  max-width: 48rem;
  margin: 0;
  font-size: 0.8125rem;
}

/* ---------- Reduced motion ---------- */

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