/* ============================================================
   maxgatari — static studio site
   Plain CSS, no build step.
   ============================================================ */

:root {
  --bg: #07070c;
  --bg-soft: #0d0d16;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #f4f3f7;
  --text-dim: #a7a5b8;
  --text-faint: #6f6d80;

  --accent-1: #ffb07c;
  --accent-2: #ff6b9d;
  --accent-3: #9b6bff;
  --grad: linear-gradient(120deg, var(--accent-1), var(--accent-2) 45%, var(--accent-3));

  --font-display: "Space Grotesk", "PingFang SC", "Hiragino Sans", "Noto Sans CJK SC", system-ui, sans-serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Hiragino Sans", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;

  --maxw: 1180px;
  --radius: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

/* ===== Ambient background ===== */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-glow {
  position: absolute; border-radius: 50%;
  filter: blur(120px); opacity: 0.45;
  animation: drift 22s var(--ease) infinite alternate;
}
.bg-glow--1 {
  width: 60vw; height: 60vw; top: -20vw; left: -10vw;
  background: radial-gradient(circle, #ff6b9d 0%, transparent 65%);
}
.bg-glow--2 {
  width: 55vw; height: 55vw; bottom: -25vw; right: -15vw;
  background: radial-gradient(circle, #7c5cff 0%, transparent 65%);
  animation-delay: -8s;
}
@keyframes drift {
  from { transform: translate3d(0,0,0) scale(1); }
  to   { transform: translate3d(4vw, 3vw, 0) scale(1.15); }
}
.bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
}
.bg-noise {
  position: absolute; inset: 0; opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}
@media (prefers-reduced-motion: reduce) { .bg-glow { animation: none; } }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  max-width: var(--maxw); margin: 0 auto;
  padding: 18px 28px;
  backdrop-filter: blur(14px);
}
.site-header::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, rgba(7,7,12,0.85), rgba(7,7,12,0.0));
  border-bottom: 1px solid transparent;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { display: grid; place-items: center; }
.brand-word {
  font-family: var(--font-display);
  font-weight: 700; font-size: 20px; letter-spacing: -0.02em;
}
.site-nav { display: flex; gap: 28px; margin-left: auto; font-size: 15px; }
.site-nav a { color: var(--text-dim); transition: color 0.2s; }
.site-nav a:hover { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.site-nav + .header-actions { margin-left: 0; }

.lang-switch {
  display: inline-flex; align-items: center;
  border: 1px solid var(--border); border-radius: 999px;
  padding: 3px; background: var(--surface);
}
.lang-switch button {
  border: 0; background: transparent; color: var(--text-faint);
  font-family: var(--font-display); font-size: 13px; font-weight: 600;
  padding: 5px 11px; border-radius: 999px; cursor: pointer;
  transition: color 0.2s, background 0.2s; line-height: 1;
}
.lang-switch button:hover { color: var(--text); }
.lang-switch button.is-active { color: #0a0a0f; background: var(--text); }

.nav-toggle { display: none; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  padding: 12px 22px; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; transition: transform 0.2s var(--ease), box-shadow 0.25s, background 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn--solid { background: var(--grad); color: #150a0a; box-shadow: 0 8px 30px -8px rgba(255,107,157,0.55); }
.btn--solid:hover { box-shadow: 0 12px 38px -8px rgba(255,107,157,0.7); }
.btn--ghost { border-color: var(--border-strong); color: var(--text); background: var(--surface); }
.btn--ghost:hover { border-color: var(--text-dim); background: var(--surface-2); }
.btn--sm { padding: 9px 16px; font-size: 14px; }
.btn--lg { padding: 16px 30px; font-size: 17px; }

/* ===== Layout ===== */
.section {
  max-width: var(--maxw); margin: 0 auto;
  padding: 92px 28px;
}
.eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase; letter-spacing: 0.16em;
  font-size: 12.5px; font-weight: 600;
  color: transparent; background: var(--grad); -webkit-background-clip: text; background-clip: text;
  margin-bottom: 16px;
}
.section-head { max-width: 720px; margin-bottom: 52px; }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.5vw, 46px); font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.12;
}
.section-sub { color: var(--text-dim); margin-top: 14px; font-size: 16px; }

/* ===== Hero ===== */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(70px, 12vw, 140px) 28px clamp(50px, 8vw, 90px);
  text-align: center;
}
.hero .eyebrow { margin-bottom: 22px; }
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(42px, 8.5vw, 92px);
  font-weight: 700; line-height: 1.04; letter-spacing: -0.035em;
  margin: 0 auto 28px;
}
.hero-sub {
  max-width: 620px; margin: 0 auto 38px;
  color: var(--text-dim); font-size: clamp(16px, 2vw, 19px);
}
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ===== Marquee ===== */
.marquee {
  overflow: hidden; border-block: 1px solid var(--border);
  padding: 18px 0; margin: 20px 0 10px;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: inline-flex; align-items: center; gap: 34px;
  white-space: nowrap; will-change: transform;
  animation: scroll-x 28s linear infinite;
  font-family: var(--font-display); font-weight: 600;
  font-size: 22px; letter-spacing: 0.04em; color: var(--text-faint);
}
.marquee-track .dot { color: var(--accent-2); font-size: 10px; }
@keyframes scroll-x { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ===== About ===== */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; }
.about-lead { font-size: clamp(19px, 2.6vw, 26px); line-height: 1.5; font-weight: 500; }
.about-body { color: var(--text-dim); font-size: 17px; }

