/* ==========================================================
   Ozric Technologies — main stylesheet
   ========================================================== */

:root {
  /* Brand palette — sampled from the Ozric logo */
  --slate: #43526f;
  --lavender: #7373a7;
  --peach: #f4a896;
  --navy-900: #1b2134;
  --navy-800: #242b43;
  --navy-700: #2e3654;
  --ink: #1e2538;
  --text: #3f4759;
  --muted: #6b7286;
  --line: #e6e6ef;
  --bg: #ffffff;
  --bg-alt: #f7f6fa;
  --grad: linear-gradient(135deg, var(--lavender), var(--peach));
  /* deeper version for white text and small text on white */
  --grad-strong: linear-gradient(135deg, #5f5f98, #d9826f);
  --radius: 16px;
  --shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.18);
  --shadow-lg: 0 24px 60px -20px rgba(15, 23, 42, 0.35);
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --header-h: 72px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.6em;
}

p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

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

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--grad-strong);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.8rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  font-family: inherit;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--grad-strong);
  color: #fff;
  box-shadow: 0 10px 24px -10px rgba(115, 115, 167, 0.7);
}
.btn-primary:hover { box-shadow: 0 14px 30px -10px rgba(115, 115, 167, 0.85); }
.btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.04);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.btn-sm { padding: 0.55rem 1.1rem; font-size: 0.875rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
/* Transparent over the dark 3D hero; turns white once the page scrolls or the menu opens. */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.site-header.scrolled,
.site-header.menu-open {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px -14px rgba(30, 37, 56, 0.35);
}
.nav-wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo { display: inline-flex; align-items: center; }
.logo img { height: 46px; width: auto; }
.site-footer .logo img { height: 52px; }
.logo-dark { display: none !important; }
.site-header.scrolled .logo-light,
.site-header.menu-open .logo-light { display: none; }
.site-header.scrolled .logo-dark,
.site-header.menu-open .logo-dark { display: block !important; }

.main-nav { display: flex; align-items: center; gap: 2rem; }
.main-nav a:not(.btn) {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  transition: color 0.2s;
}
.main-nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 100%; height: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.main-nav a:not(.btn):hover,
.main-nav a.active { color: #fff; }
.site-header.scrolled .main-nav a:not(.btn),
.site-header.menu-open .main-nav a:not(.btn) { color: var(--text); }
.site-header.scrolled .main-nav a:not(.btn):hover,
.site-header.scrolled .main-nav a.active { color: var(--ink); }
.main-nav a:not(.btn):hover::after,
.main-nav a.active::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  background: none; border: 0; cursor: pointer;
  flex-direction: column; justify-content: center; gap: 5px;
  padding: 10px;
}
.nav-toggle span {
  display: block; height: 2px; width: 100%;
  background: #fff; border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s, background 0.3s;
}
.site-header.scrolled .nav-toggle span,
.site-header.menu-open .nav-toggle span { background: var(--ink); }
.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); }

/* ---------- Hero (full-screen 3D robot) ---------- */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 640px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.8);
  /* shown until WebGL is ready, and as the fallback without it */
  background: radial-gradient(ellipse at 50% 38%, #3b3f68 0%, #1d2338 45%, #0e1220 100%);
}
.hero.robot-hover { cursor: pointer; }
#robot-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 1.2s ease;
}
#robot-canvas.ready { opacity: 1; }
.hero::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 66%;
  background: linear-gradient(to top, rgba(14, 18, 32, 0.96) 0%, rgba(14, 18, 32, 0.86) 38%, rgba(14, 18, 32, 0.5) 62%, transparent);
  pointer-events: none;
  z-index: 1;
}
.hero-overlay {
  position: relative;
  z-index: 2;
  text-align: center;
  padding-bottom: 84px;
  pointer-events: none; /* let the cursor reach the robot through the text */
}
.hero-overlay a { pointer-events: auto; }
.hero h1 {
  color: #fff;
  font-size: clamp(2rem, min(5.2vw, 8vh), 4rem);
  letter-spacing: -0.03em;
  max-width: 900px;
  margin: 0 auto 1rem;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.45);
}
.hero h1 .accent { color: var(--peach); }
.lead { font-size: 1.12rem; max-width: 620px; margin: 0 auto; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.9rem; margin-top: 1.8rem; }

