/* ============================================
   Oratech Digital Services — Design System
   Dark theme, royal blue accent, ledger motif
   ============================================ */

:root {
  --bg: #0a0e17;
  --surface: #10151f;
  --card: #121826;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --fg: #e8ebf2;
  --muted: #8b93a7;
  --accent: #4f6bff;
  --accent-2: #7d94ff;
  --signal: #f2a65a;
  --radius: 16px;
  --font-display: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'Courier New', monospace;
  --max-width: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}

.mono { font-family: var(--font-mono); }

::selection { background: rgba(79, 107, 255, 0.3); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 14, 23, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 14px;
}

.nav-desktop {
  display: flex;
  gap: 32px;
  margin-left: auto;
}

.nav-desktop a {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s ease;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--fg);
}

.nav-cta { margin-left: 8px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 24px 20px;
  border-top: 1px solid var(--border);
  background: rgba(10, 14, 23, 0.96);
}

.nav-mobile a {
  padding: 12px 8px;
  font-size: 15px;
  color: var(--muted);
  border-radius: 10px;
}

.nav-mobile a:hover,
.nav-mobile a.active {
  color: var(--fg);
  background: var(--card);
}

.nav-mobile .btn { margin-top: 10px; align-self: flex-start; }

.nav-mobile.open { display: flex; }

@media (max-width: 860px) {
  .nav-desktop, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-sm { padding: 9px 18px; font-size: 13px; }
.btn-lg { padding: 15px 32px; font-size: 15px; }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-2); }

.btn-outline {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--fg);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent-2); }

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

.hero {
  position: relative;
  overflow: hidden;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(79, 107, 255, 0.16), transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  padding: 100px 0 80px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--signal);
}

.hero h1 {
  margin-top: 22px;
  max-width: 780px;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.1;
}

.text-gradient {
  background: linear-gradient(120deg, var(--fg) 20%, var(--accent-2) 65%, var(--signal) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lead {
  margin-top: 22px;
  max-width: 560px;
  font-size: 18px;
  color: var(--muted);
}

.hero-actions {
  margin-top: 38px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- Ledger tape (signature element) ---------- */

.ledger-tape {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.015);
  padding: 12px 0;
}

.ledger-track {
  display: flex;
  width: max-content;
  gap: 40px;
  animation: ledgerScroll 38s linear infinite;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.ledger-track span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ledger-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal);
}

@keyframes ledgerScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

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

section.block {
  border-bottom: 1px solid var(--border);
  padding: 84px 0;
}

section.block.surface { background: rgba(255, 255, 255, 0.015); }
section.block.no-border { border-bottom: none; }

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.section-head p {
  margin-top: 14px;
  max-width: 620px;
  color: var(--muted);
}

/* ---------- Grid / Cards ---------- */

.grid {
  display: grid;
  gap: 24px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 860px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
@media (min-width: 861px) and (max-width: 1100px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover { border-color: var(--accent); }

.card .code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--signal);
}

.card h3 {
  margin-top: 12px;
  font-size: 17px;
}

.card p {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
}

.pill {
  display: inline-block;
  padding: 10px 20px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Phone mockup (products page) ---------- */

.phone-mock {
  width: 230px;
  height: 420px;
  border-radius: 40px;
  border: 1px solid var(--border-strong);
  background: var(--card);
  padding: 12px;
  margin: 0 auto;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6);
}

.phone-screen {
  height: 100%;
  border-radius: 30px;
  background: var(--bg);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
}

.phone-notch {
  width: 40px;
  height: 5px;
  background: var(--border-strong);
  border-radius: 3px;
  margin: 0 auto 22px;
}

.phone-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
}

.phone-balance {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  margin-top: 4px;
}

.phone-asset {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-top: 10px;
}

.phone-footer {
  margin-top: auto;
  background: rgba(79, 107, 255, 0.12);
  color: var(--accent-2);
  text-align: center;
  font-size: 12px;
  padding: 10px;
  border-radius: 10px;
}

