/* ==========================================================================
   Nexoryn Technologies — Design System
   Colors derived from brand mark: navy base, cyan→blue gradient accent
   ========================================================================== */

:root {
  --color-navy-950: #060e1d;
  --color-navy-900: #0a1a33;
  --color-navy-800: #0f2442;
  --color-navy-700: #16304f;
  --color-navy-600: #203d60;

  --color-cyan-400: #38bdf8;
  --color-cyan-500: #0ea5e9;
  --color-blue-700: #1e3a8a;

  --gradient-brand: linear-gradient(120deg, var(--color-cyan-400) 0%, var(--color-cyan-500) 45%, var(--color-blue-700) 100%);
  --gradient-brand-soft: linear-gradient(120deg, rgba(56, 189, 248, 0.18) 0%, rgba(30, 58, 138, 0.12) 100%);

  --color-slate-500: #64748b;
  --color-slate-300: #cbd5e1;
  --color-slate-200: #e2e8f0;

  --color-surface-light: #f8fafc;
  --color-white: #ffffff;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-soft: 0 20px 60px -25px rgba(10, 26, 51, 0.45);
  --shadow-card: 0 10px 30px -15px rgba(10, 26, 51, 0.25);

  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --container-width: 1180px;

  color-scheme: dark;
  --bg: var(--color-navy-950);
  --bg-elevated: var(--color-navy-900);
  --bg-elevated-2: var(--color-navy-800);
  --text-primary: #f3f6fb;
  --text-secondary: #a9b7cc;
  --text-muted: #7c8aa0;
  --border-subtle: rgba(203, 213, 225, 0.12);
  --border-strong: rgba(203, 213, 225, 0.22);
  --nav-bg: rgba(6, 14, 29, 0.82);
  --card-bg: rgba(255, 255, 255, 0.035);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: var(--color-surface-light);
  --bg-elevated: var(--color-white);
  --bg-elevated-2: #eef2f8;
  --text-primary: var(--color-navy-900);
  --text-secondary: #3b4a63;
  --text-muted: var(--color-slate-500);
  --border-subtle: rgba(10, 26, 51, 0.08);
  --border-strong: rgba(10, 26, 51, 0.14);
  --nav-bg: rgba(248, 250, 252, 0.88);
  --card-bg: #ffffff;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}

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

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

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

p { line-height: 1.7; color: var(--text-secondary); margin: 0 0 1em; }

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

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  background: var(--color-cyan-500);
  color: #04131f;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 1000;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 16px; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn:focus-visible { outline: 2px solid var(--color-cyan-400); outline-offset: 2px; }

.btn-primary {
  background: var(--gradient-brand);
  color: #04131f;
  box-shadow: 0 10px 30px -10px rgba(14, 165, 233, 0.55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -12px rgba(14, 165, 233, 0.6); }

.btn-secondary {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.btn-secondary:hover { border-color: var(--color-cyan-400); color: var(--color-cyan-400); }

.btn-block { width: 100%; }

/* ---------- Navbar ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border-subtle);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.brand img { height: 34px; width: auto; }
.brand span { color: var(--text-primary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text-primary);
  border-color: var(--color-cyan-400);
}

.nav-actions { display: flex; align-items: center; gap: 12px; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 1rem;
}
.theme-toggle:hover { border-color: var(--color-cyan-400); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
}

@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    inset: 68px 16px auto 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 10px;
    box-shadow: var(--shadow-soft);
    transform-origin: top;
    transform: scaleY(0);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .nav-links.is-open { transform: scaleY(1); opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 12px 10px; border-bottom: none; border-radius: var(--radius-sm); display: block; }
  .nav-links a:hover, .nav-links a[aria-current="page"] { background: var(--bg-elevated-2); }
  .nav-toggle { display: inline-flex; }
}

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

.hero {
  padding: 96px 0 72px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -180px; right: -160px;
  width: 560px; height: 560px;
  background: var(--gradient-brand-soft);
  filter: blur(40px);
  border-radius: 50%;
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 760px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-cyan-400);
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.hero h1 { font-size: clamp(2.3rem, 4.6vw, 3.5rem); margin-bottom: 0.45em; }
.hero h1 .accent {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lede { font-size: 1.15rem; max-width: 620px; }
.hero-actions { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }

.hero-meta {
  display: flex;
  gap: 32px;
  margin-top: 56px;
  flex-wrap: wrap;
}
.hero-meta div { min-width: 140px; }
.hero-meta strong { display: block; font-size: 1.6rem; color: var(--text-primary); }
.hero-meta span { font-size: 0.85rem; color: var(--text-muted); }

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

section { padding: 88px 0; }
.section-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section-head h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.section-alt { background: var(--bg-elevated); border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }

/* ---------- Cards / Grids ---------- */

.grid {
  display: grid;
  gap: 24px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 920px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 30px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-card); }

.icon-badge {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gradient-brand);
  color: #04131f;
  font-size: 1.2rem;
  margin-bottom: 18px;
}

.card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.card p { margin-bottom: 0; font-size: 0.95rem; }
.card ul { margin: 14px 0 0; padding-left: 18px; color: var(--text-secondary); font-size: 0.92rem; }
.card li { margin-bottom: 6px; }

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-cyan-400);
}

/* ---------- Process steps ---------- */

