/* ============================================================
   redmilk.ai — candy-dark design system
   Palette drawn from SKI app: deep space navy, cyan → magenta
   ============================================================ */

:root {
  --bg: #05070f;
  --bg-2: #0a0e1c;
  --card: rgba(13, 20, 38, 0.72);
  --card-border: rgba(90, 200, 255, 0.14);
  --cyan: #55e6ff;
  --pink: #ff3d9a;
  --purple: #7b5cff;
  --text: #e9f2fa;
  --text-dim: #93a5bd;
  --candy: linear-gradient(100deg, #55e6ff 0%, #7b5cff 48%, #ff3d9a 100%);
  --radius: 22px;
  --font: "Avenir Next", Avenir, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

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

::selection { background: rgba(255, 61, 154, 0.4); }

/* ---------- ambient layers ---------- */

#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(90, 160, 220, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 160, 220, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 20%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 20%, black 30%, transparent 100%);
}

.glow {
  position: fixed;
  width: 60vw;
  height: 60vw;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.16;
  z-index: 0;
  pointer-events: none;
}
.glow-cyan { top: -20vw; left: -18vw; background: var(--cyan); }
.glow-pink { bottom: -25vw; right: -18vw; background: var(--pink); }

main, .nav, .footer { position: relative; z-index: 1; }

/* ---------- typography helpers ---------- */

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 1.2rem;
}

.gradient-text {
  background: var(--candy);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- nav ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem clamp(1.2rem, 5vw, 4rem);
  transition: background 0.35s ease, backdrop-filter 0.35s ease, box-shadow 0.35s ease;
}
.nav--scrolled {
  background: rgba(5, 7, 15, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 rgba(90, 200, 255, 0.12);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}
.nav__logo-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--candy);
  box-shadow: 0 0 14px rgba(255, 61, 154, 0.8);
}
.nav__logo-text em { font-style: normal; color: var(--pink); }

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2.2rem);
}
.nav__links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.25s;
}
.nav__links a:hover { color: var(--cyan); }

.nav__cta {
  padding: 0.45rem 1.2rem;
  border: 1px solid rgba(85, 230, 255, 0.35);
  border-radius: 999px;
  color: var(--cyan) !important;
}
.nav__cta:hover {
  background: rgba(85, 230, 255, 0.1);
  box-shadow: 0 0 18px rgba(85, 230, 255, 0.25);
}

.nav__burger { display: none; background: none; border: none; cursor: pointer; }
.nav__burger span {
  display: block;
  width: 24px; height: 2px;
  margin: 5px 0;
  background: var(--text);
  border-radius: 2px;
  transition: 0.3s;
}

/* ---------- hero ---------- */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(6rem, 12vh, 9rem) clamp(1.2rem, 8vw, 10rem) 4rem;
  position: relative;
}

