/* =========================================================
   KRYDE Dynamics — Website
   Brand: #00f9fd (electric cyan) · Marine tech / robotics
   ========================================================= */

:root {
  --cyan:        #00f9fd;
  --cyan-deep:   #06b6c9;
  --cyan-glow:   rgba(0, 249, 253, 0.45);
  --ink:         #05070a;
  --bg:          #070b10;
  --bg-2:        #0b1219;
  --panel:       #0e1620;
  --panel-2:     #121d29;
  --line:        rgba(0, 249, 253, 0.14);
  --line-soft:   rgba(255, 255, 255, 0.07);
  --txt:         #e7f6f8;
  --txt-dim:     #8ea3ad;
  --txt-faint:   #5b6f79;
  --radius:      16px;
  --maxw:        1180px;
  --ease:        cubic-bezier(0.16, 1, 0.3, 1);
  --font-head:   "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --font-body:   "Inter", "Segoe UI", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--txt);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---- Ambient background ---- */
.bg-fx {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 600px at 78% -8%, rgba(0, 249, 253, 0.12), transparent 60%),
    radial-gradient(700px 500px at 10% 12%, rgba(6, 182, 201, 0.10), transparent 55%),
    linear-gradient(180deg, #060a0f 0%, #070b10 40%, #05080c 100%);
}
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 100% 70% at 50% 0%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 100% 70% at 50% 0%, #000 0%, transparent 75%);
  opacity: 0.5;
}

/* ---- Layout ---- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
section { position: relative; padding: 110px 0; }
.eyebrow {
  font-family: var(--font-head);
  font-size: 0.8rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: ""; width: 26px; height: 1px; background: var(--cyan); opacity: 0.7;
}
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.1; letter-spacing: -0.01em; }
.section-title { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: 16px; }
.section-lead { color: var(--txt-dim); max-width: 620px; font-size: 1.05rem; }

/* ---- Buttons ---- */
.btn {
  --pad: 14px 26px;
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: var(--pad);
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--cyan-deep));
  color: #041014;
  box-shadow: 0 8px 30px -8px var(--cyan-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -8px var(--cyan-glow); }
.btn-ghost {
  background: rgba(255,255,255,0.02);
  color: var(--txt);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-2px); }

/* ---- Nav ---- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(7, 11, 16, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { height: 40px; width: auto; filter: drop-shadow(0 0 12px var(--cyan-glow)); }
.brand-name { font-family: var(--font-head); font-weight: 700; letter-spacing: 0.14em; font-size: 1.05rem; color: var(--txt); }
.brand-name b { color: var(--cyan); font-weight: 700; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  color: var(--txt-dim); text-decoration: none; font-size: 0.92rem; font-weight: 500;
  letter-spacing: 0.02em; transition: color 0.2s; position: relative;
}
.nav-links a:not(.btn):hover { color: var(--cyan); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--txt); margin: 5px 0; transition: 0.3s; }

/* ---- Hero ---- */
.hero { min-height: 100vh; display: flex; align-items: center; padding-top: 120px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; width: 100%; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px; border: 1px solid var(--line); border-radius: 100px;
  font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cyan); font-family: var(--font-head); margin-bottom: 26px;
  background: rgba(0, 249, 253, 0.04);
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1);} 50% { opacity: 0.4; transform: scale(0.8);} }
.hero h1 { font-size: clamp(2.6rem, 6.5vw, 4.6rem); letter-spacing: -0.02em; }
.hero h1 .accent { color: var(--cyan); text-shadow: 0 0 40px var(--cyan-glow); }
.hero-sub { margin: 26px 0 34px; font-size: 1.15rem; color: var(--txt-dim); max-width: 540px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 34px; margin-top: 52px; }
.hero-stats .stat b { font-family: var(--font-head); font-size: 1.9rem; color: var(--txt); display: block; }
.hero-stats .stat span { font-size: 0.82rem; color: var(--txt-faint); letter-spacing: 0.05em; }

