/* ============================================================
   Trovewick — lightweight design system
   No frameworks. System-friendly, edge-fast.
   ============================================================ */

:root {
  --ink: #0b0d12;
  --ink-soft: #1a1e28;
  --muted: #5b6472;
  --line: #e7e9ee;
  --bg: #ffffff;
  --bg-alt: #f6f7fb;
  --card: #ffffff;
  --brand: #4f46e5;
  --brand-2: #8b5cf6;
  --brand-ink: #ffffff;
  --accent: #10b981;
  --ring: rgba(79, 70, 229, 0.35);
  --shadow-sm: 0 1px 2px rgba(15, 18, 30, 0.06), 0 1px 3px rgba(15, 18, 30, 0.05);
  --shadow-md: 0 10px 30px -12px rgba(15, 18, 30, 0.25);
  --shadow-lg: 0 30px 60px -20px rgba(31, 27, 84, 0.35);
  --radius: 16px;
  --radius-sm: 12px;
  --container: 1160px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f2f4f8;
    --ink-soft: #cdd3de;
    --muted: #9aa3b2;
    --line: #232838;
    --bg: #0b0d12;
    --bg-alt: #0f121a;
    --card: #121623;
    --brand: #7c74ff;
    --brand-2: #a78bfa;
    --ring: rgba(124, 116, 255, 0.4);
    --shadow-md: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, 0.7);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; }

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

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 14px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 200;
}
.skip-link:focus { left: 16px; top: 16px; }

/* ---------- Buttons ---------- */
.btn {
  --_bg: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 0.95rem; line-height: 1;
  padding: 12px 20px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 15px 26px; font-size: 1rem; }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: var(--brand-ink); box-shadow: var(--shadow-md);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: saturate(180%) blur(14px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.03em; }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { color: var(--ink-soft); font-weight: 500; font-size: 0.95rem; transition: color .15s; }
.nav a:hover { color: var(--brand); }
.header-actions { display: flex; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; margin-left: auto; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav { display: none; flex-direction: column; gap: 4px; padding: 12px 24px 20px; border-bottom: 1px solid var(--line); background: var(--bg); }
.mobile-nav a { padding: 12px 8px; color: var(--ink-soft); font-weight: 500; border-radius: 10px; }
.mobile-nav a:hover { background: var(--bg-alt); }
.mobile-nav .btn { margin-top: 8px; }
.mobile-nav.open { display: flex; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 84px 0 72px; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 55% at 80% -10%, color-mix(in srgb, var(--brand-2) 22%, transparent), transparent 70%),
    radial-gradient(45% 50% at 8% 10%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.9rem); font-weight: 800; }
.lead { font-size: 1.15rem; color: var(--muted); margin: 22px 0 30px; max-width: 34ch; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-trust { display: flex; gap: 32px; margin-top: 44px; flex-wrap: wrap; }
.hero-trust div { display: flex; flex-direction: column; }
.hero-trust strong { font-size: 1.35rem; }
.hero-trust span { color: var(--muted); font-size: 0.9rem; }

.hero-visual { position: relative; height: 380px; }
.orb {
  position: absolute; inset: 10% 8%;
  border-radius: 32px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  filter: blur(2px); opacity: .92; box-shadow: var(--shadow-lg);
  animation: float 7s ease-in-out infinite;
}
.glass-card {
  position: absolute; padding: 14px 18px; border-radius: 14px;
  background: color-mix(in srgb, var(--card) 70%, transparent);
  backdrop-filter: blur(10px); border: 1px solid color-mix(in srgb, #fff 35%, transparent);
  box-shadow: var(--shadow-md); font-size: 0.9rem; font-weight: 600; color: var(--ink);
}
.glass-card strong { color: var(--brand); }
.card-1 { top: 8%; left: -4%; animation: float 6s ease-in-out infinite; }
.card-2 { bottom: 16%; left: 6%; animation: float 8s ease-in-out infinite .3s; }
.card-3 { top: 30%; right: -6%; animation: float 7s ease-in-out infinite .6s; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 6px; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ---------- Band ---------- */
.band { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.band-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding: 28px 24px; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat strong { font-size: 1rem; }
.stat span { color: var(--muted); font-size: 0.88rem; }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 680px; margin: 0 auto 52px; text-align: center; }
.section-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 800; }
.section-sub { color: var(--muted); font-size: 1.08rem; margin-top: 16px; }

/* ---------- Model ---------- */
.model-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.model-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s, border-color .2s;
}
.model-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.model-icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px;
  background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand);
}
.model-icon svg { width: 24px; height: 24px; }
.model-card h3 { font-size: 1.2rem; margin-bottom: 10px; }
.model-card p { color: var(--muted); margin: 0; }