.hero__hello {
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.hero__title {
  font-size: clamp(2.6rem, 7.2vw, 5.4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin-bottom: 1.1rem;
}

.hero__sub {
  font-size: clamp(1.05rem, 2.1vw, 1.45rem);
  font-weight: 600;
  margin-bottom: 1.2rem;
}
.hero__sub strong { color: var(--pink); }
.dot-sep { color: var(--cyan); margin: 0 0.35rem; }

.hero__blurb {
  max-width: 560px;
  color: var(--text-dim);
  font-size: 1.05rem;
  margin-bottom: 2.4rem;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 3.4rem; }

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.6rem, 5vw, 4rem);
}
.stat { display: flex; flex-direction: column; }
.stat__num, .stat__plus {
  display: inline;
  font-size: clamp(2rem, 4vw, 2.9rem);
  font-weight: 700;
  background: var(--candy);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat__num + .stat__plus { margin-left: 1px; }
.stat { flex-direction: row; align-items: baseline; gap: 0; flex-wrap: wrap; }
.stat__label {
  display: block;
  width: 100%;
  font-size: 0.82rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 0.2rem;
}

.hero__scroll {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 44px;
  border: 2px solid rgba(147, 165, 189, 0.5);
  border-radius: 16px;
  display: flex;
  justify-content: center;
}
.hero__scroll span {
  width: 4px; height: 9px;
  margin-top: 8px;
  border-radius: 3px;
  background: var(--cyan);
  animation: scrollhint 1.8s ease-in-out infinite;
}
@keyframes scrollhint {
  0%, 100% { transform: translateY(0); opacity: 1; }
  60% { transform: translateY(14px); opacity: 0; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.8rem;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.btn--sm { padding: 0.65rem 1.3rem; font-size: 0.9rem; }

.btn--candy {
  background: var(--candy);
  color: #071018;
  box-shadow: 0 6px 28px rgba(255, 61, 154, 0.35), 0 4px 20px rgba(85, 230, 255, 0.25);
}
.btn--candy:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 38px rgba(255, 61, 154, 0.5), 0 6px 28px rgba(85, 230, 255, 0.35);
}
.btn__arrow { transition: transform 0.25s; }
.btn--candy:hover .btn__arrow { transform: translateX(4px); }

.btn--ghost {
  color: var(--text);
  border: 1px solid rgba(147, 165, 189, 0.35);
  background: rgba(13, 20, 38, 0.4);
}
.btn--ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 22px rgba(85, 230, 255, 0.2);
  transform: translateY(-2px);
}

/* ---------- sections ---------- */

.section {
  padding: clamp(4.5rem, 10vh, 7.5rem) clamp(1.2rem, 8vw, 10rem);
  max-width: 1280px;
  margin: 0 auto;
}

.section__title {
  font-size: clamp(1.9rem, 4.4vw, 3.1rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 1.4rem;
}

.section__lead {
  color: var(--text-dim);
  font-size: 1.08rem;
  max-width: 640px;
  margin-bottom: 2.8rem;
}

/* ---------- cards ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.card:hover {
  transform: translateY(-5px);
  border-color: rgba(85, 230, 255, 0.4);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45), 0 0 32px rgba(85, 230, 255, 0.08);
}

/* ---------- about ---------- */

.about {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  margin-top: 2.4rem;
}
.about__text p { margin-bottom: 1.2rem; color: var(--text-dim); font-size: 1.05rem; }
.about__text strong { color: var(--text); }
.about__text em { color: var(--cyan); font-style: normal; font-weight: 600; }

.about__strengths { list-style: none; display: flex; flex-direction: column; gap: 0.7rem; }
.about__strengths li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.85rem 1.2rem;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  font-weight: 500;
  font-size: 0.97rem;
  transition: transform 0.3s, border-color 0.3s;
}
.about__strengths li:hover { transform: translateX(6px); border-color: rgba(255, 61, 154, 0.45); }
.about__strengths li span { font-size: 1.25rem; }

/* ---------- services ---------- */

.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.4rem;
  margin-top: 1rem;
}
.service { padding: 1.8rem 1.7rem; position: relative; overflow: hidden; }
.service::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--candy);
  opacity: 0;
  transition: opacity 0.35s;
}
.service:hover::before { opacity: 1; }
.service__icon { font-size: 2rem; margin-bottom: 1rem; }
.service h3 { font-size: 1.12rem; font-weight: 700; margin-bottom: 0.6rem; line-height: 1.35; }
.service p { color: var(--text-dim); font-size: 0.95rem; }

/* ---------- production apps ---------- */

.subhead {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--pink);
  margin: 2.6rem 0 1.3rem;
}

.apps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}
@media (max-width: 760px) {
  .apps { grid-template-columns: 1fr; }
}

.app {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.3rem 1.5rem;
  text-decoration: none;
  color: var(--text);
}

.app__icon {
  width: 68px;
  height: 68px;
  flex-shrink: 0;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.app:hover .app__icon {
  transform: scale(1.06) rotate(-2deg);
  box-shadow: 0 10px 30px rgba(85, 230, 255, 0.25);
}

.app__icon--tile {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: linear-gradient(135deg, rgba(85, 230, 255, 0.2), rgba(255, 61, 154, 0.25));
  border: 1px solid rgba(85, 230, 255, 0.25);
}

.app__meta h4 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.15rem; }
.app__meta p { color: var(--text-dim); font-size: 0.88rem; line-height: 1.5; margin-bottom: 0.4rem; }

.app__link {
  color: var(--cyan);
  font-size: 0.88rem;
  font-weight: 600;
  transition: color 0.25s;
}
.app:hover .app__link { color: var(--pink); }
.app__link--muted { color: var(--text-dim); font-weight: 500; }

/* ---------- projects ---------- */

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.6rem;
}
.project { padding: 0 0 1.6rem; overflow: hidden; display: flex; flex-direction: column; }
.project__top {
  padding: 1.7rem 1.7rem 1.2rem;
  margin-bottom: 1.2rem;
  position: relative;
}
.project__top::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(85, 230, 255, 0.35), rgba(255, 61, 154, 0.35), transparent);
}
.project__top--ski { background: radial-gradient(ellipse 120% 130% at 15% -20%, rgba(85, 230, 255, 0.17), transparent 60%); }
.project__top--clearweek { background: radial-gradient(ellipse 120% 130% at 15% -20%, rgba(123, 92, 255, 0.19), transparent 60%); }
.project__top--fight { background: radial-gradient(ellipse 120% 130% at 15% -20%, rgba(255, 61, 154, 0.16), transparent 60%); }

.project__badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cyan);
  border: 1px solid rgba(85, 230, 255, 0.35);
  border-radius: 999px;
  padding: 0.25rem 0.8rem;
  margin-bottom: 0.9rem;
}
.project h3 { font-size: 1.3rem; font-weight: 700; }
.project > p { padding: 0 1.7rem; color: var(--text-dim); font-size: 0.97rem; flex: 1; }

