/* CASHRR — pagina de înscriere (cashrr.app)
   Culorile sunt cele din aplicație (src/ui/theme.ts): fundal #041718, casete #0B2B26,
   verdele #8EB69B, „bejul” #DAF1DE (și butonul „Anunță-mă”, alb-bej, cu text închis), auriul #F5BE4A.
   Titlurile: Unbounded (lat și rotunjit, ca logo-ul). Textul: fontul telefonului (SF pe iPhone).

   Pagina principală e UN SINGUR ECRAN, fără scroll, pe orice dispozitiv: logo-ul sus,
   textul și emailul la mijloc, jos cele două telefoane (ca pe gorage.app), tăiate de
   marginea ecranului. Mărimea telefoanelor o potrivește site.js după cât loc rămâne
   (fără JavaScript: o estimare din CSS, tot fără scroll). */

@font-face {
  font-family: "Unbounded";
  src: url("/fonts/unbounded-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  /* doar ă, ș, ț (și majusculele), tăiate din setul latin-ext */
  font-family: "Unbounded";
  src: url("/fonts/unbounded-ro.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0102-0103, U+0218-021B;
}

:root {
  --night: #041718;
  --ink: #051F20;
  --deep: #0B2B26;
  --pine: #163832;
  --forest: #235347;
  --sage: #8EB69B;
  --mist: #DAF1DE;
  --gold: #F5BE4A;
  --gold-2: #FFCB5C;

  --w84: rgba(255, 255, 255, .84);
  --w72: rgba(255, 255, 255, .72);
  --w60: rgba(255, 255, 255, .6);
  --w45: rgba(255, 255, 255, .45);
  --w09: rgba(255, 255, 255, .09);
  --danger: #E0786D;

  --display: "Unbounded", ui-rounded, system-ui, sans-serif;
  --ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gut: max(16px, env(safe-area-inset-left, 0px));
  --gut-r: max(16px, env(safe-area-inset-right, 0px));
  /* lățimea unui telefon; site.js o potrivește exact după locul rămas */
  --pw: clamp(120px, min(46vw, calc((100svh - 420px) * .8)), 340px);
}
@media (min-width: 720px) {
  :root { --gut: max(32px, env(safe-area-inset-left, 0px)); --gut-r: max(32px, env(safe-area-inset-right, 0px)); }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: #fff;
  font: 400 17px/1.5 var(--ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg { display: block; }
a { color: var(--sage); text-underline-offset: 3px; }
a:hover { color: var(--mist); }
:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; border-radius: 6px; }
.vh {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 var(--gut-r) 0 var(--gut); }
.wrap.narrow { max-width: 760px; }
h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: var(--mist);
  text-wrap: balance;
}

/* ================= PAGINA PRINCIPALĂ: un singur ecran ================= */
body.land {
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  overscroll-behavior: none;
  display: flex;
  flex-direction: column;
}

.land .top {
  flex: none;
  display: flex;
  justify-content: center;
  padding: calc(env(safe-area-inset-top, 0px) + clamp(12px, 2.6svh, 28px)) var(--gut-r) 0 var(--gut);
}
.brand { display: inline-block; border-radius: 8px; }
.brand img { width: 142px; height: auto; }
.land .brand img { width: clamp(112px, 15svh, 150px); }

/* textul și formularul: la mijloc, între logo și telefoane */
.copy {
  flex: none;
  margin: auto 0;
  padding: clamp(10px, 2.2svh, 26px) var(--gut-r) clamp(12px, 2.4svh, 30px) var(--gut);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.copy h1 {
  max-width: 13ch;
  font-size: clamp(28px, min(10.4vw, 6.8svh), 72px);
}
.lead {
  margin: clamp(8px, 1.6svh, 18px) auto 0;
  max-width: 30rem;
  font-size: clamp(15px, min(4.3vw, 2.4svh), 19px);
  line-height: 1.45;
  color: var(--w72);
  text-wrap: pretty;
}

/* ---------- formularul ---------- */
.join { width: 100%; max-width: 29rem; margin-top: clamp(12px, 2.6svh, 30px); }
.field {
  display: flex; align-items: center; gap: 6px;
  padding: 6px;
  background: var(--deep);
  border: 1px solid var(--w09);
  border-radius: 20px;
  transition: border-color .2s, box-shadow .2s;
}
.field:focus-within { border-color: rgba(142, 182, 155, .6); box-shadow: 0 0 0 4px rgba(142, 182, 155, .16); }
.field:has(input[aria-invalid="true"]) { border-color: rgba(224, 120, 109, .75); box-shadow: 0 0 0 4px rgba(224, 120, 109, .14); }
.field input {
  flex: 1 1 0; width: 0; min-width: 0; height: clamp(46px, 6.4svh, 52px);
  padding: 0 12px;
  border: 0; border-radius: 14px; outline: none;
  background: transparent; color: #fff;
  font: 400 17px var(--ui);
  text-align: left;
}
.field input::placeholder { color: var(--w45); }
.field button {
  flex: none; height: clamp(46px, 6.4svh, 52px); padding: 0 20px;
  border: 0; border-radius: 15px;
  background: var(--mist); color: var(--ink);
  font: 700 16.5px var(--ui); letter-spacing: -0.01em;
  cursor: pointer;
  transition: background-color .15s, transform .1s;
}
.field button:hover { background: #fff; }
.field button:active { transform: scale(.97); }
.field button:disabled { opacity: .75; cursor: progress; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.msg { margin: 0; font-size: 15px; line-height: 1.4; }
.msg:not(:empty) { margin-top: 10px; }
.msg[data-kind="error"] { color: var(--danger); }
.fine { margin: 10px 2px 0; font-size: 13px; line-height: 1.45; color: var(--w45); }
.fine a { color: var(--w72); white-space: nowrap; }
@media (max-width: 339px) {
  .field { flex-direction: column; align-items: stretch; }
  .field button { width: 100%; }
}

.joined {
  display: flex; gap: 14px; align-items: flex-start;
  width: 100%; max-width: 29rem;
  margin-top: clamp(12px, 2.6svh, 30px);
  padding: 16px 18px;
  border-radius: 20px;
  background: var(--deep);
  border: 1px solid rgba(142, 182, 155, .45);
  text-align: left;
}
.joined:focus { outline: none; }
.joined .ok {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--sage); color: var(--ink);
}
.joined .ok svg { width: 18px; height: 18px; }
.joined p { margin: 0; font-size: 16px; line-height: 1.45; color: var(--w84); overflow-wrap: anywhere; }
.joined strong { display: block; color: #fff; font-weight: 600; }

/* ---------- scena: cele două telefoane, întoarse unul spre altul, tăiate jos ---------- */
.stage {
  flex: none;
  position: relative;
  height: calc(var(--pw) * 1.25);
  overflow: hidden;
}
.stage[hidden] { display: none; }
/* o lumină fixă, verde cu o tentă aurie, în spatele telefoanelor (nu se mișcă, nu pâlpâie) */
.stage::before {
  content: "";
  position: absolute; left: 50%; top: 0;
  width: min(1100px, 150vw); height: 140%;
  transform: translateX(-50%);
  background:
    radial-gradient(ellipse 42% 46% at 50% 44%, rgba(142, 182, 155, .17), rgba(142, 182, 155, .05) 58%, rgba(142, 182, 155, 0) 74%),
    radial-gradient(ellipse 26% 22% at 50% 30%, rgba(245, 190, 74, .07), rgba(245, 190, 74, 0) 70%);
  pointer-events: none;
}
.stage-in {
  position: absolute; left: 50%; top: calc(var(--pw) * .04);
  transform: translateX(-50%);
  display: flex; gap: calc(var(--pw) * .42);
  perspective: 1700px; perspective-origin: 50% 25%;
}
/* pe telefon, telefoanele mai mari și mai apropiate (ies puțin din ecran în lateral, ca pe gorage.app) */
@media (max-width: 599px) {
  .stage-in { gap: calc(var(--pw) * .3); }
}
.stage .iphone { --w: var(--pw); }
.iphone-left { transform: rotateX(10deg) rotateY(26deg) rotateZ(-3deg); }
.iphone-right { transform: translateY(calc(var(--pw) * .14)) rotateX(10deg) rotateY(-26deg) rotateZ(3deg); }
.stage-fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 34%;
  background: linear-gradient(to bottom, rgba(4, 23, 24, 0) 0%, rgba(4, 23, 24, .72) 52%, var(--night) 96%);
  pointer-events: none;
}

/* ── iPhone 18 Pro, negru, desenat în CSS (ca pe gorage.app) ── */
.iphone { --w: 300px; --t: calc(var(--w) * .115); position: relative; width: var(--w); aspect-ratio: 71.9 / 150; transform-style: preserve-3d; flex: none; }
/* grosimea: straturi de ramă una după alta, ca muchia să aibă colțuri rotunde reale */
.iphone-ext { position: absolute; inset: 0; transform-style: preserve-3d; }
.iphone-ext i { position: absolute; inset: 0; border-radius: calc(var(--w) * .168); background: linear-gradient(90deg, #4b4c52 0%, #2a2a2e 10%, #151517 50%, #2a2a2e 90%, #4b4c52 100%); }
.iphone-ext i:nth-child(1) { transform: translateZ(calc(var(--t) * -.12)); }
.iphone-ext i:nth-child(2) { transform: translateZ(calc(var(--t) * -.24)); }
.iphone-ext i:nth-child(3) { transform: translateZ(calc(var(--t) * -.36)); background: linear-gradient(90deg, #5a5b62 0%, #2e2e33 10%, #161618 50%, #2e2e33 90%, #5a5b62 100%); }
.iphone-ext i:nth-child(4) { transform: translateZ(calc(var(--t) * -.48)); }
.iphone-ext i:nth-child(5) { transform: translateZ(calc(var(--t) * -.6)); }
.iphone-ext i:nth-child(6) { transform: translateZ(calc(var(--t) * -.72)); background: linear-gradient(90deg, #44454b 0%, #222226 10%, #121214 50%, #222226 90%, #44454b 100%); }
.iphone-ext i:nth-child(7) { transform: translateZ(calc(var(--t) * -.86)); }
.iphone-ext i:nth-child(8) { transform: translateZ(calc(var(--t) * -1)); box-shadow: 0 40px 80px rgba(0, 0, 0, .55); }
/* butoanele de pe laterale (se văd doar pe muchia întoarsă spre noi) */
.btn-hw { position: absolute; width: calc(var(--w) * .03); border-radius: calc(var(--w) * .012); background: linear-gradient(90deg, #6a6b72, #2a2a2e 60%, #46474d); transform: translateZ(calc(var(--t) * -.5)); }
.b-action { left: calc(var(--w) * -.012); top: 17%; height: 4.6%; }
.b-vol-up { left: calc(var(--w) * -.012); top: 25%; height: 8.5%; }
.b-vol-down { left: calc(var(--w) * -.012); top: 35.5%; height: 8.5%; }
.b-side { right: calc(var(--w) * -.012); top: 27%; height: 13%; }
.b-cam { right: calc(var(--w) * -.009); top: 59%; height: 7.5%; width: calc(var(--w) * .024); }
/* fața: rama subțire, sticla neagră, ecranul */
.iphone-body {
  position: absolute; inset: 0; border-radius: calc(var(--w) * .168);
  background: linear-gradient(145deg, #6b6c73 0%, #2a2a2e 12%, #121214 40%, #202024 70%, #5c5d64 100%);
  padding: calc(var(--w) * .012);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2), inset 0 0 0 2px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 255, 255, .08);
}
.iphone-glass { position: relative; width: 100%; height: 100%; border-radius: calc(var(--w) * .157); background: #000; padding: calc(var(--w) * .03); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05); }
.iphone-screen { position: relative; width: 100%; height: 100%; border-radius: calc(var(--w) * .127); overflow: hidden; background: #000; }
.iphone-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
/* Dynamic Island */
.island { position: absolute; left: 50%; top: 1.3%; width: 21%; height: 4.2%; transform: translateX(-50%); background: #000; border-radius: 999px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .03); }
.island::after { content: ""; position: absolute; right: 16%; top: 30%; width: 13%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #1d2742 0%, #0a0d16 55%, #000 100%); }
/* reflexia sticlei: o diagonală fină, fixă */
.glare { position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255, 255, 255, .13) 0%, rgba(255, 255, 255, .035) 26%, rgba(255, 255, 255, 0) 42%); pointer-events: none; }

/* ecranele late (laptop): totul puțin mai aerisit */
@media (min-width: 960px) {
  .copy h1 { max-width: 16ch; }
}

/* ================= PAGINILE DE TEXT (confidențialitate, mulțumim, 404) ================= */
.top { padding-top: env(safe-area-inset-top); }
body:not(.land) .top .wrap { height: 68px; display: flex; align-items: center; }
.doc { padding: 28px 0 88px; }
.doc h1 { font-size: clamp(1.9rem, 7vw, 3.1rem); margin-bottom: 14px; }
.doc .meta { margin: 0 0 32px; font-size: 15px; color: var(--w45); }
.doc h2 { margin: 40px 0 10px; font: 600 20px/1.3 var(--ui); color: #fff; }
.doc p, .doc li { max-width: 42rem; font-size: 17px; line-height: 1.65; color: var(--w72); }
.doc ul { padding-left: 1.2em; }
.doc li + li { margin-top: 6px; }
.doc strong { color: #fff; font-weight: 600; }
.doc .back { display: inline-block; margin-top: 12px; }

.foot { padding: 36px 0 calc(48px + env(safe-area-inset-bottom)); }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; font-size: 14px; color: var(--w45); }
.foot-in img { width: 32px; height: 32px; border-radius: 8px; }
.foot-in p { flex: 1 1 auto; margin: 0; }
.foot nav { display: flex; flex-wrap: wrap; gap: 18px; }
.foot a { color: var(--w60); text-decoration: none; }
.foot a:hover { color: #fff; text-decoration: underline; }

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