/* =========================================================
   MATHO — Portfolio Trailer Maker Minecraft
   ========================================================= */

:root {
  --navy-deep: #100D38;
  --blue-dark: #0149AF;
  --indigo: #3532CB;
  --indigo-2: #3341BE;
  --blue-bright: #006BFF;

  --bg: #0B0926;
  --bg-soft: #12103d;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);

  --text: #F5F7FF;
  --text-muted: rgba(245, 247, 255, 0.64);
  --text-faint: rgba(245, 247, 255, 0.38);

  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
}

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

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.text-accent {
  background: linear-gradient(90deg, var(--blue-bright), #5b9dff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-bright);
}
.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue-bright);
  box-shadow: 0 0 12px 2px var(--blue-bright);
}

/* film-grain / noise overlay for texture */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  mix-blend-mode: overlay;
  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='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* dot-grid texture utility */
.dot-grid {
  background-image: radial-gradient(rgba(255,255,255,0.14) 1px, transparent 1px);
  background-size: 18px 18px;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s var(--ease), border-color 0.35s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(90deg, var(--blue-bright), var(--indigo));
  color: #fff;
  box-shadow: 0 8px 30px -8px rgba(0, 107, 255, 0.65);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 34px -6px rgba(0, 107, 255, 0.85);
}
.btn-ghost {
  background: rgba(255,255,255,0.03);
  color: var(--text);
  border-color: var(--border);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.25);
  transform: translateY(-2px);
}

/* =========================================================
   NAVBAR
   ========================================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  padding: 18px 0;
  transition: background 0.4s var(--ease), padding 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.navbar.scrolled {
  background: rgba(11, 9, 38, 0.78);
  backdrop-filter: blur(14px);
  padding: 12px 0;
  border-color: var(--border);
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.15);
}
.brand-avatar-sm { width: 30px; height: 30px; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.25s var(--ease);
  position: relative;
}
.nav-link:hover { color: var(--text); }
.nav-cta {
  padding: 9px 20px;
  border-radius: 999px;
  background: rgba(0,107,255,0.14);
  border: 1px solid rgba(0,107,255,0.4);
  color: #cfe2ff;
}
.nav-cta:hover {
  background: rgba(0,107,255,0.24);
  color: #fff;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-left: 20px;
}
.lang-btn {
  padding: 6px 12px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-faint);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.lang-btn:hover { color: var(--text); }
.lang-btn.active {
  background: var(--blue-bright);
  color: #fff;
}

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}
.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
  margin: 0 auto;
}
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 60% at 15% 10%, rgba(53,50,203,0.55), transparent 60%),
    radial-gradient(ellipse 70% 60% at 90% 20%, rgba(0,107,255,0.35), transparent 55%),
    linear-gradient(160deg, #0a0824 0%, var(--navy-deep) 40%, var(--indigo-2) 100%);
  padding-top: 120px;
  padding-bottom: 80px;
}

.hero-wordmark {
  position: absolute;
  inset: 1.5% -4%;
  z-index: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0;
  overflow: hidden;
  transform: rotate(-3deg) scale(1.08);
  transform-origin: center;
  opacity: 0.6;
  pointer-events: none;
}
.wordmark-row {
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 4.4rem;
  line-height: 0.72;
  letter-spacing: 0.02em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255,255,255,0.16);
}
.wordmark-word { margin-right: 0.3em; }
.wordmark-row:nth-child(even) { -webkit-text-stroke: 1.5px rgba(0,107,255,0.28); }

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(100deg,
    rgba(11,9,38,0.94) 0%,
    rgba(11,9,38,0.8) 32%,
    rgba(11,9,38,0.25) 58%,
    rgba(11,9,38,0.05) 72%,
    transparent 85%);
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  z-index: 0;
  pointer-events: none;
}
.glow-1 {
  width: 480px; height: 480px;
  background: rgba(0,107,255,0.35);
  top: -120px; right: -100px;
}
.glow-2 {
  width: 360px; height: 360px;
  background: rgba(53,50,203,0.4);
  bottom: -100px; left: -80px;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 40px;
}

.hero-title {
  font-size: clamp(3.2rem, 8vw, 6rem);
  letter-spacing: 0.01em;
  margin: 18px 0 16px;
}

.hero-sub {
  max-width: 440px;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 34px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-visual {
  display: flex;
  justify-content: center;
}
.hero-avatar-ring {
  position: relative;
  width: min(340px, 70vw);
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 10px;
  background: conic-gradient(from 180deg, var(--blue-bright), var(--indigo), var(--blue-bright));
  animation: spin 12s linear infinite;
}
.hero-avatar-ring::after {
  content: "";
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  border: 1px dashed rgba(255,255,255,0.18);
  animation: spin-rev 30s linear infinite;
}
.hero-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--navy-deep);
  animation: counter-spin 12s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-rev { to { transform: rotate(-360deg); } }
@keyframes counter-spin { to { transform: rotate(-360deg); } }

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid rgba(255,255,255,0.35);
  border-radius: 999px;
  z-index: 2;
}
.scroll-cue span {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  border-radius: 999px;
  background: var(--blue-bright);
  animation: cue 1.6s ease-in-out infinite;
}
@keyframes cue {
  0% { opacity: 1; top: 8px; }
  70% { opacity: 0; top: 20px; }
  100% { opacity: 0; top: 8px; }
}

/* =========================================================
   SECTION HEAD (shared)
   ========================================================= */
