/* ============================================
   TORRUS — micro-photonic company site
   ============================================ */

:root {
  --bg: #060a12;
  --bg-soft: #0a101c;
  --bg-card: #0d1524;
  --ink: #e9eef6;
  --muted: #93a1b5;
  --blue: #3b7de0;
  --blue-deep: #15538e;
  --gold: #d8a94f;
  --line: rgba(255, 255, 255, 0.08);
  --radius: 20px;
  --font-display: "Space Grotesk", "Inter", -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Use a pre‑white logo (or SVG). Remove heavy filter for better performance.
   Keep slight opacity to blend with dark background. */
.nav__logo img,
.footer__logo img {
  opacity: 0.95;
}

img { max-width: 100%; display: block; }

.container {
  width: min(1160px, 100% - 3rem);
  margin-inline: auto;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--gold);
  margin-bottom: 1rem;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-deep) 100%);
  color: #fff;
  box-shadow: 0 8px 30px rgba(59, 125, 224, 0.35);
}
.btn--primary:hover { box-shadow: 0 12px 40px rgba(59, 125, 224, 0.5); transform: translateY(-2px); }

.btn--ghost {
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn--ghost:hover { border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.04); }

.btn--small { padding: 0.5rem 1.1rem; font-size: 0.85rem; background: rgba(255,255,255,0.06); border: 1px solid var(--line); color: var(--ink); }
.btn--small:hover { background: rgba(255,255,255,0.1); }

.btn--large { padding: 1.05rem 2.2rem; font-size: 1.05rem; }

/* ---------- nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 1rem 0;
  transition: background 0.3s ease, border-color 0.3s ease, padding 0.3s ease;
  border-bottom: 1px solid transparent;
}
.nav--scrolled {
  background: rgba(6, 10, 18, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  padding: 0.7rem 0;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.nav__logo { display: inline-block; }
.nav__logo img { height: 30px; width: auto; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav__links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s ease;
}
.nav__links a:hover,
.nav__links a.active { color: var(--ink); }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.nav__toggle span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.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 ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 9rem 0 5rem;
  overflow: hidden;
  background:
    radial-gradient(60% 50% at 75% 20%, rgba(59, 125, 224, 0.16) 0%, transparent 70%),
    radial-gradient(45% 40% at 15% 85%, rgba(216, 169, 79, 0.08) 0%, transparent 70%),
    var(--bg);
}

.hero::before {
  /* faint dot grid */
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(70% 60% at 50% 40%, black, transparent);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 40%, black, transparent);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.6rem, 5.6vw, 4.4rem);
  font-weight: 700;
}

.hero__tagline {
  margin-top: 0.9rem;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
  color: var(--gold);
  font-weight: 500;
}

.hero__cta {
  margin-top: 2.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.hero__media { position: relative; aspect-ratio: 4 / 3; }
.hero__media img {
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.035);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 55%;
}
.hero__glow {
  position: absolute;
  inset: 12% 8% -6% 8%;
  background: radial-gradient(50% 50% at 50% 55%, rgba(59, 125, 224, 0.28), transparent 70%);
  z-index: -1;
  filter: blur(30px);
}

/* ---------- sections ---------- */
.section { padding: 6.5rem 0; }
.section--alt {
  background: linear-gradient(
    180deg,
    var(--bg) 0%,
    var(--bg-soft) 20%,
    var(--bg-soft) 80%,
    var(--bg) 100%
  );
}

.section__head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 3.5rem;
}
.section__head h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
.section__lead {
  color: var(--muted);
  font-size: 1.02rem;
  margin-top: 1.2rem;
}

/* ---------- about ---------- */
.about__media { display: grid; grid-template-columns: 1fr; gap: 1.5rem; align-items: start; }
/* Uniform styling for images inside the about section */
.about__media img {
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.about__inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 4rem;
  align-items: center;
}

.frame {
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.035);
  overflow: hidden;
  position: relative;
  aspect-ratio: 4 / 3;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}
.frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 150px rgba(6, 10, 18, 0.3);
  pointer-events: none;
}

.about__text h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  margin-bottom: 1.4rem;
}
.lead {
  color: var(--muted);
  font-size: 1.06rem;
  max-width: 56ch;
}
.lead + .lead { margin-top: 1.1rem; }

.stats {
  margin-top: 2.6rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.stat {
  background: var(--bg);
  padding: 1.3rem 1rem;
  text-align: center;
}
.stat__num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1.2;
}
.stat__label {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---------- tech cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.2rem 1.9rem;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(59, 125, 224, 0.45);
  box-shadow: 0 20px 50px rgba(59, 125, 224, 0.12);
}

.card__icon {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 1.4rem;
  color: var(--blue);
  background: linear-gradient(135deg, rgba(59, 125, 224, 0.16), rgba(21, 83, 142, 0.06));
  border: 1px solid rgba(59, 125, 224, 0.3);
}
.card__icon svg { width: 32px; height: 32px; }

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.7rem;
}
.card p {
  color: var(--muted);
  font-size: 0.96rem;
}

/* CAS is the licensed product — give it the dominant cell */
.card--feature { grid-column: span 2; }
.card--wide {
  grid-column: span 3;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  column-gap: 1.6rem;
  align-items: start;
}
.card--wide .card__icon { margin-bottom: 0; }
.card--wide .card__body p { max-width: 80ch; }

.card .card__status {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.1rem;
}

.card__list {
  list-style: none;
  margin-top: 1.35rem;
  display: grid;
  gap: 0.7rem;
}
.card__list li {
  position: relative;
  padding-left: 1.4rem;
  color: var(--muted);
  font-size: 0.94rem;
}
.card__list li::before {
  content: "";
  position: absolute;
  left: 0.3rem;
  top: 0.6em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
}

/* ---------- application chips ---------- */
.chips-group + .chips-group { margin-top: 2.8rem; }
.chips-group__title {
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.3rem;
}
.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.98rem;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.chip:hover {
  border-color: rgba(216, 169, 79, 0.5);
  background: rgba(216, 169, 79, 0.07);
  transform: translateY(-3px);
}
.chip__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(216, 169, 79, 0.8);
}

/* ---------- CTA ---------- */
.cta__inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  background:
    radial-gradient(50% 80% at 50% 0%, rgba(59, 125, 224, 0.14), transparent 70%),
    var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  padding: 4.5rem 2rem;
}
.cta__inner h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); max-width: 22ch; }
.cta__inner p { color: var(--muted); max-width: 52ch; }
.cta__inner .btn { margin-top: 0.8rem; }

/* ---------- footer ---------- */
.footer {
  border-top: none;
  padding: 3.5rem 0 2.5rem;
}
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  text-align: center;
}
.footer__logo img { height: 28px; width: auto; }
.footer__tagline { color: var(--muted); font-size: 0.92rem; }
.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.6rem;
}
.footer__links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s ease;
}
.footer__links a:hover { color: var(--ink); }
.footer__copy {
  color: rgba(147, 161, 181, 0.55);
  font-size: 0.8rem;
  margin-top: 0.6rem;
}

/* ---------- reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .4s ease, transform .4s ease;
  transition-delay: calc(var(--d, 0) * 110ms);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero__media { order: -1; max-width: 480px; margin-inline: auto; width: 100%; }
  .about__inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .cards { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
  .card--feature, .card--wide { grid-column: auto; }
  .card--wide { grid-template-columns: 1fr; }
  .card--wide .card__icon { margin-bottom: 1.4rem; }
  .stats { grid-template-columns: repeat(2, 1fr); }

  .nav__toggle { display: flex; }
  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(6, 10, 18, 0.96);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 1.5rem 1rem;
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 0.85rem 0; width: 100%; font-size: 1rem; }
}

@media (max-width: 480px) {
  .section { padding: 4.5rem 0; }
  .hero { padding-top: 6.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card, .chip { transition: none; }
}