.process {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}
@media (max-width: 920px) { .process { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .process { grid-template-columns: 1fr; } }
.process-step { position: relative; padding: 24px 18px; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--card-bg); }
.process-step .num {
  font-size: 0.8rem; font-weight: 800; letter-spacing: 0.06em;
  color: var(--color-cyan-400); margin-bottom: 10px; display: block;
}
.process-step h3 { font-size: 1rem; margin-bottom: 6px; }
.process-step p { font-size: 0.86rem; margin: 0; }

/* ---------- CTA band ---------- */

.cta-band {
  background: var(--color-navy-900);
  background-image: radial-gradient(circle at top right, rgba(56, 189, 248, 0.18), transparent 60%);
  border-radius: var(--radius-lg);
  padding: 56px;
  text-align: center;
  color: #f3f6fb;
  border: 1px solid var(--color-navy-700);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: var(--color-slate-300); max-width: 520px; margin: 0 auto 28px; }
.cta-band .btn-group { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

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

.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 64px 0 32px;
  background: var(--bg-elevated);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 48px;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { max-width: 280px; font-size: 0.92rem; }
.footer-col h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 16px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 0.92rem; color: var(--text-secondary); }
.footer-col a:hover { color: var(--color-cyan-400); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 28px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.83rem;
  color: var(--text-muted);
}

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

.page-header { padding: 72px 0 48px; text-align: center; }
.page-header .eyebrow { margin-bottom: 18px; }
.page-header h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.page-header p { max-width: 620px; margin: 0 auto; font-size: 1.05rem; }

/* ---------- Service detail blocks ---------- */

.service-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 56px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.service-block:last-child { border-bottom: none; }
.service-block:nth-child(even) .service-copy { order: 2; }
@media (max-width: 860px) {
  .service-block { grid-template-columns: 1fr; }
  .service-block:nth-child(even) .service-copy { order: 0; }
}
.service-visual {
  border-radius: var(--radius-lg);
  background: var(--gradient-brand-soft);
  border: 1px solid var(--border-subtle);
  padding: 44px;
  display: flex; align-items: center; justify-content: center;
}
.service-visual .icon-badge { width: 84px; height: 84px; font-size: 2.1rem; margin: 0; border-radius: 20px; }
.service-copy h2 { font-size: 1.6rem; }
.service-copy ul { padding-left: 20px; color: var(--text-secondary); }
.service-copy li { margin-bottom: 8px; }

/* ---------- Values / About ---------- */

.values-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 920px) { .values-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .values-grid { grid-template-columns: 1fr; } }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.split-visual {
  border-radius: var(--radius-lg);
  background: var(--bg-elevated-2);
  border: 1px solid var(--border-subtle);
  padding: 48px;
  text-align: center;
}
.split-visual img { max-width: 220px; margin: 0 auto; }

/* ---------- Portfolio ---------- */

.work-card {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  background: var(--card-bg);
}
.work-thumb {
  height: 180px;
  background: var(--gradient-brand-soft);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  border-bottom: 1px solid var(--border-subtle);
}
.work-thumb .icon-badge { margin: 0; width: 60px; height: 60px; font-size: 1.5rem; }
.badge-soon {
  position: absolute; top: 14px; right: 14px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
  background: var(--bg-elevated); border: 1px solid var(--border-strong);
  padding: 4px 10px; border-radius: 999px; color: var(--text-muted);
}
.work-body { padding: 22px 24px; }
.work-body h3 { font-size: 1.02rem; margin-bottom: 8px; }
.work-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.tag {
  font-size: 0.74rem; font-weight: 600;
  background: var(--bg-elevated-2); color: var(--text-secondary);
  padding: 4px 10px; border-radius: 999px;
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
}
@media (max-width: 920px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-info-card {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.contact-info-item { display: flex; gap: 14px; margin-bottom: 24px; }
.contact-info-item:last-child { margin-bottom: 0; }
.contact-info-item .icon-badge { flex-shrink: 0; margin-bottom: 0; width: 42px; height: 42px; font-size: 1.05rem; border-radius: 10px; }
.contact-info-item h3 { font-size: 0.95rem; margin-bottom: 4px; }
.contact-info-item a, .contact-info-item p { font-size: 0.93rem; margin: 0; color: var(--text-secondary); }
.contact-info-item a:hover { color: var(--color-cyan-400); }

.form-card {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 8px; color: var(--text-primary); }
.field input, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--color-cyan-400);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}
.field-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 6px; }
.hp-field { position: absolute; left: -9999px; top: -9999px; }

.form-status {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  display: none;
}
.form-status.is-success { display: block; background: rgba(34, 197, 94, 0.12); color: #22c55e; border: 1px solid rgba(34, 197, 94, 0.3); }
.form-status.is-error { display: block; background: rgba(248, 113, 113, 0.12); color: #f87171; border: 1px solid rgba(248, 113, 113, 0.3); }

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

.legal-content { max-width: 760px; margin: 0 auto; }
.legal-content h2 { font-size: 1.3rem; margin-top: 2em; }
.legal-content ul { color: var(--text-secondary); padding-left: 20px; }
.legal-content li { margin-bottom: 8px; }

/* ---------- 404 ---------- */

.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.error-page .code {
  font-size: 5rem;
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Utilities ---------- */

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