section { position: relative; padding: 110px 0; }

.section-head {
  max-width: 620px;
  margin-bottom: 52px;
}
.section-title {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  margin: 14px 0 12px;
}
.section-sub {
  color: var(--text-muted);
  font-size: 1.02rem;
}

/* =========================================================
   PORTFOLIO
   ========================================================= */
.portfolio { background: var(--bg); }

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.filter-btn {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}
.filter-btn:hover { background: var(--surface-hover); color: var(--text); }
.filter-btn.active {
  background: var(--blue-bright);
  border-color: var(--blue-bright);
  color: #fff;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.video-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.45s var(--ease), border-color 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.video-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0,107,255,0.5);
  box-shadow: 0 20px 40px -18px rgba(0,107,255,0.5);
}
.video-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--indigo-2), var(--navy-deep));
  overflow: hidden;
}
.video-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.video-card:hover .video-thumb img { transform: scale(1.08); }

.play-btn {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 58px; height: 58px;
  border-radius: 50%;
  background: rgba(11,9,38,0.55);
  border: 1.5px solid rgba(255,255,255,0.5);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}
.video-card:hover .play-btn {
  background: var(--blue-bright);
  border-color: var(--blue-bright);
  transform: translate(-50%, -50%) scale(1.08);
}
.play-btn svg { width: 18px; height: 18px; fill: #fff; margin-left: 3px; }

.video-tag {
  position: absolute;
  top: 12px; left: 12px;
  padding: 5px 12px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  background: rgba(11,9,38,0.65);
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(4px);
}

.video-info { padding: 16px 18px 20px; }
.video-info h3 {
  font-size: 1.02rem;
  margin-bottom: 4px;
}
.video-info p {
  font-size: 0.85rem;
  color: var(--text-faint);
}

/* =========================================================
   SERVICES
   ========================================================= */
.services { background: linear-gradient(180deg, var(--bg) 0%, #0d0b30 100%); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}

.service-card {
  position: relative;
  padding: 34px 28px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
}
.service-card:hover { transform: translateY(-6px); border-color: rgba(0,107,255,0.4); }

.service-card.featured {
  background: linear-gradient(165deg, rgba(0,107,255,0.16), rgba(53,50,203,0.14));
  border-color: rgba(0,107,255,0.5);
  transform: scale(1.03);
}
.service-card.featured:hover { transform: scale(1.03) translateY(-6px); }

.service-badge {
  position: absolute;
  top: -13px;
  left: 28px;
  padding: 5px 14px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 999px;
  background: var(--blue-bright);
  color: #fff;
}

.service-name {
  font-size: 1.2rem;
  margin-bottom: 6px;
}
.service-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 18px;
}
.service-price {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 700;
  margin-bottom: 22px;
}
.service-price span {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-faint);
}

.service-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
  flex-grow: 1;
}
.service-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.service-features svg {
  width: 16px; height: 16px;
  flex-shrink: 0;
  margin-top: 3px;
  fill: var(--blue-bright);
}

