/* Bela Apps — shared site styles (index, design_portfolio, privacy) */

:root {
  --paper: #f3f5f9;
  --surface: #ffffff;
  --ink: #141b2e;
  --muted: #58627a;
  --line: #dce1ea;
  --cobalt: #2356e0;
  --cobalt-ink: #ffffff;
  --lagoon: #1fa7ba;
  --live: #16a34a;
  --testing: #c27c0e;
  --shadow: 0 1px 2px rgba(20, 27, 46, .06), 0 8px 24px rgba(20, 27, 46, .06);

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;

  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --r-band: 28px;
  --r-tile: 16px;
  --r-ctl: 10px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f1426;
    --surface: #161c33;
    --ink: #e8ecf6;
    --muted: #9aa3ba;
    --line: #262e4a;
    --cobalt: #6f8cff;
    --cobalt-ink: #0b1022;
    --lagoon: #4fd3e3;
    --live: #4ade80;
    --testing: #fbbf24;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f1426;
  --surface: #161c33;
  --ink: #e8ecf6;
  --muted: #9aa3ba;
  --line: #262e4a;
  --cobalt: #6f8cff;
  --cobalt-ink: #0b1022;
  --lagoon: #4fd3e3;
  --live: #4ade80;
  --testing: #fbbf24;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--lagoon); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 2000; background: var(--surface); padding: 8px 14px; border-radius: var(--r-ctl); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* Google Translate chrome */
.goog-te-banner-frame, .skiptranslate { display: none !important; }
body { top: 0 !important; }
#google_translate_element { display: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand img { width: 36px; height: 36px; border-radius: 50%; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: .95rem; padding: 8px 12px; border-radius: var(--r-ctl); }
.nav a:hover, .nav a[aria-current="true"] { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.tools { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border: 1px solid var(--line); border-radius: var(--r-ctl);
  background: var(--surface); color: var(--ink); cursor: pointer;
}
.icon-btn svg { width: 18px; height: 18px; }
.lang-select {
  height: 40px; border: 1px solid var(--line); border-radius: var(--r-ctl);
  background: var(--surface); color: var(--ink); font: 500 .9rem var(--font-body);
  padding: 0 10px; cursor: pointer;
}
.menu-btn { display: none; }
.theme-icon-dark { display: none; }
:root[data-theme="dark"] .theme-icon-dark { display: block; }
:root[data-theme="dark"] .theme-icon-light { display: none; }

@media (max-width: 900px) {
  .menu-btn { display: inline-grid; }
  .nav {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px;
    background: var(--paper); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 4px; font-size: 1.05rem; border-radius: 0; border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: 0; }
  .tools { margin-left: auto; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px;
  font: 600 .98rem var(--font-body); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: transform .15s ease, background-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--cobalt); color: var(--cobalt-ink); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-quiet:hover { border-color: var(--ink); }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-head { max-width: 640px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 { font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 700; }
.section-head p { color: var(--muted); margin-top: 14px; font-size: 1.1rem; }

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 9vw, 112px) 0 clamp(48px, 7vw, 88px); }
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1; }
.hero-lede { font-size: clamp(1.1rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 34em; margin-top: 22px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.dock {
  background: var(--surface); border: 1px solid var(--line); border-radius: 32px;
  box-shadow: var(--shadow); padding: 28px;
  display: grid; gap: 4px;
}
.dock-app {
  display: grid; grid-template-columns: 72px 1fr; gap: 16px; align-items: center;
  padding: 12px; border-radius: 20px; text-decoration: none;
}
.dock-app:hover { background: color-mix(in srgb, var(--ink) 4%, transparent); }
.dock-app img { width: 72px; height: 72px; border-radius: 18px; box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
.dock-app strong { display: block; font-family: var(--font-display); font-size: 1.2rem; letter-spacing: -0.01em; }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: .9rem; color: var(--muted); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--testing); }
.status-live::before { background: var(--live); box-shadow: 0 0 0 4px color-mix(in srgb, var(--live) 20%, transparent); }

@media (prefers-reduced-motion: no-preference) {
  .dock-app { animation: settle .7s cubic-bezier(.2, .9, .3, 1.2) both; }
  .dock-app:nth-child(2) { animation-delay: .12s; }
  .dock-app:nth-child(3) { animation-delay: .24s; }
  @keyframes settle { from { opacity: 0; transform: translateY(18px) scale(.96); } }
}

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- App bands ---------- */
.apps { padding-top: 0; }
.apps + .section { padding-top: clamp(32px, 5vw, 64px); }
:root[data-theme="dark"] .band { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); }
.apps .wrap { display: grid; gap: clamp(20px, 3vw, 32px); }
.band {
  --band-bg: #0b0820; --band-ink: #f4f2ff; --band-muted: #b9b4d6; --band-accent: #39e5ff; --band-accent-ink: #0b0820;
  background: var(--band-bg); color: var(--band-ink);
  border-radius: var(--r-band); overflow: hidden; position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 56px);
  padding: clamp(28px, 5vw, 56px);
  scroll-margin-top: 90px;
}
.band::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: var(--band-glow); }
.band > * { position: relative; }
.band-neondash {
  --band-bg: #0a0a1f; --band-accent: #3de7ff; --band-accent-ink: #07071a; --band-muted: #b3b6d9;
  --band-glow: radial-gradient(60% 80% at 100% 0%, rgba(255, 61, 203, .28), transparent 60%), radial-gradient(50% 60% at 0% 100%, rgba(61, 231, 255, .18), transparent 60%);
}
.band-proofpass {
  --band-bg: #090e1a; --band-ink: #e8eeff; --band-muted: #95a1b8; --band-accent: #00f5c8; --band-accent-ink: #04201a;
  --band-glow: radial-gradient(60% 80% at 100% 0%, rgba(0, 245, 200, .18), transparent 60%), radial-gradient(50% 60% at 0% 100%, rgba(0, 191, 255, .12), transparent 60%);
}
.band-swipevibe {
  --band-bg: #150a2e; --band-ink: #f6f2ff; --band-muted: #bdb2dc; --band-accent: #a78bfa; --band-accent-ink: #150a2e;
  --band-glow: radial-gradient(60% 80% at 100% 0%, rgba(124, 58, 237, .45), transparent 60%), radial-gradient(50% 60% at 0% 100%, rgba(10, 191, 188, .22), transparent 60%);
}
.band-copy { display: flex; flex-direction: column; align-self: center; }
.band-id { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.band-id img { width: 64px; height: 64px; border-radius: 16px; }
.band-id .status { color: var(--band-muted); }
.band h3 { font-size: clamp(2rem, 3.6vw, 2.75rem); font-weight: 800; letter-spacing: -0.03em; }
.band-tagline { font-size: 1.2rem; color: var(--band-ink); margin-top: 12px; max-width: 28em; }
.band-features { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; color: var(--band-muted); }
.band-features li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; }
.band-features li::before { content: ""; width: 8px; height: 8px; margin-top: .62em; border-radius: 2px; background: var(--band-accent); }
.band-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.band .btn-primary { background: var(--band-accent); color: var(--band-accent-ink); }
.band .btn-quiet { color: var(--band-ink); border-color: color-mix(in srgb, var(--band-ink) 28%, transparent); }
.band .btn-quiet:hover { border-color: var(--band-ink); }
.band .btn-soon { color: var(--band-muted); border-color: color-mix(in srgb, var(--band-ink) 16%, transparent); cursor: default; }
.band .btn-soon:hover { transform: none; }

