/* ============================================================
   Aetheron Innovations — dark cinematic
   Tokens: #06070B page · #0D0F16 panel · #F5F5F7 text ·
           #9BA0A8 secondary · #3A6FF2 blue · chrome gradient
   ============================================================ */

@font-face {
  font-family: "Inter";
  src: url("../fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #06070B;
  --panel: #0D0F16;
  --text: #F5F5F7;
  --text-2: #9BA0A8;
  --blue: #3A6FF2;
  --hairline: rgba(255, 255, 255, 0.09);
  --chrome: linear-gradient(120deg, #F4F5F8 0%, #C7CAD3 28%, #828692 50%, #E8E9EE 72%, #9BA0AC 100%);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

html, body { overflow-x: clip; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

::selection { background: rgba(58, 111, 242, 0.35); }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--blue); color: #fff;
  padding: 0.6rem 1rem; z-index: 100; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

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

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: rgba(6, 7, 11, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s ease;
}
.nav.is-scrolled { border-bottom-color: var(--hairline); }

.nav-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 24px;
  height: 52px;
  display: flex; align-items: center; justify-content: space-between;
}

.nav-brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
  font-size: 0.9375rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase;
}
.nav-brand img { width: 26px; height: auto; }

.nav-links {
  display: flex; gap: 28px; list-style: none;
}
.nav-links a {
  color: var(--text-2); text-decoration: none;
  font-size: 0.875rem; font-weight: 450;
  transition: color 0.25s ease;
}
.nav-links a:hover { color: var(--text); }

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

.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  width: 900px; height: 900px;
  top: 50%; left: 50%;
  transform: translate(-50%, -58%);
  background: radial-gradient(circle,
    rgba(58, 111, 242, 0.16) 0%,
    rgba(58, 111, 242, 0.05) 38%,
    transparent 68%);
  pointer-events: none;
}