/* ---------- FAQ accordion (pure CSS/JS) ---------- */

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.faq-question .chev {
  transition: transform 0.2s ease;
  color: var(--muted);
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item.open .chev { transform: rotate(180deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  color: var(--muted);
  font-size: 14px;
}

.faq-answer p { padding: 0 24px 20px; margin: 0; }

/* ---------- Forms ---------- */

.form-group { margin-bottom: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}

input, textarea, select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--fg);
  font-family: var(--font-body);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
}

.alert {
  border-radius: var(--radius);
  padding: 20px 24px;
  border: 1px solid var(--border);
}

.alert-success {
  border-color: rgba(79, 107, 255, 0.4);
  background: rgba(79, 107, 255, 0.08);
}

.alert-error {
  border-color: rgba(242, 100, 90, 0.4);
  background: rgba(242, 100, 90, 0.08);
}

.map-placeholder {
  height: 200px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  padding: 16px;
}

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

.site-footer { background: rgba(255, 255, 255, 0.015); }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 70px 0 50px;
}

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-brand p {
  margin-top: 16px;
  max-width: 300px;
  font-size: 14px;
  color: var(--muted);
}

.site-footer h3 {
  font-size: 14px;
  margin-bottom: 16px;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.site-footer ul a {
  font-size: 14px;
  color: var(--muted);
}
.site-footer ul a:hover { color: var(--fg); }

.footer-email {
  margin-top: 20px;
  font-size: 13px;
  color: var(--muted);
}

.footer-bottom { border-top: 1px solid var(--border); }

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 22px 0;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Page header (secondary pages) ---------- */

.page-header {
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.015);
  padding: 76px 0 60px;
}

.page-header h1 {
  margin-top: 16px;
  font-size: clamp(2rem, 4vw, 2.8rem);
  max-width: 700px;
}

.page-header p {
  margin-top: 20px;
  max-width: 600px;
  font-size: 17px;
  color: var(--muted);
}

/* ---------- Legal pages ---------- */

.legal-content h2 {
  font-size: 18px;
  margin-top: 36px;
  margin-bottom: 10px;
}
.legal-content p { color: var(--muted); font-size: 14.5px; }
.legal-content { max-width: 720px; }

/* ---------- Utility ---------- */

.text-center { text-align: center; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-3 { gap: 12px; }
.mt-8 { margin-top: 32px; }
.icon-accent { color: var(--accent-2); }

/* Fade-in on scroll */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.in { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .ledger-track { animation: none; }
}

/* ============================================
   Mobile refinements — tighter, sharper spacing
   ============================================ */

@media (max-width: 640px) {
  .nav-mobile { padding: 10px 20px 18px; }
  .nav-mobile a { padding: 11px 8px; font-size: 14.5px; }

  .container { padding: 0 20px; }

  .nav-inner { height: 60px; }
  .brand { font-size: 16px; }
  .brand-mark { width: 28px; height: 28px; font-size: 13px; }

  .hero-inner { padding: 56px 0 40px; }
  .hero h1 { margin-top: 16px; }
  .hero p.lead { margin-top: 16px; font-size: 16px; }
  .hero-actions { margin-top: 26px; gap: 12px; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }

  .ledger-tape { padding: 10px 0; }
  .ledger-track { gap: 26px; font-size: 11px; }

  section.block { padding: 52px 0; }

  .section-head p { margin-top: 10px; }

  .grid { gap: 16px; }
  .card { padding: 20px; }
  .card h3 { margin-top: 10px; font-size: 16px; }

  .page-header { padding: 52px 0 40px; }
  .page-header h1 { margin-top: 12px; }
  .page-header p { margin-top: 14px; font-size: 15px; }

  .phone-mock { width: 190px; height: 350px; border-radius: 32px; }
  .phone-screen { padding: 16px 14px; border-radius: 24px; }
  .phone-balance { font-size: 22px; }

  .footer-grid { padding: 48px 0 32px; gap: 32px; }
  .footer-bottom-inner { padding: 16px 0; flex-direction: column; align-items: flex-start; gap: 4px; }

  .form-group { margin-bottom: 16px; }
  .btn-lg { padding: 13px 26px; font-size: 14px; }

  .faq-question { padding: 16px 18px; font-size: 14px; }
  .faq-answer p { padding: 0 18px 16px; }
}

@media (max-width: 400px) {
  .container { padding: 0 16px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .nav-cta { display: none; }
}
