/* ==========================================================================
   Fewl — homepage
   Implemented from the Claude Design handoff (Fewl Homepage.dc.html)
   ========================================================================== */

:root {
  --bg: #07071A;
  --bg-card: #0C0C22;
  --bg-alt: #0A0A20;
  --text: #EDEDF7;
  --muted: #A0A0BE;
  --muted-2: #8484A6;
  --muted-3: #6E6E92;
  --kicker-text: #C9C9E2;
  --purple: #5B2EE5;
  --purple-light: #7C5CFF;
  --purple-deep: #4F2BD8;
  --cyan: #2CC4EE;
  --cyan-deep: #18A7CC;
  --magenta: #B62BAB;
  --magenta-light: #E04ED1;
  --font-display: 'Bricolage Grotesque', sans-serif;
  --font-body: 'Instrument Sans', sans-serif;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --grad-brand: linear-gradient(120deg, #5B2EE5, #B62BAB);
  --grad-text: linear-gradient(100deg, #7C5CFF 0%, #2CC4EE 52%, #E04ED1 100%);
}

html { scroll-behavior: smooth; }

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

::selection { background: var(--purple); color: #fff; }

/* ---------- animations ---------- */
@keyframes fewlHeroUp { from { opacity: 0; transform: translateY(110%); } to { opacity: 1; transform: translateY(0); } }
@keyframes fewlFade { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fewlMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes fewlDrift1 { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(90px, -60px) scale(1.15); } 100% { transform: translate(-40px, 50px) scale(0.95); } }
@keyframes fewlDrift2 { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-110px, 70px) scale(1.1); } 100% { transform: translate(60px, -50px) scale(0.92); } }
@keyframes fewlPulse { 0%, 100% { opacity: 0.5; transform: scaleY(0.3); } 50% { opacity: 1; transform: scaleY(1); } }

/* ---------- shared ---------- */
.container { max-width: 1280px; margin: 0 auto; position: relative; }
.section { position: relative; padding: 150px 48px; }

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

.orb { position: absolute; border-radius: 50%; pointer-events: none; }

.btn {
  display: inline-block;
  border-radius: 99px;
  text-decoration: none;
  font-weight: 600;
  color: var(--text);
}
.btn--primary {
  background: var(--grad-brand);
  color: #fff;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.btn--nav { padding: 11px 22px; font-size: 15px; }
.btn--nav:hover { transform: scale(1.05); box-shadow: 0 8px 32px rgba(91, 46, 229, 0.45); }
.btn--lg { padding: 17px 32px; font-size: 16px; }
.btn--lg.btn--primary:hover { transform: scale(1.05); box-shadow: 0 12px 44px rgba(91, 46, 229, 0.5); }
.btn--xl { padding: 20px 44px; font-size: 19px; }
.btn--xl:hover { transform: scale(1.06); box-shadow: 0 16px 56px rgba(91, 46, 229, 0.55); }
.btn--ghost {
  border: 1px solid rgba(255, 255, 255, 0.22);
  transition: border-color 0.25s ease, background 0.25s ease;
}
.btn--ghost:hover { border-color: var(--cyan); background: rgba(44, 196, 238, 0.08); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 99px;
  font-size: 14px;
  font-weight: 500;
  color: var(--kicker-text);
}
.pill-dot { width: 8px; height: 8px; border-radius: 50%; }
.pill-dot--cyan { background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.pill-dot--magenta { background: var(--magenta-light); box-shadow: 0 0 12px var(--magenta-light); }

.kicker { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.kicker--center { display: inline-flex; }
.kicker-line { width: 28px; height: 2px; border-radius: 2px; }
.kicker-line--purple-cyan { background: linear-gradient(90deg, #7C5CFF, #2CC4EE); }
.kicker-line--cyan-purple { background: linear-gradient(90deg, #2CC4EE, #7C5CFF); }
.kicker-line--cyan-magenta { background: linear-gradient(90deg, #2CC4EE, #E04ED1); }
.kicker-line--purple-magenta { background: linear-gradient(90deg, #7C5CFF, #E04ED1); }
.kicker-line--magenta-purple { background: linear-gradient(90deg, #E04ED1, #7C5CFF); }
.kicker-label { font-size: 13px; letter-spacing: 0.24em; text-transform: uppercase; font-weight: 600; }
.kicker-label--cyan { color: var(--cyan); }
.kicker-label--magenta { color: var(--magenta-light); }
.kicker-label--purple { color: var(--purple-light); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 64px;
  flex-wrap: wrap;
}
.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(38px, 4.4vw, 64px);
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: #fff;
}
.section-sub { margin: 0; max-width: 380px; font-size: 16px; line-height: 1.6; color: var(--muted); }

.circle-arrow {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text);
  transition: background 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}
.circle-arrow--sm { width: 44px; height: 44px; }

/* ---------- three.js background ---------- */
#bg3d {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
#bg3d canvas { display: block; width: 100%; height: 100%; }

/* ---------- cursor glow ---------- */
.cursor-glow {
  position: fixed;
  left: 0;
  top: 0;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(circle, rgba(91, 46, 229, 0.16) 0%, rgba(44, 196, 238, 0.07) 40%, transparent 70%);
  mix-blend-mode: screen;
}
@media (hover: none) { .cursor-glow { display: none; } }

/* ---------- brand / logo ---------- */
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand--sm { gap: 10px; }
.brand-mark { position: relative; width: 38px; height: 34px; display: inline-block; }
.brand-bar {
  position: absolute;
  border-radius: 99px;
  height: 7px;
  transform: rotate(-32deg);
  transform-origin: left center;
}
.brand-bar--1 { left: 4px; top: 4px; width: 34px; background: var(--purple-deep); }
.brand-bar--2 { left: 2px; top: 15px; width: 26px; background: var(--cyan-deep); }
.brand-bar--3 { left: 0; top: 26px; width: 17px; background: var(--magenta); }
.brand-mark--sm { width: 30px; height: 28px; }
.brand-mark--sm .brand-bar { height: 5.5px; }
.brand-mark--sm .brand-bar--1 { left: 3px; top: 3px; width: 26px; }
.brand-mark--sm .brand-bar--2 { left: 1.5px; top: 12px; width: 20px; }
.brand-mark--sm .brand-bar--3 { left: 0; top: 21px; width: 13px; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.01em;
  color: #fff;
}
.brand-name--sm { font-size: 20px; }

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 48px;
  background: rgba(7, 7, 26, 0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.nav-links { display: flex; align-items: center; gap: 36px; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: #fff; }
.nav-right { display: flex; align-items: center; gap: 18px; }

.lang-toggle {
  display: flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 99px;
  padding: 3px;
  gap: 2px;
}
.lang-btn {
  border: none;
  cursor: pointer;
  border-radius: 99px;
  padding: 7px 13px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  background: transparent;
  color: var(--muted);
  transition: background 0.25s ease, color 0.25s ease;
}
.lang-btn.is-active { background: #fff; color: var(--bg); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 160px 48px 100px;
  overflow: clip;
}
.hero-grid {
  position: absolute;
  inset: 0;
  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: 76px 76px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 30%, transparent 75%);
}
.hero-orb--1 {
  top: -10%; left: 8%; width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(79, 43, 216, 0.45), transparent 65%);
  filter: blur(70px);
  animation: fewlDrift1 16s ease-in-out infinite alternate;
}
.hero-orb--2 {
  bottom: -15%; right: 4%; width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(182, 43, 171, 0.32), transparent 65%);
  filter: blur(80px);
  animation: fewlDrift2 19s ease-in-out infinite alternate;
}
.hero-orb--3 {
  top: 30%; right: 26%; width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(24, 167, 204, 0.3), transparent 65%);
  filter: blur(60px);
  animation: fewlDrift1 13s ease-in-out infinite alternate-reverse;
}
.hero-inner { position: relative; max-width: 1280px; margin: 0 auto; width: 100%; }
.hero-kicker-clip { overflow: hidden; margin-bottom: 28px; }
.hero-kicker { animation: fewlHeroUp 0.9s 0.1s var(--ease-out) both; }
.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(64px, 8.6vw, 138px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: #fff;
}
.hero-line-clip { display: block; overflow: hidden; }
.hero-line-clip--1 { padding-bottom: 0.06em; }
.hero-line-clip--2 { padding-bottom: 0.08em; }
.hero-line { display: block; }
.hero-line--1 { animation: fewlHeroUp 1s 0.25s var(--ease-out) both; }
.hero-line--2 { animation: fewlHeroUp 1s 0.4s var(--ease-out) both; }
.hero-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  margin-top: 44px;
  flex-wrap: wrap;
}
.hero-sub {
  margin: 0;
  max-width: 520px;
  font-size: 19px;
  line-height: 1.65;
  color: var(--muted);
  animation: fewlFade 1s 0.75s var(--ease-out) both;
}
.hero-ctas { display: flex; gap: 16px; animation: fewlFade 1s 0.9s var(--ease-out) both; }
.hero-scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.hero-scroll-label {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted-3);
}
.hero-scroll-line {
  width: 2px;
  height: 38px;
  border-radius: 2px;
  background: linear-gradient(#7C5CFF, transparent);
  transform-origin: top;
  animation: fewlPulse 1.8s ease-in-out infinite;
}

/* ---------- marquee ---------- */
.marquee {
  position: relative; /* keep above the fixed #bg3d canvas */
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 26px 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.015);
}
.marquee-track { display: flex; width: max-content; animation: fewlMarquee 30s linear infinite; }
.marquee-group {
  display: flex;
  align-items: center;
  gap: 48px;
  padding-right: 48px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 40px;
  letter-spacing: -0.01em;
  color: rgba(237, 237, 247, 0.85);
  white-space: nowrap;
}
.star { font-size: 26px; }
.star--purple { color: var(--purple-light); }
.star--cyan { color: var(--cyan); }
.star--magenta { color: var(--magenta-light); }

/* ---------- services ---------- */
.services-list { border-top: 1px solid rgba(255, 255, 255, 0.1); }
.service-row {
  display: grid;
  grid-template-columns: 90px 1fr 1.1fr;
  align-items: center;
  gap: 28px;
  padding: 34px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.3s ease, padding-left 0.3s ease;
  cursor: default;
}
.service-row:hover { background: rgba(255, 255, 255, 0.035); padding-left: 34px; }
.service-num { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.service-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 2.4vw, 34px);
  letter-spacing: -0.015em;
  color: #fff;
}
.service-desc { margin: 0; font-size: 16px; line-height: 1.6; color: var(--muted); }

/* ---------- work ---------- */
.work { padding: 40px 48px 150px; overflow: clip; }
.work-orb {
  top: 10%; left: -10%; width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(24, 167, 204, 0.14), transparent 65%);
  filter: blur(80px);
}
.work-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.work-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 24px 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(12, 12, 34, 0.55);
  overflow: hidden;
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}
.work-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--grad-text);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.work-row:hover {
  border-color: rgba(124, 92, 255, 0.45);
  background: rgba(18, 18, 46, 0.75);
  transform: translateX(6px);
}
.work-row:hover::before { opacity: 1; }
.work-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(19px, 1.8vw, 25px);
  letter-spacing: -0.01em;
  color: #fff;
}
.work-tags {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.work-cat {
  flex: none;
  padding: 8px 16px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid;
}
.work-cat--purple { color: var(--purple-light); border-color: rgba(124, 92, 255, 0.4); background: rgba(124, 92, 255, 0.08); }
.work-cat--cyan { color: var(--cyan); border-color: rgba(44, 196, 238, 0.4); background: rgba(44, 196, 238, 0.08); }
.work-cat--magenta { color: var(--magenta-light); border-color: rgba(224, 78, 209, 0.4); background: rgba(224, 78, 209, 0.08); }

/* ---------- process ---------- */
.process {
  background: var(--bg-alt);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  overflow: clip;
}
.process-orb {
  top: -30%; right: -10%; width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(79, 43, 216, 0.16), transparent 65%);
  filter: blur(90px);
}
.process-head { text-align: center; margin-bottom: 80px; }
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px; }
.process-step { position: relative; padding-top: 28px; }
.step-bar { position: absolute; top: 0; left: 0; width: 52px; height: 4px; border-radius: 4px; }
.step-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 84px;
  line-height: 1;
  letter-spacing: -0.02em;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.05));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.process-step h3 {
  margin: 22px 0 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  color: #fff;
}
.process-step p { margin: 0; font-size: 15.5px; line-height: 1.65; color: var(--muted); }