.hero-visual { position: relative; display: flex; align-items: center; justify-content: center; }
.hero-visual .halo {
  position: absolute; width: 118%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,249,253,0.20), transparent 60%);
  filter: blur(20px); animation: breathe 6s ease-in-out infinite;
}
@keyframes breathe { 0%,100% { transform: scale(1); opacity: 0.85; } 50% { transform: scale(1.06); opacity: 1; } }
.hero-visual img { width: min(420px, 78%); position: relative; z-index: 1; filter: drop-shadow(0 0 40px var(--cyan-glow)); animation: float 7s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-16px) rotate(-1.5deg); } }
.ring { position: absolute; border: 1px solid var(--line); border-radius: 50%; animation: spin 40s linear infinite; }
.ring.r1 { width: 90%; aspect-ratio: 1; border-style: dashed; }
.ring.r2 { width: 108%; aspect-ratio: 1; border-color: rgba(0,249,253,0.08); animation-duration: 60s; animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Marquee strip ---- */
.strip { border-block: 1px solid var(--line-soft); background: rgba(0,0,0,0.25); padding: 0; overflow: hidden; }
.strip-track { display: flex; gap: 60px; padding: 20px 0; white-space: nowrap; animation: marquee 28s linear infinite; }
.strip span { font-family: var(--font-head); letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.85rem; color: var(--txt-faint); display: inline-flex; align-items: center; gap: 60px; }
.strip span::after { content: "◆"; color: var(--cyan); font-size: 0.6rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---- Mission / feature grid ---- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 54px; }
.feature {
  background: linear-gradient(160deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 30px 26px; transition: transform 0.3s var(--ease), border-color 0.3s;
}
.feature:hover { transform: translateY(-4px); border-color: var(--line); }
.feature .ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: rgba(0,249,253,0.08); border: 1px solid var(--line); margin-bottom: 18px; color: var(--cyan); }
.feature .ic svg { width: 24px; height: 24px; }
.feature h3 { font-size: 1.15rem; margin-bottom: 8px; }
.feature p { color: var(--txt-dim); font-size: 0.95rem; }

/* ---- Products ---- */
.prod-list { display: flex; flex-direction: column; gap: 26px; margin-top: 54px; }
.prod {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  background: linear-gradient(150deg, var(--panel-2), var(--bg-2));
  border: 1px solid var(--line-soft); border-radius: 22px; overflow: hidden;
  transition: border-color 0.35s, box-shadow 0.35s, transform 0.35s var(--ease);
}
.prod:hover { border-color: var(--line); box-shadow: 0 30px 60px -30px rgba(0,249,253,0.25); transform: translateY(-3px); }
.prod:nth-child(even) .prod-media { order: 2; }
.prod-body { padding: 44px; display: flex; flex-direction: column; justify-content: center; }
.prod-tag {
  align-self: flex-start; font-family: var(--font-head); font-size: 0.72rem; letter-spacing: 0.16em;
  text-transform: uppercase; padding: 5px 12px; border-radius: 100px; margin-bottom: 18px;
}
.tag-live { color: var(--cyan); background: rgba(0,249,253,0.08); border: 1px solid var(--line); }
.tag-dev  { color: #ffcf6b; background: rgba(255,207,107,0.08); border: 1px solid rgba(255,207,107,0.25); }
.tag-soon { color: var(--txt-faint); background: rgba(255,255,255,0.03); border: 1px solid var(--line-soft); }
.prod-body h3 { font-size: 1.8rem; margin-bottom: 12px; }
.prod-body p { color: var(--txt-dim); margin-bottom: 22px; }
.prod-specs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.prod-specs li { list-style: none; font-size: 0.82rem; color: var(--txt-dim); padding: 6px 12px; border: 1px solid var(--line-soft); border-radius: 8px; background: rgba(0,0,0,0.2); }
.prod-link { font-family: var(--font-head); font-size: 0.9rem; color: var(--cyan); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; transition: gap 0.25s; }
.prod-link:hover { gap: 14px; }
.prod-media {
  position: relative; min-height: 320px; display: grid; place-items: center;
  background:
    radial-gradient(circle at 50% 40%, rgba(0,249,253,0.14), transparent 65%),
    repeating-linear-gradient(0deg, transparent 0 23px, rgba(0,249,253,0.04) 23px 24px),
    repeating-linear-gradient(90deg, transparent 0 23px, rgba(0,249,253,0.04) 23px 24px);
  border-left: 1px solid var(--line-soft);
}
.prod:nth-child(even) .prod-media { border-left: 0; border-right: 1px solid var(--line-soft); }
.prod-media img { width: 58%; max-width: 240px; filter: drop-shadow(0 10px 30px rgba(0,0,0,0.5)); }
.prod-media .glyph { color: var(--cyan); opacity: 0.9; filter: drop-shadow(0 0 24px var(--cyan-glow)); }
.prod-media .glyph svg { width: 130px; height: 130px; }

/* ---- Tech / process ---- */
.tech { background: linear-gradient(180deg, transparent, rgba(0,249,253,0.03), transparent); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 50px; counter-reset: step; }
.step { padding: 28px 22px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: rgba(10,16,22,0.5); position: relative; }
.step::before { counter-increment: step; content: "0" counter(step); font-family: var(--font-head); font-size: 1.6rem; color: var(--cyan); opacity: 0.5; display: block; margin-bottom: 14px; }
.step h4 { font-family: var(--font-head); font-size: 1.05rem; margin-bottom: 6px; }
.step p { font-size: 0.9rem; color: var(--txt-dim); }

/* ---- Data states ---- */
.data-loading, .data-empty {
  color: var(--txt-faint); font-size: 0.95rem; padding: 30px 0;
  font-family: var(--font-head); letter-spacing: 0.04em;
}

/* ---- Updates ---- */
.updates-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 50px; }
.update-card {
  background: linear-gradient(160deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 28px 26px; position: relative; overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.update-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(var(--cyan), transparent); opacity: 0.6;
}
.update-card:hover { transform: translateY(-4px); border-color: var(--line); }
.update-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.update-head time { font-family: var(--font-head); font-size: 0.82rem; letter-spacing: 0.08em; color: var(--cyan); }
.update-pin, .update-proj {
  font-size: 0.72rem; letter-spacing: 0.04em; padding: 3px 9px; border-radius: 100px;
  border: 1px solid var(--line-soft); color: var(--txt-dim);
}
.update-proj { text-transform: uppercase; font-family: var(--font-head); color: var(--txt-faint); }
.update-card h3 { font-size: 1.25rem; margin-bottom: 8px; }
.update-card p { color: var(--txt-dim); font-size: 0.96rem; }

/* ---- Contact / CTA ---- */
.cta-box {
  border: 1px solid var(--line); border-radius: 26px; padding: 64px 40px; text-align: center;
  background:
    radial-gradient(700px 300px at 50% 0%, rgba(0,249,253,0.12), transparent 70%),
    linear-gradient(160deg, var(--panel), var(--bg-2));
  position: relative; overflow: hidden;
}
.cta-box h2 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 16px; }
.cta-box p { color: var(--txt-dim); max-width: 520px; margin: 0 auto 32px; font-size: 1.08rem; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---- Footer ---- */
footer { border-top: 1px solid var(--line-soft); padding: 54px 0 40px; }
.foot-grid { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; flex-wrap: wrap; }
.foot-brand img { height: 46px; margin-bottom: 16px; filter: drop-shadow(0 0 12px var(--cyan-glow)); }
.foot-brand p { color: var(--txt-faint); font-size: 0.9rem; max-width: 280px; }
.foot-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.foot-col h5 { font-family: var(--font-head); font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--txt-faint); margin-bottom: 16px; }
.foot-col a { display: block; color: var(--txt-dim); text-decoration: none; font-size: 0.92rem; margin-bottom: 10px; transition: color 0.2s; }
.foot-col a:hover { color: var(--cyan); }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line-soft); color: var(--txt-faint); font-size: 0.85rem; flex-wrap: wrap; gap: 12px; }

/* ---- Reveal animation ---- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  section { padding: 80px 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 10px; }
  .hero-visual { order: -1; margin-bottom: 10px; }
  .hero-visual img { width: 260px; }
  .features { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .prod { grid-template-columns: 1fr; }
  .prod:nth-child(even) .prod-media { order: 0; border: 0; border-bottom: 1px solid var(--line-soft); }
  .prod-media { border-left: 0 !important; border-bottom: 1px solid var(--line-soft); min-height: 240px; }
  .prod-body { padding: 32px 26px; }
  .updates-list { grid-template-columns: 1fr; }
  .nav-links { position: fixed; inset: 74px 0 auto 0; flex-direction: column; background: rgba(7,11,16,0.97); backdrop-filter: blur(14px); padding: 24px; gap: 18px; border-bottom: 1px solid var(--line-soft); transform: translateY(-120%); transition: transform 0.4s var(--ease); }
  .nav-links.open { transform: translateY(0); }
  .nav-toggle { display: block; }
  .hero-stats { gap: 24px; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .hero-stats { flex-wrap: wrap; }
  .cta-box { padding: 44px 22px; }
}

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