/* ---------- Services ---------- */
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.svc-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s, border-color .2s;
}
.svc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.svc-card h3 { font-size: 1.12rem; margin-bottom: 14px; display: flex; align-items: baseline; gap: 10px; }
.svc-kicker { font-size: 0.78rem; font-weight: 700; color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent); padding: 3px 8px; border-radius: 6px; }
.svc-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.svc-card li { position: relative; padding-left: 22px; color: var(--ink-soft); font-size: 0.94rem; }
.svc-card li::before {
  content: ""; position: absolute; left: 0; top: 8px; width: 12px; height: 8px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}
.svc-card--wide {
  grid-column: span 2; display: flex; flex-direction: column; gap: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 10%, var(--card)), var(--card));
}
.svc-card--wide .svc-desc { color: var(--muted); margin: 0; }
.svc-card--wide .btn { align-self: flex-start; margin-top: auto; }

/* ---------- Why ---------- */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.why-item { padding: 24px; border-left: 2px solid var(--brand); background: var(--bg-alt); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.why-item h3 { font-size: 1.1rem; margin-bottom: 8px; }
.why-item p { color: var(--muted); margin: 0; font-size: 0.96rem; }

/* ---------- Brands ---------- */
.brand-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.brand-tile {
  display: grid; place-items: center; padding: 40px 20px; border-radius: var(--radius);
  background: var(--card); border: 1px dashed var(--line); font-weight: 700; font-size: 1.15rem;
  color: var(--ink-soft); transition: border-color .2s, color .2s, transform .2s;
}
.brand-tile:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-3px); }
.brand-note { text-align: center; color: var(--muted); font-size: 0.88rem; margin-top: 20px; }

/* ---------- Process ---------- */
.process { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.process li { position: relative; padding-top: 12px; }
.step-no {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; margin-bottom: 16px;
  font-weight: 800; font-size: 1.1rem; color: var(--brand-ink);
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: var(--shadow-md);
}
.process h3 { font-size: 1.15rem; margin-bottom: 8px; }
.process p { color: var(--muted); margin: 0; font-size: 0.96rem; }

/* ---------- Contact ---------- */
.section-contact { background: var(--bg-alt); }
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: start; }
.contact-copy h2 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); margin-bottom: 16px; }
.contact-copy p { color: var(--muted); font-size: 1.05rem; }
.contact-copy a { color: var(--brand); font-weight: 600; }
.contact-points { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.contact-points li { position: relative; padding-left: 28px; color: var(--ink-soft); }
.contact-points li::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 9px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg);
}

.contact-form {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow-md); display: flex; flex-direction: column; gap: 18px;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  font-family: inherit; font-size: 0.98rem; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring);
}
.field textarea { resize: vertical; min-height: 120px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.form-alt { color: var(--muted); font-size: 0.92rem; text-decoration: underline; text-underline-offset: 3px; }
.form-alt:hover { color: var(--brand); }
.form-status { margin: 0; font-size: 0.95rem; font-weight: 500; min-height: 1.2em; }
.form-status.ok { color: var(--accent); }
.form-status.err { color: #ef4444; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #cdd3de; padding: 56px 0 28px; }
@media (prefers-color-scheme: dark) { .site-footer { background: #05070b; } }
.footer-inner { display: grid; grid-template-columns: 1.2fr 2fr; gap: 40px; padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-brand .brand { color: #fff; }
.footer-brand p { color: #9aa3b2; margin: 14px 0 0; max-width: 30ch; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer-cols h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: #fff; margin-bottom: 14px; }
.footer-cols a { display: block; color: #9aa3b2; padding: 5px 0; font-size: 0.94rem; transition: color .15s; }
.footer-cols a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; padding-top: 24px; color: #6b7280; font-size: 0.86rem; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .lead { max-width: none; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .svc-card--wide { grid-column: span 2; }
  .model-grid, .why-grid, .process { grid-template-columns: repeat(2, 1fr); }
  .band-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav, .header-actions { display: none; }
  .nav-toggle { display: flex; }
  .section { padding: 64px 0; }
  .hero { padding: 56px 0 48px; }
  .services-grid, .model-grid, .why-grid, .process, .brand-grid { grid-template-columns: 1fr; }
  .svc-card--wide { grid-column: span 1; }
  .field-row { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr; }
  .band-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; }
}