.eyebrow-light,
.section-dark .eyebrow { background-image: linear-gradient(135deg, #b1b1e6, var(--peach)); }

.scroll-cue {
  position: absolute;
  left: 50%; bottom: 22px;
  transform: translateX(-50%);
  z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.2s;
}
.scroll-cue:hover { color: #fff; }
.scroll-cue::after {
  content: "";
  width: 1px; height: 26px;
  background: linear-gradient(to bottom, var(--peach), transparent);
  animation: cue 1.8s ease-in-out infinite;
  transform-origin: top;
}
@keyframes cue {
  0% { transform: scaleY(0); opacity: 1; }
  60% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}


/* ---------- Value strip ---------- */
.strip { background: var(--navy-800); color: rgba(255,255,255,0.75); padding: 36px 0; }
.strip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.strip-item { display: flex; gap: 16px; align-items: flex-start; }
.strip-item p { margin: 0; font-size: 0.95rem; }
.strip-num {
  font-family: var(--font-head); font-weight: 700; font-size: 1.3rem;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Sections ---------- */
.section { padding: 110px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 680px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); letter-spacing: -0.02em; }
.section-sub { font-size: 1.08rem; color: var(--muted); margin: 0; }

/* ---------- Service cards ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s;
}
.card::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--grad);
  opacity: 0; transition: opacity 0.25s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.card:hover::before { opacity: 1; }
.card h3 { font-size: 1.2rem; }
.card p { margin: 0; font-size: 0.97rem; }
.card-icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(244, 168, 150, 0.14), rgba(115, 115, 167, 0.14));
  margin-bottom: 20px;
}
.card-icon svg,
.contact-list svg {
  width: 24px; height: 24px;
  fill: none; stroke: var(--lavender);
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Approach ---------- */
.steps {
  list-style: none; padding: 0; margin: 0 0 56px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  counter-reset: step;
  position: relative;
}
.steps::before {
  content: "";
  position: absolute; top: 26px; left: 12%; right: 12%;
  height: 2px;
  background: linear-gradient(90deg, var(--peach), var(--lavender));
  opacity: 0.35;
}
.step { position: relative; text-align: center; padding: 0 8px; }
.step-num {
  position: relative;
  display: inline-grid; place-items: center;
  width: 54px; height: 54px; border-radius: 50%;
  background: #fff; border: 2px solid transparent;
  background-image: linear-gradient(#fff, #fff), var(--grad);
  background-origin: border-box; background-clip: padding-box, border-box;
  font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; color: var(--lavender);
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.step h3 { font-size: 1.2rem; }
.step p { font-size: 0.95rem; margin: 0; }

.models { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.model {
  background: #fff;
  border-radius: var(--radius);
  padding: 26px 26px 22px;
  border-left: 4px solid var(--lavender);
  box-shadow: 0 1px 2px rgba(15,23,42,0.05);
}
.model:nth-child(2) { border-left-color: #b88fa3; }
.model:nth-child(3) { border-left-color: var(--peach); }
.model h4 { font-size: 1.1rem; margin-bottom: 0.4em; }
.model p { margin: 0; font-size: 0.95rem; }

/* ---------- Tech ---------- */
.tech { padding: 90px 0; }
.tech-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
  max-width: 900px; margin-inline: auto;
}
.tech-list li {
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 500; font-size: 0.93rem; color: var(--ink);
  background: #fff;
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.tech-list li:hover { border-color: var(--lavender); color: var(--lavender); transform: translateY(-2px); }

/* ---------- Training (dark) ---------- */
.section-dark {
  background: var(--navy-900);
  color: rgba(255,255,255,0.72);
  position: relative;
  overflow: hidden;
}
.section-dark::before {
  content: "";
  position: absolute; width: 700px; height: 700px;
  right: -250px; top: -250px;
  background: radial-gradient(circle, rgba(115, 115, 167, 0.25), transparent 65%);
  pointer-events: none;
}
.section-dark .container { position: relative; }
.section-dark h2, .section-dark h3, .section-dark h4 { color: #fff; }
.section-dark .section-sub { color: rgba(255,255,255,0.65); }

.training-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.filter {
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: transparent;
  color: rgba(255,255,255,0.8);
  font: 500 0.9rem var(--font-body);
  cursor: pointer;
  transition: all 0.2s;
}
.filter:hover { border-color: rgba(255,255,255,0.4); color: #fff; }
.filter.active { background: var(--grad-strong); border-color: transparent; color: #fff; }

.courses {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 56px;
}
.course {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 28px 26px 22px;
  display: flex; flex-direction: column;
  transition: transform 0.25s, background 0.25s, border-color 0.25s, opacity 0.3s;
}
.course:hover { transform: translateY(-5px); background: rgba(255,255,255,0.07); border-color: rgba(244, 168, 150, 0.4); }
.course.hidden { display: none; }
.course .tag {
  align-self: flex-start;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--peach);
  background: rgba(244, 168, 150, 0.1);
  padding: 0.3rem 0.7rem; border-radius: 999px;
  margin-bottom: 16px;
}
.course h3 { font-size: 1.18rem; }
.course p { font-size: 0.95rem; flex: 1; }
.course-meta {
  list-style: none; padding: 16px 0 0; margin: 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  font-size: 0.84rem; color: rgba(255,255,255,0.55);
}
.course-meta li::before { content: "\25CF"; color: var(--lavender); margin-right: 6px; font-size: 0.6rem; vertical-align: middle; }

.formats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.format {
  padding: 24px 0 0;
  border-top: 2px solid rgba(255,255,255,0.1);
}
.format h4 { font-size: 1.08rem; margin-bottom: 0.4em; }
.format p { margin: 0; font-size: 0.94rem; }
.training-cta { text-align: center; margin-top: 56px; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.about-copy h2 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); letter-spacing: -0.02em; }
.about-copy p { font-size: 1.04rem; }
.values { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.value {
  padding: 26px 24px;
  border-radius: var(--radius);
  background: var(--bg-alt);
  border: 1px solid var(--line);
}
.value h4 { font-size: 1.08rem; margin-bottom: 0.4em; }
.value p { margin: 0; font-size: 0.93rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 64px; align-items: start; }
.contact-info h2 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); letter-spacing: -0.02em; }
.contact-list { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 18px; }
.contact-list li { display: flex; align-items: center; gap: 14px; color: var(--ink); font-weight: 500; }
.contact-list svg {
  flex: none;
  width: 44px; height: 44px; padding: 10px;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}
.contact-list a:hover { color: var(--lavender); }

.contact-form {
  background: #fff;
  border-radius: 20px;
  padding: 36px;
  box-shadow: var(--shadow-lg);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; margin-bottom: 18px; }
.field label { font-size: 0.86rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.field input,
.field select,
.field textarea {
  font: inherit; font-size: 0.95rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfe;
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--lavender);
  box-shadow: 0 0 0 4px rgba(115, 115, 167, 0.15);
  background: #fff;
}
.field.invalid input,
.field.invalid textarea { border-color: #ef4444; }
.form-status { margin: 14px 0 0; font-size: 0.92rem; text-align: center; min-height: 1.4em; }
.form-status.ok { color: #059669; }
.form-status.err { color: #dc2626; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: rgba(255,255,255,0.6); padding: 72px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
.footer-brand p { margin-top: 16px; max-width: 320px; font-size: 0.94rem; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h5 { color: #fff; font-size: 0.95rem; margin-bottom: 6px; }
.footer-col a { font-size: 0.92rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--peach); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px; padding-bottom: 28px;
  font-size: 0.86rem;
}
.footer-bottom p { margin: 0; }
.footer-bottom a:hover { color: #fff; }

/* ---------- 3D tilt cards ---------- */
.tilt.tilt {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.18s ease-out, box-shadow 0.25s ease, border-color 0.25s, background 0.25s, opacity 0.6s ease;
  will-change: transform;
}
.tilt::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.35), transparent 55%);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}
.section-dark .tilt::after { background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(177, 177, 230, 0.18), transparent 55%); }
.tilt:hover::after { opacity: 1; }
.tilt .card-icon,
.tilt .tag,
.tilt h3,
.tilt h4 { transform: translateZ(28px); }
.tilt .card-icon { transition: transform 0.3s; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 1024px) {
  .cards-grid, .courses { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .steps::before { display: none; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff;
    box-shadow: 0 20px 40px -14px rgba(30, 37, 56, 0.35);
    padding: 12px 24px 24px;
    transform: translateY(-120%);
    opacity: 0; visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s;
  }
  .main-nav.open { transform: none; opacity: 1; visibility: visible; }
  .main-nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .main-nav a:not(.btn)::after { display: none; }
  .main-nav .btn { margin-top: 18px; }
  .site-header.menu-open { background: #fff; }
  .strip-grid, .models, .formats { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  /* phones: robot gets the top of the screen, text sits below it instead of over it */
  .hero { height: auto; min-height: 100vh; min-height: 100svh; padding-top: 56vh; padding-top: 56svh; }
  .hero::after {
    height: 62%;
    background: linear-gradient(to top, rgba(14, 18, 32, 0.97) 0%, rgba(14, 18, 32, 0.9) 70%, transparent);
  }
  .hero-overlay { padding-bottom: 48px; }
  .scroll-cue { display: none; }
  .lead { font-size: 1rem; }
  .section { padding: 80px 0; }
  .cards-grid, .courses, .steps, .values, .field-row { grid-template-columns: 1fr; }
  .field-row { gap: 0; }
  .contact-form { padding: 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .logo img { height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
