/* ==========================================================================
   Kausol — landing page styles
   Layout: fonts → tokens → base → hero → constellation map → CTA →
   horizon (planet) → contact → footer → responsive → reduced motion.
   Motion policy: continuous animations only touch compositor-friendly
   properties (transform, opacity); hover effects are gated behind
   (hover: hover) so they never stick on touch screens; everything stops
   under prefers-reduced-motion.
   ========================================================================== */

/* ---------- self-hosted fonts (variable weight, woff2) ---------- */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/space-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/space-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('/fonts/sora-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('/fonts/sora-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- tokens ---------- */
:root {
  --gold: #f2c66a;
  --gold-bright: #ffdf9e;
  --ink: #e8ecf7;
  --muted: #aeb6d0;
  --bg: #05060d;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Sora', sans-serif;
  --maxw: 1120px;
  --gutter: clamp(20px, 5vw, 64px);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* Viewport-pinned gradient. Lives on a fixed pseudo-element instead of
   `background-attachment: fixed`, which repaints on every scroll frame on
   iOS/Android. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 120%, #141833 0%, #080b18 55%, #04050c 100%);
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-bright); }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

input::placeholder,
textarea::placeholder { color: #6f7690; }

::selection { background: rgba(150, 128, 255, 0.4); color: #fff2d6; }

/* Accessible name list for the constellation on desktop, visible chips on
   mobile (see the responsive section). */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- keyframes ---------- */
@keyframes drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33%      { transform: translate(-9px, 6px) rotate(-0.6deg); }
  66%      { transform: translate(8px, -5px) rotate(0.5deg); }
}
/* Band layers are one tile wider than the planet and slide by exactly one
   tile, so the loop is seamless. transform-only: stays on the compositor,
   unlike animating background-position (repaints every frame). */
@keyframes slide-band  { to { transform: translateX(-300px); } }
@keyframes slide-band2 { to { transform: translateX(-150px); } }
/* Entrance: elements rise into place once on load (fill-mode backwards keeps
   them hidden during their stagger delay). */
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- starfield ---------- */
#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
  pointer-events: none;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left))
                  max(var(--gutter), env(safe-area-inset-right));
}

