/* ============================================================================
   WellWon Studio — wellwon.hk
   Dark glassmorphism in the WellWon Limited visual language:
   TildaSans, near-black canvas (#030102), coral accent (#ed2c4a), glass cards.
   Self-contained, zero framework.
   ========================================================================== */

/* --- TildaSans (same variable font the corporate site uses) --------------- */
@font-face {
  font-family: 'TildaSans';
  font-style: normal;
  font-weight: 250 1000;
  font-display: swap;
  src: url('https://static.tildacdn.com/fonts/tildasans/TildaSans-VF.woff2') format('woff2-variations'),
       url('https://static.tildacdn.com/fonts/tildasans/TildaSans-VF.woff') format('woff-variations');
}

:root {
  --bg:        #030102;
  --bg-2:      #0a0708;
  --surface:   rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border:    rgba(255, 255, 255, 0.09);
  --border-2:  rgba(255, 255, 255, 0.16);
  --text:      #f4f1ef;
  --muted:     #9b938e;
  --faint:     #6c6661;
  --accent:    #ed2c4a;
  --accent-2:  #ff4d63;
  --accent-ink:#ffffff;
  --radius:    22px;
  --radius-sm: 14px;
  --container: 1180px;
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'TildaSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Typography ----------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: '';
  width: 22px; height: 1px;
  background: var(--accent);
  opacity: 0.7;
}

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; }

/* Главный заголовок — TildaSans, жирный (800), белый. */
.display {
  font-size: clamp(2.6rem, 6.2vw, 4.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.h2 { font-size: clamp(2rem, 3.8vw, 3rem); font-weight: 700; letter-spacing: -0.02em; }
.lead { font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: var(--muted); max-width: 60ch; }

.accent-text {
  background: linear-gradient(100deg, var(--accent), #ff7a90);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
              border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  box-shadow: 0 10px 30px -10px rgba(237, 44, 74, 0.6);
}
.btn-primary:hover { box-shadow: 0 16px 40px -12px rgba(237, 44, 74, 0.7); }
.btn-ghost {
  background: var(--surface);
  border-color: var(--border-2);
  color: var(--text);
  backdrop-filter: blur(12px);
}
.btn-ghost:hover { background: var(--surface-2); border-color: rgba(255,255,255,0.28); }
.btn .arr { transition: transform 0.25s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }

/* --- Header --------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px) saturate(140%);
  background: rgba(3, 1, 2, 0.62);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 26px; width: auto; }
.logo-word {
  font-size: 24px; font-weight: 800; line-height: 1;
  text-transform: uppercase; letter-spacing: 0.02em;
  color: var(--text);
}
.brand .brand-tag {
  font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--faint); padding-left: 12px; border-left: 1px solid var(--border-2);
}
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a {
  font-size: 15px; color: var(--muted); font-weight: 500;
  transition: color 0.2s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; }

/* --- Hero ----------------------------------------------------------------- */
.hero { position: relative; padding: clamp(70px, 12vw, 150px) 0 80px; overflow: hidden; }
.hero-glow {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
}
.hero-glow::before, .hero-glow::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(90px);
}
.hero-glow::before {
  width: 620px; height: 620px; top: -240px; right: -120px;
  background: radial-gradient(circle, rgba(237, 44, 74, 0.28), transparent 70%);
}
.hero-glow::after {
  width: 480px; height: 480px; bottom: -200px; left: -160px;
  background: radial-gradient(circle, rgba(32, 21, 255, 0.12), transparent 70%);
}
.hero .container { position: relative; z-index: 1; }
.hero-inner { max-width: 880px; }
.hero h1 { margin: 22px 0 24px; }
.hero .lead { font-size: clamp(1.1rem, 1.5vw, 1.35rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 72px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat { background: var(--bg); padding: 28px 26px; }
.stat .num { font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 700; letter-spacing: -0.04em; }
.stat .lbl { color: var(--muted); font-size: 14px; margin-top: 6px; }

/* --- Marquee -------------------------------------------------------------- */
.marquee {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
  overflow: hidden;
  white-space: nowrap;
  background: var(--bg-2);
}
.marquee-track { display: inline-flex; gap: 0; animation: scroll 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  font-size: clamp(1.3rem, 2.6vw, 2.1rem);
  font-weight: 600; letter-spacing: -0.02em; color: var(--faint);
  padding: 0 28px; display: inline-flex; align-items: center; gap: 28px;
}
.marquee-track span::after { content: '▪'; color: var(--accent); font-size: 0.7em; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* --- Section scaffold ----------------------------------------------------- */
.section { padding: clamp(72px, 10vw, 130px) 0; }
.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head h2 { margin: 18px 0 18px; }

/* --- Services grid -------------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  backdrop-filter: blur(14px);
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), background 0.4s var(--ease);
  overflow: hidden;
}
.card::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(237, 44, 74,0.10), transparent 60%);
  opacity: 0; transition: opacity 0.4s var(--ease);
}
.card:hover { transform: translateY(-5px); border-color: var(--border-2); background: var(--surface-2); }
.card:hover::after { opacity: 1; }
.card .icon {
  width: 60px; height: 60px; margin-bottom: 22px;
  object-fit: contain; filter: drop-shadow(0 8px 20px rgba(237, 44, 74,0.18));
}
.card h3 { font-size: 1.3rem; margin-bottom: 12px; }
.card p { color: var(--muted); font-size: 15px; margin: 0; }
.card .tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 20px; }
.tag {
  font-size: 12.5px; font-weight: 500; color: var(--muted);
  padding: 5px 11px; border-radius: 999px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
}

/* --- Work / portfolio cards ----------------------------------------------- */
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.work-card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px 32px;
  min-height: 230px;
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
}
.work-card:hover { transform: translateY(-5px); border-color: var(--border-2); }
.work-card.featured {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: 40px;
  background:
    radial-gradient(600px circle at 85% 20%, rgba(237, 44, 74,0.14), transparent 60%),
    var(--surface);
}
.work-card.featured .work-body { flex: 1; }
.work-card.featured .work-visual {
  flex: 0 0 300px; align-self: stretch; display: flex; align-items: center; justify-content: center;
}
.work-card.featured .work-visual img { border-radius: var(--radius-sm); opacity: 0.92; }
.work-top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.cat {
  font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent);
}
.badge {
  font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--border-2); color: var(--muted);
}
.badge.live { color: #7ee0a8; border-color: rgba(126,224,168,0.3); background: rgba(126,224,168,0.07); }
.badge.dev  { color: var(--accent); border-color: rgba(237, 44, 74,0.32); background: rgba(237, 44, 74,0.07); }
.work-card h3 { font-size: clamp(1.35rem, 2.2vw, 1.9rem); margin-bottom: 12px; }
.work-card p { color: var(--muted); font-size: 15.5px; margin: 0; max-width: 60ch; }
.work-card .tags { margin-top: auto; padding-top: 22px; }

/* --- Tech strip ----------------------------------------------------------- */
.tech { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-2); }
.tech-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 38px;
  padding: 40px 0;
}
.tech-row .tech-label { color: var(--faint); font-size: 14px; font-weight: 600; margin-right: 10px; }
.tech-row .tech-item { color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.25rem); font-weight: 600; letter-spacing: -0.02em; }