.project__tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1.1rem 1.7rem 0.4rem;
}
.project__tags li {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-dim);
  background: rgba(85, 230, 255, 0.07);
  border: 1px solid rgba(85, 230, 255, 0.16);
  border-radius: 999px;
  padding: 0.24rem 0.75rem;
}

.project__link {
  display: inline-block;
  margin: 0.8rem 1.7rem 0;
  color: var(--cyan);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.25s;
}
.project__link:hover { color: var(--pink); }

.project--more {
  padding: 1.8rem 1.7rem;
  justify-content: center;
  align-items: flex-start;
  gap: 1rem;
  background: linear-gradient(140deg, rgba(85, 230, 255, 0.07), rgba(255, 61, 154, 0.08)), var(--card);
}
.project--more h3 { font-size: 1.25rem; }
.project--more p { color: var(--text-dim); font-size: 0.97rem; }

/* ---------- timeline ---------- */

.timeline {
  position: relative;
  margin-top: 2.6rem;
  padding-left: 2.2rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--cyan), var(--purple), var(--pink));
  opacity: 0.55;
  border-radius: 2px;
}

.tl__item { position: relative; padding-bottom: 2.2rem; }
.tl__item:last-child { padding-bottom: 0; }

.tl__node {
  position: absolute;
  left: -2.2rem;
  top: 4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--cyan);
  box-shadow: 0 0 12px rgba(85, 230, 255, 0.6);
}
.tl__node--now {
  border-color: var(--pink);
  box-shadow: 0 0 14px rgba(255, 61, 154, 0.75);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 10px rgba(255, 61, 154, 0.55); }
  50% { box-shadow: 0 0 22px rgba(255, 61, 154, 0.95); }
}

.tl__date {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.7rem;
}

.tl__card { padding: 1.5rem 1.7rem; }
.tl__card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.15rem; }
.tl__place { color: var(--pink); font-size: 0.85rem; font-weight: 600; margin-bottom: 0.7rem; }
.tl__card p:not(.tl__place) { color: var(--text-dim); font-size: 0.95rem; }

.tl__tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.9rem;
}
.tl__tags li {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-dim);
  background: rgba(123, 92, 255, 0.1);
  border: 1px solid rgba(123, 92, 255, 0.28);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
}

/* ---------- stack ---------- */

.stack { display: flex; flex-direction: column; gap: 1.9rem; margin-top: 2.4rem; }
.stack__group h3 {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--pink);
  margin-bottom: 0.9rem;
}
.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chips span {
  padding: 0.5rem 1.1rem;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  cursor: default;
}
.chips span:hover {
  transform: translateY(-3px);
  border-color: var(--cyan);
  box-shadow: 0 6px 18px rgba(85, 230, 255, 0.18);
}

/* ---------- contact ---------- */

.contact {
  padding: clamp(2.5rem, 6vw, 4.5rem);
  text-align: center;
  background:
    radial-gradient(ellipse 80% 120% at 20% -20%, rgba(85, 230, 255, 0.12), transparent 55%),
    radial-gradient(ellipse 80% 120% at 85% 120%, rgba(255, 61, 154, 0.13), transparent 55%),
    var(--card);
}
.contact .eyebrow { margin-bottom: 1rem; }
.contact .section__lead { margin: 0 auto 2.4rem; }
.contact__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}
.contact__socials { color: var(--text-dim); display: flex; justify-content: center; gap: 0.9rem; font-size: 0.98rem; }
.contact__socials a { color: var(--text-dim); text-decoration: none; font-weight: 600; transition: color 0.25s; }
.contact__socials a:hover { color: var(--cyan); }

/* ---------- footer ---------- */

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 2rem clamp(1.2rem, 8vw, 10rem) 2.6rem;
  color: var(--text-dim);
  font-size: 0.88rem;
  border-top: 1px solid rgba(90, 200, 255, 0.1);
}
.footer__legal {
  width: 100%;
  font-size: 0.74rem;
  opacity: 0.65;
}

/* ---------- reveal animation ---------- */

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

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__scroll span, .tl__node--now { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */

@media (max-width: 780px) {
  .nav__links {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(78vw, 320px);
    flex-direction: column;
    justify-content: center;
    background: rgba(7, 10, 22, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform: translateX(100%);
    transition: transform 0.35s ease;
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5);
  }
  .nav__links.is-open { transform: translateX(0); }
  .nav__links a { font-size: 1.15rem; }
  .nav__burger { display: block; z-index: 60; }
  .nav__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__burger.is-open span:nth-child(2) { opacity: 0; }
  .nav__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .about { grid-template-columns: 1fr; }
  .hero { align-items: flex-start; }
  .timeline { padding-left: 1.8rem; }
  .tl__node { left: -1.8rem; }
}