/* ---------- hero ---------- */
.hero {
  text-align: center;
  padding: clamp(48px, 9vw, 96px) 0 0;
}
.eyebrow {
  font-family: var(--font-display);
  font-size: clamp(11px, 2.6vw, 13px);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
}
.hero h1 {
  margin: 18px 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(54px, 13vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: #f4f6ff;
}
.hero-lede {
  max-width: 600px;
  margin: 22px auto 0;
  font-weight: 300;
  font-size: clamp(16px, 2.4vw, 19px);
  line-height: 1.65;
  color: var(--muted);
}
.hero .eyebrow { animation: rise 0.55s ease-out 0s backwards; }
.hero h1       { animation: rise 0.6s ease-out 0.08s backwards; }
.hero-lede     { animation: rise 0.6s ease-out 0.16s backwards; }
.map-wrap      { animation: rise 0.7s ease-out 0.26s backwards; }

/* ---------- constellation map ---------- */
.map-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.map {
  position: relative;
  width: min(600px, 92vw);
  aspect-ratio: 1 / 1;
  margin: clamp(8px, 2vw, 20px) auto 0;
}
.map-drift {
  position: absolute;
  inset: 0;
  animation: drift 18s ease-in-out infinite;
  will-change: transform;
}
.map-drift svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.node {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  z-index: 3;
}
.node .dot {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: radial-gradient(circle at 40% 38%, #fff6df, var(--gold) 68%);
  border: 1px solid rgba(255, 225, 160, 0.6);
  box-shadow: 0 0 12px 2px rgba(242, 198, 106, 0.3);
  transition: transform 0.28s ease, opacity 0.28s ease,
              border-color 0.28s ease, box-shadow 0.28s ease;
}
.node .label {
  position: absolute;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.06em;
  pointer-events: none;
  padding: 5px 11px;
  border-radius: 9px;
  color: #c8cee8;
  background: transparent;
  border: 1px solid transparent;
  transition: color 0.28s ease, background-color 0.28s ease,
              border-color 0.28s ease, box-shadow 0.28s ease;
}
.node.left .label   { right: 18px; top: 0; transform: translateY(-50%); text-align: right; }
.node.right .label  { left: 18px; top: 0; transform: translateY(-50%); }
.node.top .label    { left: 0; bottom: 18px; transform: translateX(-50%); }
.node.bottom .label { left: 0; top: 18px; transform: translateX(-50%); }

/* Node positions (percent of the map square). */
.node--technology     { left: 7.8%;  top: 43%;   --size: 12px; }
.node--infrastructure { left: 32%;   top: 12%;   --size: 11px; }
.node--data           { left: 49%;   top: 35%;   --size: 15px; }
.node--finance        { left: 76.8%; top: 20.5%; --size: 13px; }
.node--capital        { left: 92%;   top: 42%;   --size: 12px; }
.node--cyber          { left: 80%;   top: 47.8%; --size: 12px; }
.node--ai             { left: 68.5%; top: 58.8%; --size: 18px; }
.node--ventures       { left: 18.5%; top: 82%;   --size: 11px; }

/* Hover states only exist on devices with a real hover, so nothing sticks
   after a tap on touch screens. Growth is transform-scale, not width/height,
   so it composites instead of relayouting. */
@media (hover: hover) and (pointer: fine) {
  .node { cursor: pointer; }
  .node:hover { z-index: 6; }
  .node:hover .dot {
    transform: translate(-50%, -50%) scale(1.5);
    background: radial-gradient(circle at 40% 38%, #fff6df, #ffcf6b 68%);
    border-color: rgba(255, 225, 160, 0.95);
    box-shadow: 0 0 26px 7px rgba(242, 198, 106, 0.7);
  }
  .node:hover .label {
    color: #fff6df;
    background: rgba(16, 20, 42, 0.9);
    border-color: rgba(242, 198, 106, 0.4);
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.5);
  }
  /* Dim the rest of the constellation while one node is active. */
  .map:hover .node .dot { opacity: 0.45; }
  .map:hover .node:hover .dot { opacity: 1; }
  .map:hover .node .label { color: #7f87a6; }
  .map:hover .node:hover .label { color: #fff6df; }
}

/* Initiative chips — the accessible/readable list. Visible on small screens
   (where the in-map labels would overlap and clip); visually hidden but
   still read by screen readers on desktop, where the map is decorative. */
.map-initiatives {
  display: flex;
  list-style: none;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 440px;
  margin: 22px auto 0;
  padding: 0;
}
.map-initiatives li {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #c7cee6;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.map-initiatives li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  flex: none;
}

/* ---------- primary CTA (hidden until contact is wired up) ---------- */
.cta-row {
  display: flex;
  justify-content: center;
  padding: clamp(24px, 4vw, 40px) 0 4px;
}
.btn-primary {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  padding: 15px 30px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(180deg, #ffdf9e, #f2c66a);
  color: #1a1305;
  box-shadow: 0 8px 30px rgba(242, 198, 106, 0.28);
  cursor: pointer;
  display: inline-block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 38px rgba(242, 198, 106, 0.4);
  color: #1a1305;
}

/* ---------- horizon (planet rise) ---------- */
.horizon {
  position: relative;
  overflow: hidden;
  margin-top: clamp(50px, 8vw, 84px);
  padding: clamp(56px, 9vw, 90px) 0 0;
  text-align: center;
}
.horizon-caption {
  position: relative;
  z-index: 2;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 20px;
}
.horizon-caption h2 {
  margin: 14px 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 5.5vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #f4f6ff;
}

/* Planet rises and dissolves into the scene: the field is mask-faded to
   transparent toward the bottom (so there's no hard crop line on any screen),
   and the warm glow is a soft radial halo — not a clippable box-shadow. */
.planet-field {
  position: relative;
  height: clamp(260px, 62vw, 460px);
  margin-top: clamp(48px, 7vw, 80px);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 60%, transparent 100%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
.planet-halo {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 92% 96% at 50% 58%,
    rgba(242, 190, 120, 0.22) 0%, rgba(212, 150, 92, 0.09) 40%, transparent 70%);
}
/* Full-bleed: the planet is wider than the viewport on phones, so its circular
   sides run off-screen and it reads as a giant rising limb, not a small ball. */
.planet {
  position: absolute;
  left: 50%;
  top: clamp(30px, 7vw, 70px);
  transform: translateX(-50%);
  width: min(1100px, 172vw);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: inset -46px -34px 130px rgba(20, 8, 0, 0.82),
              inset 34px 24px 100px rgba(255, 225, 180, 0.28);
  background: linear-gradient(to bottom,
    #c9a074 0%, #e6d1b0 7%, #d3a97e 13%, #b07f52 18%, #e9d8bb 25%,
    #f1e6cf 31%, #caa47c 37%, #d9b892 44%, #efe1c6 50%, #e3cba6 55%,
    #c48f5f 61%, #b87c4e 66%, #e0c39a 72%, #efe2c8 79%, #cda379 85%,
    #b98a5c 91%, #c79f73 100%);
}
/* Cloud-band layers: sized one repeat-tile wider than the planet and moved
   with transform (see the slide-band keyframes) so the texture drift never
   forces a repaint. The planet's overflow:hidden clips the extra tile. */
.planet .band,
.planet .band2 {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  background-repeat: repeat;
  will-change: transform;
}
.planet .band {
  right: -300px;
  background-image:
    radial-gradient(ellipse 170px 12px at 30% 20%, rgba(255, 244, 224, 0.5), transparent 72%),
    radial-gradient(ellipse 200px 10px at 70% 40%, rgba(120, 74, 40, 0.4), transparent 72%),
    radial-gradient(ellipse 150px 14px at 45% 62%, rgba(255, 236, 208, 0.45), transparent 72%),
    radial-gradient(ellipse 190px 11px at 60% 82%, rgba(130, 84, 48, 0.38), transparent 72%);
  background-size: 300px 150px;
  animation: slide-band 30s linear infinite;
  opacity: 0.55;
}
.planet .band2 {
  right: -150px;
  background-image:
    radial-gradient(ellipse 80px 6px at 20% 30%, rgba(255, 248, 230, 0.4), transparent 74%),
    radial-gradient(ellipse 60px 5px at 66% 54%, rgba(110, 66, 36, 0.4), transparent 76%),
    radial-gradient(ellipse 70px 6px at 44% 76%, rgba(255, 240, 214, 0.35), transparent 76%),
    radial-gradient(ellipse 50px 5px at 82% 18%, rgba(120, 78, 44, 0.34), transparent 76%);
  background-size: 150px 90px;
  animation: slide-band2 22s linear infinite;
  opacity: 0.4;
}
.planet .storm {
  position: absolute;
  left: 26%;
  top: 68%;
  width: 132px;
  height: 74px;
  border-radius: 50%;
  transform: rotate(-8deg);
  background: radial-gradient(ellipse at 50% 50%,
    #c8613a 0%, #a94a2c 42%, #8f3f28 70%, rgba(143, 63, 40, 0) 100%);
  box-shadow: 0 0 18px rgba(150, 60, 35, 0.4),
              inset -6px -4px 14px rgba(90, 30, 18, 0.6),
              inset 6px 4px 14px rgba(230, 150, 110, 0.5);
  opacity: 0.92;
}
.planet .rim {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(ellipse 92% 16% at 50% 0%, rgba(240, 228, 206, 0.55), transparent 72%),
    radial-gradient(ellipse 96% 16% at 50% 100%, rgba(150, 110, 74, 0.5), transparent 72%);
}
.planet .shade {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 238, 210, 0.4) 0%, transparent 42%),
    radial-gradient(circle at 78% 86%, rgba(20, 8, 0, 0.9) 0%, transparent 58%);
  box-shadow: inset 6px 5px 24px rgba(255, 232, 200, 0.32);
}

/* Scroll reveal — the .reveal class is added by JS only when it will actually
   observe the element, so content is never hidden without JS (or with reduced
   motion). */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease-out, transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- contact (form hidden until backend is wired up) ---------- */
.contact {
  position: relative;
  text-align: center;
  padding: clamp(40px, 7vw, 60px) clamp(20px, 5vw, 72px);
}
.contact-card {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 44px) clamp(22px, 4vw, 48px) clamp(32px, 5vw, 48px);
  border-radius: 22px;
  background: rgba(8, 11, 24, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.contact-card .eyebrow { color: var(--gold); }
.contact-card h2 {
  margin: 14px 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 5vw, 40px);
  letter-spacing: -0.02em;
  color: #f4f6ff;
}
form {
  max-width: 640px;
  margin: 30px auto 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
input,
textarea {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
textarea { min-height: 120px; resize: vertical; }
input:focus,
textarea:focus {
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.06);
}
button[type="submit"] {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  padding: 15px 26px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(180deg, #ffdf9e, #f2c66a);
  color: #1a1305;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(242, 198, 106, 0.24);
  transition: transform 0.2s ease;
}
button[type="submit"]:hover { transform: translateY(-2px); }
.sent-msg {
  font-size: 14px;
  color: #9fe6b4;
  padding: 2px 4px;
  display: none;
}
.sent-msg.show { display: block; }

/* ---------- footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: clamp(34px, 5vw, 46px)
           max(20px, env(safe-area-inset-right))
           calc(clamp(38px, 5vw, 50px) + env(safe-area-inset-bottom))
           max(20px, env(safe-area-inset-left));
  text-align: center;
}
.foot-inner { max-width: var(--maxw); margin: 0 auto; }
.foot-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #eef1ff;
}
.foot-brand .spark {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px 2px rgba(242, 198, 106, 0.6);
}
.foot-tag {
  margin: 15px auto 0;
  max-width: 460px;
  font-weight: 300;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}
.foot-copy {
  margin-top: 18px;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: #6f7690;
}

/* ---------- responsive ---------- */
@media (min-width: 681px) {
  /* Desktop: the in-map labels carry the visuals; keep the chip list for
     screen readers only (the map itself is aria-hidden). */
  .map-initiatives {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}
@media (max-width: 680px) {
  .node .label { display: none; } /* labels overlap/clip on small screens */
}
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* --- TEMPORARY: contact form + CTA hidden until the backend is wired up.
   Delete this block to restore the "Get in touch" button and the contact
   form. Markup is left intact. --- */
.cta-row,
.contact { display: none !important; }
