/* Twinpurse website, dark "bento" design (canvas: Πρόταση 1).
   Colours and fonts match the app (Resources/Styles/Colors.xaml).
   Logical properties (inline-start/end) keep Arabic and Hebrew mirrored. */

@font-face { font-family: "Manrope"; src: url("../fonts/Manrope-Bold.woff") format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/Manrope-ExtraBold.woff") format("woff"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Noto Sans"; src: url("../fonts/NotoSans-Regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Noto Sans"; src: url("../fonts/NotoSans-SemiBold.woff") format("woff"); font-weight: 600; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #0A0E24;
  --surface: #121836;
  --surface-2: #1C2547;
  --navy: #0E1330;
  --line: #232B55;
  --line-2: #2A3366;
  --text: #FFFFFF;
  --text-2: #DDE0F2;
  --soft-text: #C9CDE8;
  --muted: #A9B0D6;
  --mint: #4FE0BE;
  --mint-hover: #7DEBD1;
  --coral: #FF8A75;
  --amber: #F2B134;
  --violet: #8C7CF0;
  --primary: #0E7C66;
  --primary-line: #12957B;
  --light: #F5F7F6;
  --light-line: #E1E7E5;
  --soft: #E3F7F1;
  --expense: #C2412D;
  --ink: #0E1330;
  --ink-muted: #4B5A57;
  --radius: 28px;
  --font-head: "Manrope", "Noto Sans", system-ui, sans-serif;
  --font-body: "Noto Sans", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 17px; line-height: 1.6; }
img { max-width: 100%; height: auto; }
a { color: var(--mint); }
a:hover { color: var(--mint-hover); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.1; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; border-radius: 8px; }

.wrap { max-width: 1200px; margin-inline: auto; padding-inline: 32px; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--mint); color: var(--bg); padding: 10px 16px; border-radius: 10px; z-index: 20; font-weight: 600; }
.skip:focus { top: 8px; }

/* Header: sticky, blurred */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(10, 14, 36, .74); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--surface-2); }
.header-row { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: var(--font-head); font-weight: 800; font-size: 20px; letter-spacing: -0.3px; }
.brand:hover { color: #fff; }
.main-nav { display: flex; gap: 24px; font-size: 14px; font-weight: 600; margin-inline-start: auto; white-space: nowrap; }
.main-nav a, .mobile-nav a { color: var(--soft-text); text-decoration: none; }
.main-nav a:hover, .main-nav a[aria-current="page"], .mobile-nav a[aria-current="page"] { color: var(--mint); }
.header-cta { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--mint); color: var(--bg); text-decoration: none; font-weight: 700; font-size: 14px; white-space: nowrap; }
.header-cta:hover { background: var(--mint-hover); color: var(--bg); }
.mobile-nav { display: none; }

