/* Awier Labs — mobile-first stylesheet */
:root {
  --bg: #0A0B10;
  --ink: #E8EAF4;
  --ink-strong: #F4F5FB;
  --ink-soft: #B3B8CE;
  --ink-mute: #8A90A8;
  --cyan: #00E5FF;
  --cyan-l: #7DF9FF;
  --violet: #8B5CFF;
  --magenta: #FF2BD6;
  --cobalt: #1F4BFF;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  /* set by main.js */
  --y: 0;      /* scroll position in px (unitless) */
  --p: 0;      /* scroll progress 0..1 */
  --d: 2;      /* parallax depth multiplier (0 = off) */
  color-scheme: dark;
}
@media (prefers-reduced-motion: reduce) { :root { --d: 0; } }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
::selection { background: rgba(139,92,255,.45); color: #fff; }
a { color: var(--cyan-l); }
a:hover { color: #fff; }
img { max-width: 100%; }
.mono { font-family: var(--mono); }
.c-cyan { color: var(--cyan-l); }
.c-pink { color: #FF8BE6; }
:focus-visible { outline: 2px solid var(--cyan-l); outline-offset: 3px; }
[id] { scroll-margin-top: 84px; }

.page { position: relative; overflow: clip; min-height: 100vh; }

/* ---------- Ambient layers ---------- */
.ambient { position: absolute; inset: 0; pointer-events: none; opacity: 1; }
.layer { position: absolute; inset: 0; will-change: transform; }
.l-slow { transform: translate3d(0, calc(var(--y) * -0.10px * var(--d)), 0); }
.l-mid  { transform: translate3d(calc(var(--sx, 0) * 40px * var(--d)), calc(var(--y) * -0.28px * var(--d)), 0); }
.l-fast { transform: translate3d(0, calc(var(--y) * -0.50px * var(--d)), 0); }
.orb { position: absolute; border-radius: 50%; filter: blur(60px); will-change: transform; }
.d1 { animation: drift1 22s ease-in-out infinite; }
.d2 { animation: drift2 28s ease-in-out infinite; }
.d3 { animation: drift3 34s ease-in-out infinite; }
@keyframes drift1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(80px,-60px) scale(1.12); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-90px,50px) scale(.9); } }
@keyframes drift3 { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(50px,70px) scale(1.08); } 66% { transform: translate(-60px,-30px) scale(.95); } }
.grid-bg {
  position: absolute; left: 0; right: 0; top: 0; height: 2400px; pointer-events: none;
  transform: translate3d(0, calc(var(--y) * -0.30px * var(--d)), 0);
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 15%, #000 0%, transparent 65%);
          mask-image: radial-gradient(ellipse at 50% 15%, #000 0%, transparent 65%);
}

/* ---------- Glass ---------- */
.glass {
  position: relative;
  background: linear-gradient(135deg, rgba(255,255,255,.085) 0%, rgba(255,255,255,.025) 45%, rgba(255,255,255,.05) 100%);
  -webkit-backdrop-filter: blur(42px) saturate(175%);
          backdrop-filter: blur(42px) saturate(175%);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), inset 0 -1px 0 rgba(255,255,255,.05),
              -1.5px 0 0 rgba(0,229,255,.38), 1.5px 0 0 rgba(255,43,214,.38),
              0 40px 100px -30px rgba(0,0,0,.75);
}
.glass::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(170deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,0) 28%),
              radial-gradient(120% 60% at 50% -10%, rgba(125,249,255,.10), transparent 60%);
}