.service-cta {
  text-align: center;
  padding: 12px 20px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  transition: all 0.3s var(--ease);
}
.service-card.featured .service-cta {
  background: linear-gradient(90deg, var(--blue-bright), var(--indigo));
  border-color: transparent;
}
.service-cta:hover { background: var(--surface-hover); }
.service-card.featured .service-cta:hover { filter: brightness(1.1); }

.process-box {
  margin-top: 40px;
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}
.process-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 20px;
}
.process-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.process-item-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.process-item-text {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* =========================================================
   CONTACT
   ========================================================= */
.contact { background: linear-gradient(180deg, #0d0b30 0%, var(--bg) 100%); }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 40px;
}
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}
.form-field input,
.form-field textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  resize: vertical;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: rgba(0,107,255,0.55);
  background: var(--surface-hover);
}
.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.contact-form .btn {
  align-self: flex-start;
}
.form-status {
  font-size: 0.88rem;
  min-height: 1.2em;
}
.form-status.success { color: #5be08a; }
.form-status.error { color: #ff6b6b; }

.contact-or {
  font-size: 0.85rem;
  color: var(--text-faint);
  margin-bottom: 18px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), background 0.35s var(--ease);
}
.contact-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0,107,255,0.45);
  background: var(--surface-hover);
}
.contact-card.featured {
  background: linear-gradient(165deg, rgba(0,107,255,0.16), rgba(53,50,203,0.14));
  border-color: rgba(0,107,255,0.5);
}
.contact-card.featured:hover { border-color: rgba(0,107,255,0.7); }
.contact-icon {
  flex-shrink: 0;
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,107,255,0.14);
}
.contact-icon svg { width: 22px; height: 22px; fill: var(--blue-bright); }
.contact-label { font-size: 0.78rem; color: var(--text-faint); margin-bottom: 2px; }
.contact-value { font-family: var(--font-display); font-weight: 700; font-size: 1rem; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  padding: 46px 0 34px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.footer-note { color: var(--text-muted); font-size: 0.9rem; }
.footer-copy { color: var(--text-faint); font-size: 0.8rem; }

/* =========================================================
   MODAL / LIGHTBOX
   ========================================================= */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal.open { display: flex; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 5, 20, 0.88);
  backdrop-filter: blur(6px);
}
.modal-content {
  position: relative;
  width: 100%;
  max-width: 960px;
  z-index: 2;
}
.modal-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.7);
}
.modal-video iframe {
  width: 100%; height: 100%; border: none;
}
.modal-close {
  position: absolute;
  top: -46px;
  right: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.3s var(--ease);
}
.modal-close:hover { background: var(--surface-hover); }

/* =========================================================
   SCROLL REVEAL
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-visual { order: -1; }
  .hero-avatar-ring { width: 200px; margin-bottom: 10px; }

  .video-grid, .services-grid, .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .service-card.featured { transform: none; }
  .service-card.featured:hover { transform: translateY(-6px); }
  .process-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav-links {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(320px, 80vw);
    background: rgba(11,9,38,0.98);
    backdrop-filter: blur(16px);
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
    border-left: 1px solid var(--border);
  }
  .nav-links.open { transform: translateX(0); }
  .burger { display: flex; }
  .lang-switch { margin-left: auto; margin-right: 10px; }

  section { padding: 80px 0; }

  .video-grid, .services-grid, .contact-grid {
    grid-template-columns: 1fr;
  }
  .service-card.featured { transform: none; }
  .process-list { grid-template-columns: 1fr; }
  .process-box { padding: 24px; }

  .wordmark-row { font-size: 3.2rem; }
}