.lang-picker { position: relative; }
.lang-picker summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--soft-text); font-size: 14px; font-weight: 600; }
.lang-picker summary::-webkit-details-marker { display: none; }
.lang-picker[open] summary { color: var(--mint); border-color: var(--mint); }
.lang-picker ul { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); margin: 0; padding: 8px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 48px rgba(0, 0, 0, .45); min-width: 220px; max-height: 70vh; overflow-y: auto; }
.lang-picker li a { display: block; padding: 10px 14px; border-radius: 10px; color: var(--text-2); text-decoration: none; font-size: 15px; }
.lang-picker li a:hover { background: var(--surface-2); }
.lang-picker li a[aria-current="true"] { background: var(--surface-2); color: var(--mint); font-weight: 600; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 10px 26px; border-radius: 16px; text-decoration: none; font-weight: 700; text-align: center; line-height: 1.3; }
.btn-white { background: #fff; color: var(--bg); }
.btn-white:hover { background: var(--soft); color: var(--bg); }
.btn-line { border: 1px solid var(--line-2); color: var(--text-2); font-weight: 600; }
.btn-line:hover { border-color: var(--mint); color: #fff; }
.btn-mint { background: var(--mint); color: var(--bg); font-family: var(--font-head); font-weight: 800; font-size: 18px; }
.btn-mint:hover { background: var(--mint-hover); color: var(--bg); }

/* Hero */
.hero { padding-block: 96px 72px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px; }
.pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600; color: var(--soft-text); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); }
.hero h1 { font-weight: 800; font-size: clamp(44px, 7vw, 88px); line-height: 1; letter-spacing: -0.035em; max-width: 980px; }
.hero h1 span { display: block; color: var(--mint); }
.hero .lead { font-size: 19px; color: var(--muted); max-width: 600px; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* Bento grid */
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(220px, auto); gap: 16px; padding-bottom: 32px; }
.s2 { grid-column: span 2; }
.r2 { grid-row: span 2; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.tile h2, .tile h3 { font-weight: 800; font-size: 22px; letter-spacing: -0.3px; color: #fff; }
.tile p { font-size: 15px; line-height: 1.55; color: var(--muted); }
.tile .push { margin-top: auto; }
.label { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.badge-icon { width: 56px; height: 56px; border-radius: 18px; background: var(--surface-2); color: var(--mint); display: flex; align-items: center; justify-content: center; flex: none; }
.badge-icon.coral { color: var(--coral); }
.tag { align-self: flex-start; font-size: 12px; font-weight: 700; color: var(--bg); background: var(--coral); border-radius: 999px; padding: 4px 12px; }

.tile-entry { background: var(--primary); border-color: var(--primary-line); }
.tile-entry .label { color: #BFF5E6; }
.tile-entry h2 { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.12; }
.tile-entry p { color: #D7F7EE; max-width: 420px; }
.mock { background: var(--light); color: var(--ink); border-radius: 22px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.mock-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.mock-amount { font-family: var(--font-head); font-weight: 800; font-size: clamp(32px, 3.4vw, 44px); color: var(--expense); letter-spacing: -0.03em; }
.mock-date { font-size: 13px; color: var(--ink-muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; font-weight: 600; }
.chips span { background: var(--soft); color: var(--primary); border-radius: 999px; padding: 8px 14px; }
.chips .on { background: var(--primary); color: #fff; }
.keys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; font-family: var(--font-head); font-weight: 700; font-size: 20px; text-align: center; }
.keys span { background: #fff; border: 1px solid var(--light-line); border-radius: 12px; padding: 10px; }
.mock-save { background: var(--primary); color: #fff; border-radius: 14px; padding: 14px; text-align: center; font-weight: 700; }

.summary-row { display: flex; gap: 24px; align-items: center; height: 100%; }
.summary-row > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.big-number { font-family: var(--font-head); font-weight: 800; font-size: 34px; color: var(--mint); letter-spacing: -0.03em; }
.donut { flex: none; width: 150px; height: 150px; }

.dots { display: flex; gap: 10px; margin-top: 4px; }
.dots span { width: 14px; height: 14px; border-radius: 50%; background: var(--mint); }
.dots span:last-child { background: none; border: 2px solid var(--mint); }

.tile-langs { background: var(--coral); border-color: var(--coral); }
.tile-langs .num { font-family: var(--font-head); font-weight: 800; font-size: 76px; line-height: .9; color: var(--bg); letter-spacing: -0.04em; }
.tile-langs h3 { color: var(--bg); }
.tile-langs p { color: #2A0E08; }

.bars { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; font-size: 14px; }
.bar-row { display: flex; flex-direction: column; gap: 6px; }
.bar-head { display: flex; justify-content: space-between; gap: 12px; }
.bar-head span:last-child { color: var(--muted); }
.bar-head .over { color: var(--coral) !important; }
.track { height: 10px; border-radius: 999px; background: var(--line); }
.fill { height: 100%; border-radius: 999px; animation: fill 1.4s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes fill { from { width: 0; } }

.rows { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.rows div { display: flex; justify-content: space-between; gap: 12px; background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.rows span:last-child { color: var(--muted); }
.rows .accent { color: var(--mint) !important; }

.tile-couples { background: var(--navy); }
.couples-row { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; height: 100%; }
.couples-row > div:first-child { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.cards { flex: none; position: relative; width: 230px; height: 150px; }
.cards span { position: absolute; width: 160px; height: 104px; border: 3px solid; border-radius: 18px; background: var(--navy); display: flex; align-items: flex-end; padding: 12px; font-size: 13px; font-weight: 600; }
.cards .mine { inset-inline-start: 0; top: 10px; border-color: var(--mint); color: var(--mint); transform: rotate(-10deg); align-items: flex-start; }
.cards .shared { inset-inline-end: 0; top: 34px; border-color: var(--coral); color: var(--coral); transform: rotate(7deg); }

/* Languages marquee */
.marquee { padding-block: 56px; overflow: hidden; }
.marquee-track { display: flex; gap: 48px; width: max-content; font-family: var(--font-head); font-weight: 800; font-size: 40px; color: var(--line-2); white-space: nowrap; animation: marquee 40s linear infinite; }
[dir="rtl"] .marquee-track { animation-direction: reverse; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* CTA */
.cta { padding-bottom: 96px; }
.cta-box { background: var(--surface); border: 1px solid var(--line); border-radius: 32px; padding: 56px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px; }
.cta-box > div { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.cta-box h2 { font-weight: 800; font-size: clamp(28px, 3vw, 40px); letter-spacing: -0.025em; }
.cta-box p { font-size: 17px; color: var(--muted); }

/* Inner pages */
.page-hero { padding-block: 72px 48px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; }
.page-hero h1 { font-weight: 800; font-size: clamp(38px, 5vw, 64px); letter-spacing: -0.03em; }
.page-hero p { font-size: 17px; color: var(--muted); max-width: 680px; }
.page-body { display: flex; flex-wrap: wrap; gap: 32px; padding-bottom: 96px; align-items: flex-start; }

.toc { flex: 1 1 240px; max-width: 280px; display: flex; flex-direction: column; gap: 2px; font-size: 15px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 16px; position: sticky; top: 88px; }
.toc-title { font-family: var(--font-head); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 8px 12px; }
.toc a { color: var(--text-2); text-decoration: none; display: block; padding: 8px 12px; border-radius: 10px; }
.toc a:hover { background: var(--surface-2); color: var(--mint); }

.doc { flex: 999 1 560px; min-width: 0; max-width: 780px; display: flex; flex-direction: column; gap: 16px; }
.doc section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; scroll-margin-top: 88px; }
.doc section.box-soft { background: var(--primary); border-color: var(--primary-line); }
.doc section.box-soft li { color: #E6FBF4; }
.doc h2 { font-weight: 800; font-size: 24px; letter-spacing: -.01em; margin-bottom: 14px; }
.doc h3 { font-weight: 700; font-size: 18px; margin: 22px 0 8px; }
.doc p, .doc li { font-size: 17px; line-height: 1.7; color: var(--text-2); }
.doc p { margin: 0 0 12px; }
.doc p:last-child { margin-bottom: 0; }
.doc ul { margin: 0 0 12px; padding-inline-start: 22px; }
.doc ul:last-child { margin-bottom: 0; }
.doc strong { color: #fff; }
.doc code { font-size: 15px; background: var(--surface-2); color: var(--mint); border-radius: 6px; padding: 1px 6px; }
.notice { display: flex; gap: 14px; align-items: flex-start; background: rgba(242, 177, 52, .12); border: 1px solid rgba(242, 177, 52, .4); border-radius: 16px; padding: 18px 20px; margin: 8px 0 12px; }
.notice svg { flex: none; margin-top: 3px; color: var(--amber); }
.notice p { margin: 0 !important; font-size: 16px !important; }

.faq { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.faq h2 { font-weight: 800; font-size: 26px; letter-spacing: -.01em; margin-bottom: 8px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 0 24px; }
.faq details[open] { border-color: var(--mint); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 64px; font-family: var(--font-head); font-weight: 700; font-size: 18px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 26px; color: var(--mint); font-weight: 600; }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { margin: 0 0 20px; font-size: 16px; line-height: 1.7; color: var(--text-2); }

.aside { flex: 1 1 300px; max-width: 380px; display: flex; flex-direction: column; gap: 16px; }
.contact-card { background: var(--primary); border: 1px solid var(--primary-line); border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.contact-card .badge-icon { background: rgba(255, 255, 255, .14); color: #fff; }
.contact-card h2 { font-weight: 800; font-size: 24px; }
.contact-card p { font-size: 16px; color: #D7F7EE; }
.contact-card .btn { background: #fff; color: var(--bg); font-size: 16px; min-height: 52px; overflow-wrap: anywhere; }
.contact-card .btn:hover { background: var(--soft); }

.not-found { padding-block: 120px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.not-found h1 { font-size: clamp(40px, 6vw, 72px); font-weight: 800; letter-spacing: -0.03em; }
.not-found p { color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--surface-2); padding-block: 32px; font-size: 14px; color: var(--muted); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 24px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--mint); }

/* Phones and small tablets */
/* The full menu needs about 1200px in the longest languages; below that the links move to a second row. */
@media (max-width: 1200px) {
  .main-nav, .header-cta { display: none; }
  .lang-picker { margin-inline-start: auto; }
  .mobile-nav { display: flex; flex-wrap: wrap; gap: 8px; padding-block: 0 12px; font-size: 14px; font-weight: 600; }
  .mobile-nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); white-space: nowrap; }
}

@media (max-width: 900px) {
  .wrap { padding-inline: 16px; }
  .hero { padding-block: 56px 48px; }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .s2, .r2 { grid-column: auto; grid-row: auto; }
  .tile { padding: 24px; }
  .marquee { padding-block: 40px; }
  .marquee-track { font-size: 30px; }
  .cta-box { padding: 32px 24px; border-radius: 24px; }
  .toc { position: static; max-width: none; }
  .doc section { padding: 24px; }
  .aside { max-width: none; }
}

@media (max-width: 520px) {
  .summary-row { flex-direction: column; align-items: flex-start; }
  .btn { width: 100%; }
  .lang-picker summary span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fill, .marquee-track { animation: none; }
}