.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: center; }
.shots img { border-radius: var(--r-tile); width: 100%; aspect-ratio: 506 / 1100; object-fit: cover; box-shadow: 0 18px 40px rgba(0, 0, 0, .45); }
.shots img:nth-child(2) { transform: translateY(-18px); }

@media (max-width: 900px) {
  .band { grid-template-columns: minmax(0, 1fr); }
  .shots { margin: 0 -8px; }
}
@media (max-width: 560px) {
  .shots { grid-template-columns: repeat(3, 70%); overflow-x: auto; scroll-snap-type: x mandatory; padding: 20px 8px 8px; margin: 0 -28px; padding-inline: 28px; scrollbar-width: none; }
  .shots img { scroll-snap-align: center; }
  .shots img:nth-child(2) { transform: none; }
}

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 32px; }
.service { border-top: 2px solid var(--ink); padding-top: 20px; }
.service h3 { font-size: 1.35rem; font-weight: 700; margin-bottom: 10px; }
.service p { color: var(--muted); }
.service .shipped { margin-top: 14px; font-size: .92rem; color: var(--ink); }
@media (max-width: 900px) { .services { grid-template-columns: repeat(2, 1fr); gap: 40px 32px; } }
@media (max-width: 560px) { .services { grid-template-columns: 1fr; } }