/* ---------- testimonial ---------- */
.testimonial { padding: 150px 48px 130px; overflow: clip; }
.testimonial-orb {
  top: 20%; right: -12%; width: 540px; height: 540px;
  background: radial-gradient(circle, rgba(24, 167, 204, 0.12), transparent 65%);
  filter: blur(80px);
}
.testimonial-inner { max-width: 920px; margin: 0 auto; position: relative; text-align: center; }
.testimonial .kicker--center { margin-bottom: 34px; }
.quote-mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 96px;
  line-height: 0.4;
}
.text-gradient--quote {
  background: linear-gradient(100deg, #7C5CFF, #E04ED1);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.quote-stage { min-height: 270px; display: flex; align-items: center; justify-content: center; }
.quote-fader { transition: opacity 0.35s ease, transform 0.35s ease; }
.quote-fader.is-fading { opacity: 0; transform: translateY(10px); }
.quote-stage blockquote {
  margin: 28px 0 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(20px, 2.1vw, 27px);
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: var(--text);
}
.quote-dots { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 34px; }
.quote-dot {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  border: none;
  cursor: pointer;
  padding: 0;
  background: rgba(255, 255, 255, 0.22);
  transition: width 0.35s ease, background 0.35s ease;
}
.quote-dot.is-active { width: 30px; background: linear-gradient(90deg, #7C5CFF, #E04ED1); }

.clients {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  margin-top: 88px;
  flex-wrap: wrap;
}
.client-logo {
  width: 190px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  opacity: 0.85;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  color: var(--kicker-text);
  text-align: center;
  padding: 0 12px;
  box-sizing: border-box;
}
.client-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ---------- footer ---------- */
.footer { position: relative; padding: 160px 48px 0; overflow: clip; }
.footer-orb {
  bottom: -30%; left: 30%; width: 760px; height: 760px;
  background: radial-gradient(circle, rgba(91, 46, 229, 0.22), rgba(182, 43, 171, 0.1), transparent 70%);
  filter: blur(90px);
}
.footer-inner { text-align: center; }
.footer-kicker { margin-bottom: 30px; }
.footer-title {
  margin: 0 0 40px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(56px, 7.6vw, 120px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: #fff;
}
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 130px;
  padding: 30px 0 34px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  flex-wrap: wrap;
}
.footer-note { font-size: 14px; color: var(--muted-3); }
.footer-links { display: flex; gap: 26px; }
.footer-links a {
  color: var(--muted-2);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}
.footer-links a:hover { color: #fff; }

/* ---------- scroll reveal ---------- */
[data-reveal] {
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  will-change: opacity, transform;
}
[data-reveal].is-hidden { opacity: 0; transform: translateY(48px); }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .process-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .nav { padding: 14px 24px; }
  .nav-links { display: none; }
  .section, .testimonial { padding-left: 24px; padding-right: 24px; }
  .hero { padding: 140px 24px 90px; }
  .work { padding: 40px 24px 120px; }
  .footer { padding: 120px 24px 0; }
  .work-row { flex-direction: column; align-items: flex-start; gap: 14px; padding: 20px; }
  .service-row { grid-template-columns: 56px 1fr; row-gap: 12px; }
  .service-desc { grid-column: 2 / 3; }
  .marquee-group { font-size: 30px; gap: 36px; padding-right: 36px; }
}

@media (max-width: 640px) {
  .btn--nav { display: none; }
  .process-grid { grid-template-columns: 1fr; }
  .hero-ctas { flex-wrap: wrap; }
  .footer-bottom { flex-direction: column; justify-content: center; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-kicker, .hero-line--1, .hero-line--2, .hero-sub, .hero-ctas,
  .marquee-track, .orb, .hero-scroll-line { animation: none; }
  [data-reveal] { transition: none; }
  [data-reveal].is-hidden { opacity: 1; transform: none; }
  .cursor-glow { display: none; }
}