/* ---------- Header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  --k: clamp(0, calc(var(--y) / 160), 1);
  background: rgba(10,11,16, calc(var(--k) * .62));
  border-bottom: 1px solid rgba(255,255,255, calc(var(--k) * .08));
  -webkit-backdrop-filter: blur(24px) saturate(170%);
          backdrop-filter: blur(24px) saturate(170%);
}
.header {
  max-width: 1280px; margin: 0 auto;
  padding: calc(18px - var(--k) * 6px) 16px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.brand { display: flex; align-items: center; min-height: 44px; }
.brand img { height: 28px; width: auto; display: block; filter: drop-shadow(0 0 14px rgba(125,249,255,.25)); }
.nav-desktop { display: none; gap: 28px; font-family: var(--mono); font-size: 13px; letter-spacing: .08em; }
.navlink { color: #B9BED3; text-decoration: none; transition: color .3s; }
.navlink:hover { color: #fff; }
.nav-desktop .navlink { padding: 12px 0; }
.menu-btn {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 14px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05);
  color: var(--ink); cursor: pointer; padding: 0;
}
.menu-btn .i-close { display: none; }
.menu-btn[aria-expanded="true"] .i-open { display: none; }
.menu-btn[aria-expanded="true"] .i-close { display: block; }
.nav-mobile { margin: 0 14px 10px; border-radius: 22px; padding: 6px 18px 14px; background: rgba(14,15,24,.88); animation: fadein .3s ease-out; }
.nav-mobile[hidden] { display: none; }
.mlink { display: flex; justify-content: space-between; align-items: center; min-height: 56px; border-bottom: 1px solid rgba(255,255,255,.08); color: var(--ink-strong); text-decoration: none; font-size: 22px; font-weight: 500; }
.mlink:last-child { border-bottom: 0; }
.mlink .mono { font-size: 12px; }
@keyframes fadein { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.progress {
  position: absolute; left: 0; bottom: -1px; height: 2px; width: calc(var(--p) * 100%);
  background: linear-gradient(90deg, var(--cyan), var(--violet), var(--magenta));
  box-shadow: 0 0 12px rgba(0,229,255,.7);
}

/* ---------- Hero ---------- */
.hero { position: relative; z-index: 1; max-width: 1280px; margin: 0 auto; padding: 36px 16px 72px; display: flex; justify-content: center; }
.hero-orb {
  position: absolute; left: 50%; top: 50%; width: 320px; height: 320px; margin: -160px 0 0 -160px; pointer-events: none;
  transform: translate3d(0, calc(var(--y) * 0.6px * var(--d)), 0) scale(calc(1 + min(var(--y), 800) * 0.001 * var(--d)));
}
.hero-orb > div {
  width: 100%; height: 100%; border-radius: 50%; filter: blur(24px); opacity: 1;
  background: radial-gradient(circle at 40% 35%, rgba(255,255,255,.55) 0%, rgba(125,249,255,.55) 12%, rgba(139,92,255,.5) 40%, rgba(255,43,214,.25) 62%, transparent 72%);
}
.hero-frame {
  width: 100%; max-width: 1040px; will-change: transform, opacity;
  transform: translate3d(0, calc(var(--y) * 0.38px * var(--d)), 0) scale(calc(1 - min(var(--y), 900) * 0.0002 * var(--d)));
  opacity: clamp(0, calc(1 - var(--y) * var(--d) / 820), 1);
}
.hero-card { border-radius: 32px; padding: 40px 22px 28px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14); background: rgba(10,11,16,.45);
  font-size: 10.5px; letter-spacing: .14em; color: #BFC5DC; line-height: 1.5; text-align: center; max-width: 100%;
}
.pill-long { display: none; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); flex: none; }
.headline {
  margin: 0; max-width: 900px; font-size: clamp(40px, 6.6vw, 96px); line-height: 1; font-weight: 600; letter-spacing: -.035em;
  background: linear-gradient(100deg, #7DF9FF 0%, #00C2FF 22%, #8B5CFF 50%, #FF3CD0 78%, #7DF9FF 100%);
  background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 14s linear infinite;
}
@keyframes shimmer { 0% { background-position: 0% 50%; } 100% { background-position: 220% 50%; } }
.lede { margin: 0; max-width: 620px; font-size: 16px; line-height: 1.6; color: #B7BCD2; }
.tags { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; font-size: 11px; letter-spacing: .1em; color: #C9CEE2; }
.tag { padding: 10px 8px; border-radius: 10px; }
.t1 { background: rgba(0,229,255,.08); border: 1px solid rgba(0,229,255,.25); }
.t2 { background: rgba(31,75,255,.10); border: 1px solid rgba(80,120,255,.3); }
.t3 { background: rgba(139,92,255,.10); border: 1px solid rgba(139,92,255,.32); }
.t4 { background: rgba(255,43,214,.08); border: 1px solid rgba(255,43,214,.28); }
.scroll-cue { margin-top: 8px; display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 11px; letter-spacing: .24em; min-height: 44px; }
.scroll-cue span { width: 1px; height: 40px; background: linear-gradient(var(--cyan-l), transparent); }

/* ---------- Sections ---------- */
.section { position: relative; z-index: 1; max-width: 1280px; margin: 0 auto; padding: 24px 16px 56px; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 24px; margin-bottom: 28px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.eyebrow { font-size: 12px; letter-spacing: .16em; }
.h2 { margin: 0; font-size: clamp(34px, 4.4vw, 60px); line-height: 1.04; font-weight: 600; letter-spacing: -.03em; color: var(--ink-strong); }
.muted { color: #8E94AE; font-weight: 400; }
.section-copy { margin: 0; max-width: 420px; font-size: 15px; line-height: 1.6; color: #A9AFC6; }

/* reveal: --t (0..1) is set per element by main.js */
.reveal-head {
  --t: 1;
  transform: translate3d(calc((1 - var(--t)) * -60px * var(--d)), 0, 0);
  opacity: calc(1 - (1 - var(--t)) * .75 * var(--d));
  will-change: transform, opacity;
}
.reveal-contact {
  --t: 1;
  transform: translate3d(0, calc((1 - var(--t)) * 80px * var(--d)), 0);
  opacity: calc(1 - (1 - var(--t)) * .6 * var(--d));
}

/* ---------- Pillars ---------- */
.pillars { display: flex; flex-direction: column; gap: 18px; }
.pwrap { display: grid; position: sticky; }
/* mobile: stacked sticky cards */
.pwrap:nth-child(1) { top: 92px; }
.pwrap:nth-child(2) { top: 106px; }
.pwrap:nth-child(3) { top: 120px; }
.pwrap:nth-child(4) { top: 134px; }
.pillar {
  border-radius: 28px; padding: 26px 22px; display: flex; flex-direction: column; gap: 16px; min-height: 300px; overflow: hidden;
  background: linear-gradient(140deg, rgba(26,28,44,.92), rgba(14,15,24,.88));
  transition: transform .5s cubic-bezier(.2,.8,.2,1), border-color .5s;
}
.pillar::before {
  content: ""; position: absolute; inset: -35%; pointer-events: none;
  background: radial-gradient(circle at 28% 22%, var(--g1), transparent 48%), radial-gradient(circle at 78% 85%, var(--g2), transparent 46%);
  opacity: .3; filter: blur(36px); transition: opacity .6s, transform .9s;
}
.pillar > * { position: relative; z-index: 1; }
.pillar:hover, .pillar:focus-within { border-color: rgba(255,255,255,.26); }
.pillar:hover::before { opacity: .7; transform: scale(1.08) rotate(6deg); }
.p-top { display: flex; justify-content: space-between; align-items: center; }
.picon {
  width: 52px; height: 52px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,.16); background: var(--ib); color: var(--ic);
  box-shadow: 0 0 24px color-mix(in srgb, var(--g1) 40%, transparent); transition: box-shadow .5s, border-color .5s;
}
.pillar:hover .picon { box-shadow: 0 0 34px var(--g1); border-color: rgba(255,255,255,.4); }
.p-idx { font-size: 12px; letter-spacing: .16em; color: var(--ink-mute); }
.pillar h3 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -.02em; color: var(--ink-strong); }
.pillar p { margin: 0; font-size: 15px; line-height: 1.6; color: #B9BED3; }
.chips { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px; font-size: 11px; color: #D3D7E8; }
.chips span { padding: 6px 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,.12); background: rgba(10,11,16,.4); }

/* ---------- Contact ---------- */
.contact { border-radius: 30px; padding: 28px 20px; display: flex; flex-wrap: wrap; gap: 32px 56px; }
.contact-info { position: relative; z-index: 1; flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.details { margin: 0; display: grid; grid-template-columns: max-content 1fr; column-gap: 20px; row-gap: 14px; font-size: 15px; }
.details dt { font-size: 11px; letter-spacing: .14em; color: var(--ink-mute); padding-top: 3px; }
.details dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.socials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.social {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04); color: #DDE1F0; text-decoration: none; font-size: 13px;
  transition: border-color .3s, box-shadow .3s, color .3s;
}
.social:hover { color: #fff; border-color: rgba(125,249,255,.6); box-shadow: 0 0 24px rgba(0,229,255,.25); }
.terminal {
  position: relative; z-index: 1; flex: 1.3 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 18px;
  padding: 18px; border-radius: 22px; background: rgba(5,6,12,.4); border: 1px solid rgba(255,255,255,.08);
}
.term-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 11px; letter-spacing: .08em; color: var(--ink-mute); }
.status { display: inline-flex; align-items: center; gap: 8px; color: var(--cyan-l); }
.fieldset { display: flex; flex-direction: column; gap: 8px; }
.fieldset label { font-size: 11px; letter-spacing: .14em; color: #AEB4CB; }
.field {
  width: 100%; min-height: 48px; background: rgba(5,6,12,.55); border: 1px solid rgba(255,255,255,.12); border-radius: 14px;
  padding: 14px 15px; color: #EEF0FA; font: 400 16px/1.5 var(--mono); outline: none; transition: border-color .3s, box-shadow .3s;
}
textarea.field { resize: vertical; min-height: 130px; }
.field::placeholder { color: var(--ink-mute); }
.field:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0,229,255,.18), 0 0 28px rgba(0,229,255,.22); }
.field[aria-invalid="true"] { border-color: #FF6B9A; }
.term-foot { display: flex; flex-direction: column-reverse; gap: 12px; align-items: stretch; text-align: center; }
.muted-s { font-size: 12px; color: var(--ink-mute); }
.blink { color: var(--cyan-l); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.send {
  min-height: 54px; padding: 0 28px; border: 0; border-radius: 16px; cursor: pointer;
  background: linear-gradient(95deg, #00E5FF 0%, #7B5CFF 52%, #FF2BD6 100%); color: var(--bg);
  font-size: 14px; font-weight: 500; letter-spacing: .08em; transition: box-shadow .4s, transform .4s;
}
.send:hover { box-shadow: 0 0 40px rgba(139,92,255,.6); transform: translateY(-2px); }

/* ---------- Footer ---------- */
.footer { position: relative; z-index: 1; max-width: 1280px; margin: 0 auto; padding: 40px 16px 56px; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.mark-wrap { position: relative; width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; }
.mark-wrap img { width: 40px; height: 40px; display: block; }
.ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(125,249,255,.6); animation: ring 3.6s ease-out infinite; }
@keyframes ring { 0% { transform: scale(.8); opacity: .7; } 100% { transform: scale(1.9); opacity: 0; } }
.pulse { animation: pulse 3.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { transform: translateY(0) scale(1); filter: drop-shadow(0 0 10px rgba(0,229,255,.45)); } 50% { transform: translateY(-7px) scale(1.06); filter: drop-shadow(0 0 26px rgba(255,43,214,.7)); } }
.foot-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; font-size: 11px; letter-spacing: .12em; color: var(--ink-mute); text-align: center; }

/* =========================================================
   Tablet & desktop enhancements
   ========================================================= */
@media (min-width: 760px) {
  .header { padding: calc(28px - var(--k) * 12px) 24px; }
  .brand img { height: 38px; }
  .nav-desktop { display: flex; }
  .menu-btn, .nav-mobile { display: none !important; }
  .hero { padding: 72px 24px 120px; }
  .hero-orb { width: 520px; height: 520px; margin: -260px 0 0 -260px; }
  .hero-card { border-radius: 40px; padding: 88px 56px 72px; gap: 32px; }
  .pill { font-size: 12px; letter-spacing: .16em; padding: 9px 16px; }
  .pill-long { display: inline; }
  .lede { font-size: 19px; }
  .tags { display: flex; flex-wrap: wrap; justify-content: center; width: auto; font-size: 12px; letter-spacing: .12em; }
  .tag { padding: 8px 14px; }
  .section { padding: 40px 24px 120px; }
  .section-head { margin-bottom: 56px; }
  .section-copy { font-size: 16px; }
  .pillars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  /* desktop: columns drift in opposite directions; --c is set by main.js */
  .pwrap { position: relative; top: auto !important; --c: 0; will-change: transform; }
  .col-a { transform: translate3d(0, calc(var(--c) * -60px * var(--d)), 0); }
  .col-b { transform: translate3d(0, calc(var(--c) * 60px * var(--d)), 0); }
  .pillar { border-radius: 32px; padding: 40px; gap: 22px; min-height: 360px; background: linear-gradient(135deg, rgba(255,255,255,.085) 0%, rgba(255,255,255,.025) 45%, rgba(255,255,255,.05) 100%); }
  .pillar::before { opacity: .16; }
  .pillar:hover { transform: translateY(-6px); }
  .picon { width: 56px; height: 56px; border-radius: 18px; box-shadow: none; }
  .pillar h3 { font-size: 30px; }
  .pillar p { font-size: 16px; }
  .chips { font-size: 12px; gap: 8px; }
  .chips span { padding: 7px 12px; }
  .contact { border-radius: 40px; padding: clamp(28px, 5vw, 64px); }
  .terminal { padding: 32px; border-radius: 28px; gap: 20px; }
  .term-head { font-size: 12px; }
  .term-foot { flex-direction: row; justify-content: space-between; align-items: center; text-align: left; }
  .send { border-radius: 999px; }
  .foot-meta { font-size: 12px; }
}
@media (min-width: 1100px) {
  .pillars { gap: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
