/* Dreafy — dreafy.app static site. Dark theme, no dependencies. */
@font-face { font-family: 'Montserrat'; font-weight: 400; font-style: normal; font-display: swap; src: url('fonts/Montserrat_400Regular.ttf') format('truetype'); }
@font-face { font-family: 'Montserrat'; font-weight: 600; font-style: normal; font-display: swap; src: url('fonts/Montserrat_600SemiBold.ttf') format('truetype'); }
@font-face { font-family: 'Montserrat'; font-weight: 700; font-style: normal; font-display: swap; src: url('fonts/Montserrat_700Bold.ttf') format('truetype'); }
@font-face { font-family: 'Montserrat'; font-weight: 800; font-style: normal; font-display: swap; src: url('fonts/Montserrat_800ExtraBold.ttf') format('truetype'); }

:root {
  --bg: #000000;
  --surface: #0c0c0c;
  --surface-2: #141414;
  --border: #232323;
  --text: #ffffff;
  --muted: #a8a8a8;
  --accent: #e4ff30;
  --accent-ink: #0a0a0a;
  --radius: 20px;
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px; line-height: 1.65; font-weight: 400;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.acc { color: var(--accent); }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 780px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(0, 0, 0, 0.78);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: env(safe-area-inset-top);
}
.bar { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 5px; color: var(--text); font-weight: 800; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 8px; }
.wm { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { color: var(--muted); font-size: 14px; font-weight: 600; }
.nav a:hover { color: var(--text); text-decoration: none; }
.lang { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; margin-left: auto; }
.nav + .lang { margin-left: 0; }
.lang a, .lang span[aria-current] { padding: 4px 2px; }
.lang span[aria-current] { color: var(--accent); }
.lang a { color: var(--muted); }
.lang a:hover { color: var(--text); text-decoration: none; }
.lang .sep { color: #444; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 34px 0 44px; }
.hero::before {
  content: ''; position: absolute; inset: -20% -10% auto auto; width: 70vw; max-width: 780px; aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(228, 255, 48, 0.16), rgba(228, 255, 48, 0) 70%);
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; gap: 48px; align-items: center; }
h1 { font-size: clamp(34px, 7.4vw, 62px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 800; margin: 0 0 20px; }
.lead { font-size: clamp(17px, 2.4vw, 20px); color: var(--muted); margin: 0 0 32px; max-width: 34em; }
h1, h2, .lead span, .section-p { text-wrap: balance; } /* no lone word on a last line */
.lead span, .section-p span { display: block; } /* two fixed lines: the second sentence always starts on its own line */

.badge {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 20px 10px 16px; border: 1px solid #3a3a3a; border-radius: 14px;
  background: var(--surface-2); color: var(--text);
}
.badge .apple { width: 26px; height: 26px; color: var(--accent); }
.badge-txt { display: flex; flex-direction: column; line-height: 1.2; }
.badge-txt small { font-size: 11px; color: var(--accent); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.badge-txt strong { font-size: 16px; font-weight: 700; }

/* ---------- phone mockup (generic modern phone, drawn with CSS, no brand marks) ----------
   .phone is the size container: every measurement below is in cqw (% of the phone's width), so
   the frame keeps real proportions at any size. Layers: .phone-frame (titanium rim) >
   .phone-body (black bezel) > .screen (1320x2868 ratio) + .island (above the screenshot). */
.phone { position: relative; width: 100%; max-width: 270px; margin: 0 auto; container-type: inline-size; }
.phone-main { max-width: 290px; }

.phone-frame {
  --rim: 2.5px;                           /* titanium edge */
  --bezel: 3cqw;                          /* black border around the screen, even on all sides */
  --r-screen: 11.5cqw;                    /* screen corner */
  --r-body: calc(var(--r-screen) + var(--bezel));
  --r-outer: calc(var(--r-body) + var(--rim));   /* nested curves: outer > body > screen */
  padding: var(--rim);
  border-radius: var(--r-outer);
  background: linear-gradient(145deg, #4a4a4c 0%, #2f2f31 30%, #1c1c1e 62%, #38383a 100%);
  box-shadow:
    inset 0 0.5px 0 rgba(255, 255, 255, 0.5),          /* thin highlight on the top edge */
    0 0 0 0.5px #0b0b0c,
    0 28px 60px -20px rgba(0, 0, 0, 0.9),
    0 0 48px rgba(228, 255, 48, 0.05);                 /* faint accent glow */
}
.phone-body {
  position: relative; isolation: isolate;
  padding: var(--bezel); background: #000;
  border-radius: var(--r-body);
}
.screen {
  position: relative; overflow: hidden;
  border-radius: var(--r-screen);
  aspect-ratio: 1320 / 2868;              /* screenshot size 1320x2868 */
  background: radial-gradient(120% 70% at 50% 0%, #1b1b1b, #070707 70%);
  display: flex; align-items: center; justify-content: center;
}
.screen::before {  /* the real screenshot; if the file is missing it stays transparent and the placeholder shows */
  content: ''; position: absolute; inset: 0; z-index: 2;
  background: #000 center / contain no-repeat;   /* never cropped or stretched */
}
.screen--home::before { background-image: url('screens/home.png'); }
.screen--debts::before { background-image: url('screens/debts.png'); }
.screen--savings::before { background-image: url('screens/savings.png'); }
.screen--subscriptions::before { background-image: url('screens/subscriptions.png'); }
.screen--paywall::before { background-image: url('screens/paywall.png'); }
/* English page (lang="en"): English screenshots */
html[lang="en"] .screen--home::before { background-image: url('screens/en/home.png'); }
html[lang="en"] .screen--debts::before { background-image: url('screens/en/debts.png'); }
html[lang="en"] .screen--savings::before { background-image: url('screens/en/savings.png'); }
html[lang="en"] .screen--subscriptions::before { background-image: url('screens/en/subscriptions.png'); }
html[lang="en"] .screen--paywall::before { background-image: url('screens/en/paywall.png'); }
.ph-label {
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em; color: #4d4d4d;
  border: 1px dashed #2d2d2d; border-radius: 10px; padding: 6px 12px;
}
.island {            /* sits on top of the screenshot, between the clock and the signal icons */
  position: absolute; z-index: 5; left: 50%; transform: translateX(-50%);
  top: calc(var(--bezel) + 2.5cqw);
  width: 29cqw; height: 8.6cqw; border-radius: 999px; background: #000;
}

/* side buttons: thin dark strips that stick out of the frame a little */
.btn {
  position: absolute; z-index: 0; width: 1.1cqw; background: linear-gradient(90deg, #1a1a1c, #3a3a3c);
}
.btn-mute, .btn-vol-up, .btn-vol-down { left: -0.9cqw; border-radius: 0.6cqw 0 0 0.6cqw; }
.btn-power { right: -0.9cqw; border-radius: 0 0.6cqw 0.6cqw 0; background: linear-gradient(270deg, #1a1a1c, #3a3a3c); }
.btn-mute { top: 13%; height: 3.4%; }
.btn-vol-up { top: 19.5%; height: 6.2%; }
.btn-vol-down { top: 27.5%; height: 6.2%; }
.btn-power { top: 23%; height: 10%; }
.phone-frame { position: relative; z-index: 1; }

/* ---------- sections ---------- */
.section { padding: 46px 0; }
h2 { font-size: clamp(26px, 4.6vw, 40px); line-height: 1.15; letter-spacing: -0.02em; font-weight: 800; margin: 0 0 14px; }
h3 { font-size: 18px; margin: 14px 0 6px; font-weight: 700; letter-spacing: -0.01em; }
.section-p { color: var(--muted); max-width: 36em; margin: 0 0 36px; }

.cards { display: grid; gap: 14px; grid-template-columns: 1fr; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; transition: border-color 0.25s ease, transform 0.25s ease;
}
.card:hover { border-color: #3d4310; transform: translateY(-3px); }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.ico { width: 30px; height: 30px; color: var(--accent); }
.ico-xl { width: 64px; height: 64px; }

.gallery { background: linear-gradient(#000, #070707 50%, #000); }
.phones {
  display: grid; grid-auto-flow: column; grid-auto-columns: 75%; gap: 18px; scroll-padding-left: 4px;
  overflow-x: auto; padding: 8px 4px 28px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.phones::-webkit-scrollbar { display: none; }
.shot { margin: 0; scroll-snap-align: start; text-align: center; }
.shot .phone { max-width: none; } /* the column sets the width (75% on phones, 320px from 600px up) */
.prem-phone .phone { max-width: 290px; } /* same size as the hero phone */
.shot figcaption { margin-top: 18px; color: var(--muted); font-size: 14px; font-weight: 600; }

.privacy-grid { display: grid; gap: 28px; align-items: center; }
.lock-wrap {
  width: 120px; height: 120px; border-radius: 32px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border); box-shadow: 0 0 60px rgba(228, 255, 48, 0.1);
}
.ticks { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; }
.tick { flex: none; width: 22px; height: 22px; margin-top: 2px; color: var(--accent-ink); background: var(--accent); border-radius: 50%; padding: 4px; stroke-width: 2.6; }
.note { color: var(--muted); font-size: 13.5px; margin: 20px 0 0; max-width: 40em; }

.premium {
  display: grid; gap: 40px; align-items: center;
  background: linear-gradient(160deg, #111, #050505); border: 1px solid var(--border);
  border-radius: 28px; padding: 36px 24px;
}
.price { margin: 26px 0 0; display: flex; align-items: baseline; gap: 6px; }
.price .amount { font-size: 52px; font-weight: 800; letter-spacing: -0.03em; }
.price .per { color: var(--muted); font-weight: 600; font-size: 18px; }
.badges { display: flex; flex-wrap: wrap; gap: 12px; }
.premium .badges { margin-top: 22px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0 calc(40px + env(safe-area-inset-bottom)); margin-top: 12px; }
.foot { display: grid; gap: 18px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.foot-links a { color: var(--muted); font-size: 14px; font-weight: 600; }
.foot-links a:hover { color: var(--accent); text-decoration: none; }
.copy { margin: 0; color: #6d6d6d; font-size: 13px; }

/* ---------- legal + support pages ---------- */
.doc { padding: 40px 0 20px; }
.doc-sec { padding: 24px 0 56px; border-bottom: 1px solid var(--border); scroll-margin-top: 80px; }
.doc-sec:last-child { border-bottom: 0; }
.doc h1 { font-size: clamp(28px, 6vw, 40px); margin-bottom: 6px; }
.doc h2 { font-size: 20px; letter-spacing: -0.01em; margin: 32px 0 8px; }
.doc p { color: #d6d6d6; margin: 0 0 14px; overflow-wrap: anywhere; }
.updated { color: var(--muted) !important; font-size: 14px; font-weight: 600; margin-bottom: 8px !important; }
.switch { margin-top: 28px !important; font-weight: 700; font-size: 14px; }
.mail { display: inline-block; font-size: 20px; font-weight: 800; padding: 10px 0; }
.faq { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 4px 20px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--accent); font-size: 22px; line-height: 1; }
.faq[open] summary::after { content: '−'; }
.faq p { margin: 0 0 16px; }

/* ---------- entrance animation (subtle, CSS only) ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.hero-text > *, .hero-phones { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero-text > :nth-child(2) { animation-delay: 0.08s; }
.hero-text > :nth-child(3) { animation-delay: 0.16s; }
.hero-phones { animation-delay: 0.2s; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- larger screens ---------- */
@media (min-width: 600px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .phones { grid-auto-columns: 320px; }
}
@media (min-width: 900px) {
  .wrap { padding: 0 32px; }
  .hero { padding: 58px 0 72px; }
  /* text + phone form one group, centered on the page with equal space left and right */
  .hero-grid { grid-template-columns: minmax(0, 620px) 345px; gap: 32px; justify-content: center; }
  .phone-main, .prem-phone .phone { max-width: 345px; }
  h1 { font-size: clamp(32px, 3.6vw, 44px); } /* max 3 lines on desktop */
  .brk { display: none; }
  .cards { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  /* gallery stays a scroll-snap strip: 320px phones, 3 fully visible and the 4th peeking in */
  .phones { gap: 28px; scrollbar-width: thin; scrollbar-color: #3a3a3a transparent; }
  .phones::-webkit-scrollbar { display: block; height: 6px; }
  .phones::-webkit-scrollbar-thumb { background: #3a3a3a; border-radius: 3px; }
  .privacy-grid { grid-template-columns: auto 1fr; gap: 56px; }
  .premium { grid-template-columns: minmax(0, 440px) 345px; gap: 96px; justify-content: center; padding: 64px 56px; }
  .foot { grid-template-columns: auto 1fr auto; align-items: center; }
  .foot-links { justify-content: center; }
  .section { padding: 65px 0; }
}
@media (max-width: 560px) {
  .nav { display: none; }
  .nav + .lang { margin-left: auto; }
  .hero { padding-top: 22px; }
}

/* ---------- mobile / tablet (under 900px): centered, larger headings. Desktop is untouched. ---------- */
@media (max-width: 899.98px) {
  h1 { font-size: clamp(38px, 8.6vw, 62px); }
  h1, h2, h3 { overflow-wrap: normal; word-break: normal; hyphens: manual; } /* never split inside a word */
  .section h2, .premium h2 { font-size: clamp(32px, 5.8vw, 46px); }

  /* hero */
  .hero-text, .section .wrap > h2, .section-p, .privacy-grid, .prem-text { text-align: center; }
  .lead, .section-p, .note { margin-left: auto; margin-right: auto; }
  .badges { justify-content: center; }

  /* feature cards: full width, content centered */
  .card { text-align: center; }
  .card .ico { display: block; margin: 0 auto; }

  /* privacy: lock icon + text centered */
  .privacy-grid { justify-items: center; }

  /* tick lists: the block is centered, each item's own text stays left-aligned */
  .ticks { width: fit-content; max-width: 100%; margin-left: auto; margin-right: auto; text-align: left; }

  /* premium */
  .price { justify-content: center; }

  /* compact store badges so both fit side by side when the screen allows it */
  .badge { gap: 9px; padding: 8px 13px 8px 11px; border-radius: 12px; }
  .badge .apple { width: 22px; height: 22px; }
  .badge-txt small { font-size: 10px; }
  .badge-txt strong { font-size: 14px; }
  .badges { gap: 10px; }
}

/* mobile footer: everything centered (desktop keeps the 3-column footer) */
@media (max-width: 899.98px) {
  .foot { justify-items: center; text-align: center; }
  .foot-links { justify-content: center; }
}