.hero-mark {
  width: clamp(120px, 16vw, 164px);
  position: relative;
  filter: drop-shadow(0 18px 50px rgba(58, 111, 242, 0.25));
  animation: mark-in 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-title {
  margin-top: 44px;
  font-size: clamp(2.5rem, 6.4vw, 4.5rem);
  font-weight: 640;
  letter-spacing: -0.022em;
  line-height: 1.08;
  position: relative;
  background: var(--chrome);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: title-in 1.1s 0.15s cubic-bezier(0.22, 1, 0.36, 1) both,
             sweep 2.6s 0.9s ease-in-out 1 both;
}

.hero-sub {
  margin-top: 26px;
  max-width: 34em;
  font-size: clamp(1.0625rem, 1.8vw, 1.3125rem);
  color: var(--text-2);
  position: relative;
  animation: title-in 1.1s 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes mark-in {
  from { opacity: 0; transform: scale(0.92) translateY(14px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes title-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes sweep {
  from { background-position: 120% center; }
  to   { background-position: 0% center; }
}

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

.section {
  padding: 140px 24px;
  max-width: 1080px;
  margin: 0 auto;
}

.section--narrow { max-width: 760px; }

/* ---------- Bento (Engineering) ---------- */

.bento {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.tile {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 24px;
  padding: 34px 30px 36px;
  transition: border-color 0.35s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.tile:hover {
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-3px);
}
.tile svg { color: var(--text-2); display: block; margin-bottom: 22px; }
.tile h3 {
  font-size: 1.1875rem;
  font-weight: 620;
  letter-spacing: -0.01em;
}
.tile p {
  margin-top: 10px;
  color: var(--text-2);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.tile--wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
  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: 26px 26px;
}

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chips li {
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.8438rem;
  color: var(--text-2);
  background: rgba(6, 7, 11, 0.55);
  white-space: nowrap;
}

.section-head { margin-bottom: 24px; }

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--blue);
  margin-bottom: 14px;
}

h2 {
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  font-weight: 620;
  letter-spacing: -0.018em;
  line-height: 1.12;
  max-width: 18em;
}

.section-intro {
  margin-top: 18px;
  color: var(--text-2);
  max-width: 38em;
  font-size: 1.125rem;
}

/* ---------- Products ---------- */

.product {
  display: grid;
  grid-template-columns: 5fr 6fr;
  align-items: center;
  gap: clamp(32px, 6vw, 88px);
  padding: 88px 0;
}
.product + .product { border-top: 1px solid var(--hairline); }
.product:nth-of-type(even) .product-media { order: 2; }

.product-media {
  display: flex; align-items: center; justify-content: center;
  position: relative;
  min-height: 240px;
}
.product-media::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 130%; height: 130%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(58, 111, 242, 0.09) 0%, transparent 62%);
  pointer-events: none;
}
.product-media img {
  width: clamp(180px, 22vw, 300px);
  position: relative;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.product-media--wide img { width: clamp(240px, 30vw, 400px); }
.product:hover .product-media img { transform: translateY(-6px); }

.squircle { border-radius: 23%; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55); }

.wordmark {
  position: relative;
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  font-weight: 640;
  letter-spacing: -0.02em;
  background: var(--chrome);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.product-copy h3 {
  font-size: 1.75rem;
  font-weight: 620;
  letter-spacing: -0.015em;
  margin: 14px 0 12px;
}
.product-copy p:last-child { color: var(--text-2); max-width: 32em; }

.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 550;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-2);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 5px 12px;
}
.tag--accent { color: #7DA2FF; border-color: rgba(58, 111, 242, 0.45); }

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

.about-copy p { color: var(--text-2); font-size: 1.1875rem; max-width: 36em; }
.about-copy p + p { margin-top: 1.2em; }

.pillars {
  margin-top: 72px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(32px, 5vw, 64px);
}
.pillars h3 {
  font-size: 1.0625rem;
  font-weight: 620;
  letter-spacing: -0.01em;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
}
.pillars p {
  margin-top: 12px;
  color: var(--text-2);
  font-size: 0.9375rem;
  line-height: 1.7;
}

@media (max-width: 760px) {
  .pillars { grid-template-columns: 1fr; gap: 36px; margin-top: 48px; }
}

.contact { text-align: left; padding-bottom: 160px; }

.contact-panel {
  position: relative;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 28px;
  padding: clamp(36px, 5.5vw, 64px);
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(36px, 6vw, 88px);
  align-items: start;
}
.contact-panel::before {
  content: "";
  position: absolute;
  top: -40%; right: -20%;
  width: 70%; height: 120%;
  background: radial-gradient(circle, rgba(58, 111, 242, 0.07) 0%, transparent 65%);
  pointer-events: none;
}
.contact-info, .contact-form { position: relative; }

.contact-info .section-intro { font-size: 1.0625rem; }

.btn {
  display: inline-block;
  background: var(--text);
  color: #0B0C10;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 1.0625rem;
  padding: 14px 34px;
  border-radius: 999px;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 34px rgba(245, 245, 247, 0.18);
}

.contact-form { display: grid; gap: 20px; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-row { display: grid; gap: 9px; }
.form-row label {
  font-size: 0.8125rem;
  font-weight: 550;
  letter-spacing: 0.02em;
  color: var(--text-2);
}
.form-row input,
.form-row textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  color: var(--text);
  font: inherit;
  padding: 14px 16px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}
.form-row input::placeholder,
.form-row textarea::placeholder { color: rgba(155, 160, 168, 0.45); }
.form-row input:hover,
.form-row textarea:hover { border-color: rgba(255, 255, 255, 0.16); }
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(58, 111, 242, 0.22);
}
.form-row textarea { resize: vertical; min-height: 140px; }

.form-foot {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.form-note {
  min-height: 1.4em;
  margin: 0;
  color: var(--text-2);
  font-size: 0.9375rem;
}
.form-note.is-error { color: #FF9B9B; }


/* ---------- Floating contact widget ---------- */

.fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 95;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(13, 15, 22, 0.55);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s ease;
}
.fab:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.26); }

.fab-social {
  position: fixed;
  right: 92px;
  bottom: 24px;
  z-index: 95;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(13, 15, 22, 0.55);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s ease;
}
.fab-social:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.26); }
.fab-social img { display: block; }