/* ===== Cards ===== */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.card {
  position: relative; overflow: hidden;
  padding: 30px 28px 28px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
}
.card::before {
  content: ""; position: absolute; inset: 0; opacity: 0;
  background: radial-gradient(600px circle at var(--mx,50%) var(--my,0%), rgba(255,107,157,0.10), transparent 40%);
  transition: opacity 0.3s;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); background: var(--surface-2); }
.card:hover::before { opacity: 1; }
.card-num {
  font-family: var(--font-display); font-weight: 700; font-size: 14px;
  color: transparent; background: var(--grad); -webkit-background-clip: text; background-clip: text;
}
.card h3 { font-family: var(--font-display); font-size: 21px; font-weight: 600; margin: 14px 0 10px; }
.card p { color: var(--text-dim); font-size: 15.5px; }

/* ===== Work ===== */
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.work-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: var(--surface);
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.work-card:hover { transform: translateY(-5px); border-color: var(--border-strong); }
.work-thumb {
  position: relative; aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--c1, #ff8a5c), var(--c2, #ff4d6d));
  display: flex; align-items: flex-start; justify-content: flex-end; padding: 14px;
}
.work-thumb::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 100% at 100% 0%, rgba(255,255,255,0.25), transparent 50%), rgba(7,7,12,0.18);
  mix-blend-mode: overlay;
}
.work-soon {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-display); font-size: 12px; font-weight: 600; letter-spacing: 0.03em;
  padding: 5px 12px; border-radius: 999px; color: #fff;
  background: rgba(7,7,12,0.5); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.28);
}
.work-soon::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 8px rgba(255,255,255,0.9);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .work-soon::before { animation: none; } }
.work-card h3 { font-family: var(--font-display); font-size: 19px; font-weight: 600; margin: 18px 20px 8px; }
.work-card p { color: var(--text-dim); font-size: 14.5px; margin: 0 20px 22px; }

.work-cta { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 34px; flex-wrap: wrap; }
.work-cta p { color: var(--text-dim); font-size: 16px; }

/* ===== Process / Steps ===== */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.step {
  position: relative; padding: 28px 24px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface);
}
.step-num {
  font-family: var(--font-display); font-weight: 700; font-size: 34px;
  color: transparent; background: var(--grad); -webkit-background-clip: text; background-clip: text;
  display: block; margin-bottom: 14px; line-height: 1;
}
.step h3 { font-family: var(--font-display); font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.step p { color: var(--text-dim); font-size: 14.5px; }

/* ===== Stats ===== */
.stats {
  max-width: var(--maxw); margin: 0 auto;
  padding: 40px 28px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  border-block: 1px solid var(--border);
}
.stat { text-align: center; }
.stat-num {
  display: block; font-family: var(--font-display);
  font-size: clamp(26px, 3.4vw, 38px); font-weight: 700; letter-spacing: -0.02em;
}
.stat-label { display: block; color: var(--text-faint); font-size: 14px; margin-top: 6px; }

/* ===== Contact ===== */
.contact { padding-block: 110px; }
.contact-card {
  position: relative; overflow: hidden;
  text-align: center; max-width: 760px; margin: 0 auto;
  padding: 60px 32px;
  border: 1px solid var(--border-strong); border-radius: 28px;
  background:
    radial-gradient(120% 140% at 50% -20%, rgba(255,107,157,0.14), transparent 60%),
    var(--surface);
}
.contact-card .section-title { margin-bottom: 16px; }
.contact-body { color: var(--text-dim); font-size: 17px; max-width: 480px; margin: 0 auto 32px; }

/* ===== Footer ===== */
.site-footer {
  max-width: var(--maxw); margin: 0 auto;
  padding: 48px 28px 64px;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
  border-top: 1px solid var(--border); flex-wrap: wrap;
}
.footer-brand .brand-word { font-size: 22px; }
.footer-brand p { color: var(--text-faint); font-size: 14.5px; margin-top: 8px; }
.footer-meta { display: flex; flex-direction: column; gap: 6px; text-align: right; font-size: 14px; color: var(--text-faint); }
.footer-meta a { color: var(--text-dim); transition: color 0.2s; }
.footer-meta a:hover { color: var(--text); }

/* ===== Reveal on scroll =====
   Progressive enhancement: content is visible by default; only hidden
   for animation once JS confirms support (.js on <html>). No-JS users
   and crawlers see everything. */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; } }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .site-nav { display: none; }
  .about-grid, .cards, .work-grid, .steps, .stats { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
  .work-grid { grid-template-columns: 1fr 1fr; }
  .nav-toggle {
    display: flex; flex-direction: column; gap: 5px;
    background: transparent; border: 0; cursor: pointer; padding: 6px;
  }
  .nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.25s, opacity 0.2s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* mobile menu */
  .site-nav.is-open {
    display: flex; flex-direction: column; gap: 0;
    position: fixed; inset: 64px 16px auto; z-index: 60;
    padding: 12px; background: var(--bg-soft);
    border: 1px solid var(--border); border-radius: 16px;
    backdrop-filter: blur(16px);
  }
  .site-nav.is-open a { padding: 12px 14px; font-size: 17px; border-radius: 10px; }
  .site-nav.is-open a:hover { background: var(--surface); }
}
@media (max-width: 560px) {
  .header-actions .btn { display: none; }
  .cards, .work-grid { grid-template-columns: 1fr; }
  .footer-meta { text-align: left; }
  .site-footer { flex-direction: column; align-items: flex-start; }
}