/* --- Process -------------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.step { padding-top: 22px; border-top: 2px solid var(--border-2); }
.step .n { font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: 0.1em; }
.step h4 { font-size: 1.15rem; margin: 14px 0 8px; font-weight: 600; }
.step p { color: var(--muted); font-size: 14px; margin: 0; }

/* --- CTA band ------------------------------------------------------------- */
.cta {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--border-2);
  background:
    radial-gradient(700px circle at 20% 0%, rgba(237, 44, 74,0.18), transparent 55%),
    radial-gradient(600px circle at 90% 100%, rgba(32,21,255,0.10), transparent 55%),
    var(--surface);
  padding: clamp(48px, 7vw, 84px);
  text-align: center;
  overflow: hidden;
}
.cta h2 { margin-bottom: 18px; }
.cta p { color: var(--muted); max-width: 52ch; margin: 0 auto 34px; font-size: 1.1rem; }
.cta-actions { display: inline-flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* --- Footer --------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--border); padding: 56px 0 40px; margin-top: 30px; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.footer-grid .brand img { height: 24px; }
.footer-col h5 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--faint); margin: 0 0 16px; font-weight: 600; }
.footer-col a { display: block; color: var(--muted); font-size: 15px; margin-bottom: 10px; transition: color 0.2s var(--ease); }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px;
  margin-top: 48px; padding-top: 26px; border-top: 1px solid var(--border);
  color: var(--faint); font-size: 13.5px;
}

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

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .nav-links, .nav-cta .btn { display: none; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 12px;
    background: var(--surface); border: 1px solid var(--border-2); color: var(--text); cursor: pointer;
  }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 20px;
    position: absolute; top: 74px; left: 0; right: 0;
    padding: 24px; background: rgba(3,1,2,0.96); border-bottom: 1px solid var(--border);
    backdrop-filter: blur(18px);
  }
  .grid, .work-grid, .steps, .stats { grid-template-columns: 1fr; }
  .work-card.featured { flex-direction: column; align-items: flex-start; }
  .work-card.featured .work-visual { flex-basis: auto; width: 100%; }
}

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