.fab-ic { grid-area: 1 / 1; transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
.fab-ic-close { opacity: 0; transform: rotate(-45deg); }
.fab.is-open .fab-ic-chat { opacity: 0; transform: rotate(45deg); }
.fab.is-open .fab-ic-close { opacity: 1; transform: none; }

.fab-panel {
  position: fixed;
  right: 24px;
  bottom: 94px;
  z-index: 95;
  width: min(380px, calc(100vw - 32px));
  height: min(560px, 72vh);
  display: flex;
  flex-direction: column;
  background: rgba(13, 15, 22, 0.55);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  backdrop-filter: blur(28px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: hidden;
  transform-origin: bottom right;
  animation: fab-in 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.fab-panel[hidden] { display: none; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .fab-panel, .fab { background: rgba(13, 15, 22, 0.97); }
}
@keyframes fab-in {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

.fab-head {
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
}
.fab-avatar {
  width: 46px;
  height: 46px;
  margin-bottom: 6px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 30%, rgba(58, 111, 242, 0.28), rgba(58, 111, 242, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.fab-title { font-size: 1rem; font-weight: 620; }
.fab-sub { color: var(--text-2); font-size: 0.8125rem; }

/* Chat log */
.chat-log {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 16px 10px;
  overscroll-behavior: contain;
}
.msg {
  max-width: 82%;
  padding: 10px 14px;
  font-size: 0.9375rem;
  line-height: 1.5;
  border-radius: 18px;
  animation: msg-in 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  word-wrap: break-word;
}
@keyframes msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
.msg--in {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-bottom-left-radius: 6px;
}
.msg--out {
  align-self: flex-end;
  background: linear-gradient(180deg, #3F74F5, #2E57D8);
  color: #fff;
  border-bottom-right-radius: 6px;
}
.msg--typing {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  padding: 13px 16px;
}
.msg--typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-2);
  animation: typing 1.1s infinite;
}
.msg--typing i:nth-child(2) { animation-delay: 0.18s; }
.msg--typing i:nth-child(3) { animation-delay: 0.36s; }
@keyframes typing {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

/* Composer */
.chat-composer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: var(--text);
  font: inherit;
  font-size: 0.9375rem;
  padding: 11px 18px;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}
.chat-input::placeholder { color: rgba(155, 160, 168, 0.55); }
.chat-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(58, 111, 242, 0.65);
}
.chat-send {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(180deg, #3F74F5, #2E57D8);
  box-shadow: 0 4px 14px rgba(58, 111, 242, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
}
.chat-send:hover { transform: translateY(-1px) scale(1.05); }
.chat-send:disabled { opacity: 0.45; cursor: default; transform: none; }

@media (max-width: 760px) {
  .fab { right: 16px; bottom: 16px; }
  .fab-social { right: 82px; bottom: 16px; }
  .fab-panel { right: 16px; bottom: 84px; }
}

@media (prefers-reduced-motion: reduce) {
  .fab, .fab-ic, .chat-send { transition: none; }
  .fab-panel, .msg { animation: none; }
  .msg--typing i { animation: none; }
}

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

.footer {
  border-top: 1px solid var(--hairline);
  padding: 36px 24px;
  text-align: center;
  color: var(--text-2);
  font-size: 0.875rem;
}

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Mobile ---------- */

@media (max-width: 760px) {
  .section { padding: 96px 24px; }

  .product {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 64px 0;
    text-align: center;
  }
  .product:nth-of-type(even) .product-media { order: 0; }
  .product-media { min-height: 0; }
  .product-copy p:last-child { margin: 0 auto; }

  .bento { grid-template-columns: 1fr; gap: 14px; margin-top: 44px; }
  .tile { padding: 28px 24px 30px; }
  .tile--wide { grid-template-columns: 1fr; gap: 26px; }

  .contact-panel { grid-template-columns: 1fr; gap: 40px; border-radius: 22px; }
  .form-grid { grid-template-columns: 1fr; }
  .social-link { margin-top: 32px; }

  .nav-links { gap: 18px; }
  .nav-brand span { display: none; }

}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-mark, .hero-title, .hero-sub { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .product-media img, .btn { transition: none; }
}