/* ---------- Story ---------- */
.story { background: var(--surface); border-block: 1px solid var(--line); }
.story .wrap { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 80px); }
.story-text p { color: var(--muted); margin-top: 18px; max-width: 34em; }
.story-text p strong { color: var(--ink); font-weight: 600; }
.facts { display: flex; flex-wrap: wrap; gap: 32px; margin: 32px 0 0; }
.facts div { display: flex; flex-direction: column-reverse; }
.facts dt { color: var(--muted); font-size: .92rem; }
.facts dd { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 2.2rem; letter-spacing: -0.03em; line-height: 1.1; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 32px 40px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--cobalt); }
.timeline li.next::before { border-style: dashed; border-color: var(--muted); }
.timeline time { font-family: var(--font-display); font-weight: 700; color: var(--cobalt); }
.timeline h3 { font-size: 1.2rem; margin: 4px 0 6px; font-weight: 700; letter-spacing: -0.01em; }
.timeline p { color: var(--muted); }
@media (max-width: 900px) { .story .wrap { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Design thumbnails ---------- */
.designs-group + .designs-group { margin-top: 48px; }
.designs-group h3 { font-size: 1.35rem; font-weight: 700; margin-bottom: 18px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.designs-group h3 span { font-family: var(--font-body); font-weight: 500; font-size: .95rem; color: var(--muted); letter-spacing: 0; }
.thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.thumb { text-decoration: none; display: block; }
.thumb-img { border-radius: 12px; overflow: hidden; background: var(--line); aspect-ratio: 4 / 3; border: 1px solid var(--line); }
.thumb-img img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .35s ease; }
.thumb:hover .thumb-img img { transform: scale(1.04); }
.thumb strong { display: block; margin-top: 10px; font-weight: 600; }
.thumb span { display: block; color: var(--muted); font-size: .9rem; }
.designs-more { margin-top: 40px; }
@media (max-width: 1000px) { .thumbs { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .thumbs { grid-template-columns: repeat(2, 1fr); gap: 16px; } }

/* ---------- Contact ---------- */
.contact .wrap { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact-direct { margin-top: 28px; display: grid; gap: 6px; }
.contact-direct span { color: var(--muted); font-size: .95rem; }
.contact-direct a { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; text-decoration-color: var(--lagoon); text-underline-offset: 5px; overflow-wrap: anywhere; }
.form { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: clamp(20px, 4vw, 36px); display: grid; gap: 18px; box-shadow: var(--shadow); }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: .95rem; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 12px 14px;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--cobalt); outline-offset: 0; border-color: transparent; }
.form .btn { justify-self: start; }
@media (max-width: 900px) { .contact .wrap { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 40px; }
.site-footer .wrap { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.footer-links a:hover { color: var(--ink); }
.socials { display: flex; gap: 8px; }
.socials a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); color: var(--ink); }
.socials a:hover { background: var(--ink); color: var(--paper); }
.socials svg { width: 18px; height: 18px; fill: currentColor; }
.copy { color: var(--muted); font-size: .9rem; grid-column: 1 / -1; }
@media (max-width: 700px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* ---------- Inner pages ---------- */
.page-hero { padding: clamp(48px, 8vw, 96px) 0 clamp(32px, 5vw, 56px); }
.page-hero h1 { font-size: clamp(2.4rem, 5.6vw, 4.25rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; }
.page-hero p { color: var(--muted); font-size: 1.15rem; margin-top: 16px; max-width: 38em; }
.page-hero .meta { font-size: .95rem; margin-top: 12px; }

.filter { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); margin-bottom: 40px; }
.filter button { font: 600 .95rem var(--font-body); color: var(--muted); background: transparent; border: 0; padding: 9px 18px; border-radius: 999px; cursor: pointer; }
.filter button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.thumbs-wide { grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 900px) { .thumbs-wide { grid-template-columns: repeat(2, 1fr); gap: 18px; } }

.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.case { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.case img { width: 64px; height: 64px; border-radius: 16px; margin-bottom: 8px; }
.case h3 { font-size: 1.35rem; font-weight: 700; }
.case p { color: var(--muted); margin-top: 4px; }
.case-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: auto; padding-top: 12px; font-weight: 600; font-size: .95rem; }
.case-links a { color: var(--cobalt); text-underline-offset: 3px; }
@media (max-width: 900px) { .cases { grid-template-columns: 1fr; } }

.prose { max-width: 720px; padding-bottom: clamp(64px, 9vw, 112px); }
.prose section { padding: 32px 0; border-top: 1px solid var(--line); }
.prose h2 { font-size: 1.6rem; font-weight: 700; margin-bottom: 12px; }
.prose p, .prose li { color: var(--muted); }
.prose p + p, .prose p + ul, .prose ul + p { margin-top: 12px; }
.prose ul { padding-left: 1.2em; margin: 12px 0 0; display: grid; gap: 6px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--cobalt); text-underline-offset: 3px; }
.note { margin-top: 16px; padding: 14px 18px; border-left: 3px solid var(--lagoon); background: var(--surface); border-radius: 0 var(--r-ctl) var(--r-ctl) 0; }

/* ---------- RTL ---------- */
html[dir="rtl"] .timeline::before { left: auto; right: 7px; }
html[dir="rtl"] .timeline li { padding: 0 40px 32px 0; }
html[dir="rtl"] .timeline li::before { left: auto; right: 0; }
html[dir="rtl"] .nav { margin-left: 0; margin-right: auto; }
@media (max-width: 560px) {
  .dock { padding: 12px; border-radius: 24px; }
  .dock-app { grid-template-columns: 56px 1fr; }
  .dock-app img { width: 56px; height: 56px; border-radius: 14px; }
}
