/* ================================================================
   yudras.com — Design System
   Dark tech aesthetic + Brutalist Signal identity
   ================================================================ */

/* --- Google Fonts --- */
@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=DM+Serif+Display:ital@0;1&family=Space+Mono:wght@400;700&display=swap");

/* --- Design Tokens --- */
:root {
  --bg-primary: #0a0a0f;
  --bg-surface: #111118;
  --bg-surface-hover: #1a1a24;
  --accent: #e63b2e;
  --accent-hover: #ff4a3c;
  --text-primary: #e8e4dd;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --grid-line: rgba(100, 116, 139, 0.08);
  --border: rgba(203, 213, 225, 0.08);
  --border-hover: rgba(203, 213, 225, 0.15);
  --radius: 1.5rem;
  --radius-lg: 2rem;
  --radius-xl: 3rem;
  --font-heading: "Space Grotesk", sans-serif;
  --font-drama: "DM Serif Display", serif;
  --font-mono: "Space Mono", monospace;
  --ease-magnetic: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* --- Noise Overlay (Global) --- */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --- Grid Background --- */
.grid-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* --- Utility --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  position: relative;
  z-index: 1;
  padding: 8rem 0;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-label::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--accent);
}

/* ================================================================
   NAVBAR
   ================================================================ */
.navbar {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  transition: all 0.4s var(--ease-magnetic);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(10, 10, 15, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.navbar-brand {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.navbar-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.navbar-links a {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted);
  text-decoration: none;
  transition:
    color 0.3s ease,
    transform 0.3s ease;
}

.navbar-links a:hover {
  color: var(--text-primary);
  transform: translateY(-1px);
}

.navbar-cta {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s var(--ease-magnetic);
  overflow: hidden;
  position: relative;
}

.navbar-cta:hover {
  background: var(--accent-hover);
  transform: scale(1.03);
}

/* Mobile menu button */
.navbar-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.25rem;
}

@media (max-width: 768px) {
  .navbar {
    padding: 0.6rem 1rem;
    gap: 1rem;
    width: calc(100% - 2rem);
    max-width: 400px;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
  }
  .navbar-links {
    display: none;
  }
  .navbar-menu-btn {
    display: block;
  }
  .navbar-cta {
    font-size: 0.75rem;
    padding: 0.4rem 1rem;
  }
}

/* ================================================================
   HERO
   ================================================================ */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 2rem;
  overflow: hidden;
  z-index: 1;
}

.hero-content {
  max-width: 900px;
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-title {
  line-height: 0.95;
  margin-bottom: 1.5rem;
}

.hero-title .line1 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(3rem, 8vw, 7rem);
  letter-spacing: -0.03em;
  color: var(--text-primary);
  display: block;
}

.hero-title .line2 {
  font-family: var(--font-drama);
  font-style: italic;
  font-size: clamp(4rem, 12vw, 11rem);
  color: var(--text-primary);
  display: block;
}

.hero-subtitle {
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 5.5rem;
  line-height: 1.6;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 500;
  padding: 0.875rem 2rem;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s var(--ease-magnetic);
  position: relative;
  overflow: hidden;
}

.hero-cta:hover {
  background: var(--accent-hover);
  transform: scale(1.03);
}

.hero-cta svg {
  transition: transform 0.3s ease;
}

.hero-cta:hover svg {
  transform: translateX(4px);
}

/* Hero side decorations */
.hero-meta {
  position: absolute;
  right: 2rem;
  bottom: 6rem;
  text-align: right;
  z-index: 2;
}

.hero-meta-item {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  line-height: 2;
}

@media (max-width: 768px) {
  .hero {
    padding: 0 1.5rem 4rem;
  }
  .hero-meta {
    display: none;
  }
}

/* ================================================================
   SERVICES / FEATURES
   ================================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.service-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all 0.4s var(--ease-magnetic);
  position: relative;
  overflow: hidden;
}

.service-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-surface-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.service-card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.service-card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.service-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.service-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: rgba(230, 59, 46, 0.1);
  color: var(--accent);
  border: 1px solid rgba(230, 59, 46, 0.2);
}

/* Typewriter feed inside cards */
.service-feed {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  background: rgba(0, 0, 0, 0.3);
  border-radius: 0.75rem;
  padding: 1rem;
  line-height: 1.8;
  min-height: 80px;
  border: 1px solid var(--border);
}

.service-feed .feed-line {
  opacity: 0;
  animation: feedAppear 0.3s ease-out forwards;
}

.service-feed .cursor-blink {
  display: inline-block;
  width: 6px;
  height: 12px;
  background: var(--accent);
  animation: blink 1s step-end infinite;
  vertical-align: middle;
  margin-left: 2px;
}

/* Live indicator */
.live-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.live-dot {
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
  }
  50% {
    opacity: 0.7;
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
  }
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

@keyframes feedAppear {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* ================================================================
   PHILOSOPHY
   ================================================================ */
.philosophy {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
  padding: 10rem 2rem;
  position: relative;
  overflow: hidden;
}

.philosophy-bg {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.philosophy-others {
  font-family: var(--font-heading);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 300;
  color: var(--text-dim);
  max-width: 700px;
  margin: 0 auto 3rem;
  line-height: 1.8;
}

.philosophy-us {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 300;
  color: var(--text-dim);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.5;
  display: block;
}

.philosophy-highlight {
  font-family: var(--font-heading);
  font-style: normal;
  font-weight: 600;
  font-size: clamp(2.5rem, 6vw, 4rem);
  color: var(--text-primary);
  display: block;
  margin: 1rem 0;
  line-height: 1.2;
}

.philosophy-detail {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 300;
  color: var(--text-muted);
  margin-top: 1rem;
}

/* ================================================================
   PROCESS / PROTOCOL
   ================================================================ */
.process-cards {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 3rem;
}

.process-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 2rem;
  align-items: center;
  transition: all 0.4s var(--ease-magnetic);
  position: relative;
  overflow: hidden;
}

.process-card:hover {
  border-color: var(--border-hover);
  transform: translateX(8px);
}

.process-step {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 700;
  color: rgba(230, 59, 46, 0.15);
  line-height: 1;
  min-width: 80px;
}

.process-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.process-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Process SVG animation */
.process-visual {
  width: 60px;
  height: 60px;
  opacity: 0.4;
}

@media (max-width: 768px) {
  .process-card {
    grid-template-columns: 1fr;
    padding: 2rem;
    gap: 1rem;
  }
  .process-step {
    font-size: 2rem;
  }
  .process-visual {
    display: none;
  }
}

/* ================================================================
   PROJECTS
   ================================================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.project-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all 0.4s var(--ease-magnetic);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.project-name {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
}

.project-type {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.project-tech {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

@media (max-width: 600px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* ================================================================
   WHY ME
   ================================================================ */
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.why-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  transition: all 0.3s var(--ease-magnetic);
  position: relative;
  padding-left: 2.5rem;
}

.why-card::before {
  content: "→";
  position: absolute;
  left: 1.25rem;
  top: 1.75rem;
  color: var(--accent);
  font-weight: 700;
}

.why-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

@media (max-width: 600px) {
  .why-grid {
    grid-template-columns: 1fr;
  }
}

/* ================================================================
   CONTACT
   ================================================================ */
.contact {
  text-align: center;
  padding: 10rem 2rem;
}

.contact-heading {
  font-family: var(--font-drama);
  font-style: italic;
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.contact-subtext {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 3rem;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--accent);
  text-decoration: none;
  padding: 1rem 2.5rem;
  border: 1px solid rgba(230, 59, 46, 0.3);
  border-radius: var(--radius);
  transition: all 0.3s var(--ease-magnetic);
}

.contact-email:hover {
  background: rgba(230, 59, 46, 0.1);
  border-color: var(--accent);
  transform: scale(1.03);
}

/* ================================================================
   FOOTER
   ================================================================ */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 4rem 2rem 2rem;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-brand {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.footer-tagline {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.footer-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.footer-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.footer-status .status-dot {
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.footer-copyright {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Demo sites section */
.footer-demos {
  min-width: 260px;
}

.footer-demos-title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

.footer-demos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.5rem;
}

.footer-demos-grid .footer-links {
  flex-direction: column;
  gap: 0.35rem;
}

@media (max-width: 768px) {
  .footer-grid {
    flex-direction: column;
    gap: 1.5rem;
  }
  .footer-demos {
    min-width: unset;
    width: 100%;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* ================================================================
   ANIMATIONS
   ================================================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.word-animate {
  display: inline-block;
  opacity: 0;
  margin: 0 0.1em;
  transition:
    color 0.3s ease,
    transform 0.3s ease,
    text-shadow 0.3s ease;
}

.word-animate:hover {
  color: #fff;
  transform: translateY(-2px);
  text-shadow: 0 0 20px rgba(230, 59, 46, 0.3);
}

@keyframes word-appear {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.8);
    filter: blur(10px);
  }
  50% {
    opacity: 0.8;
    transform: translateY(10px) scale(0.95);
    filter: blur(2px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes grid-draw {
  0% {
    stroke-dashoffset: 1000;
    opacity: 0;
  }
  50% {
    opacity: 0.3;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 0.15;
  }
}

.grid-line {
  stroke: var(--text-dim);
  stroke-width: 0.5;
  opacity: 0;
  stroke-dasharray: 5 5;
  stroke-dashoffset: 1000;
  animation: grid-draw 2s ease-out forwards;
}

.detail-dot {
  fill: var(--text-muted);
  opacity: 0;
  animation: pulse-dot 3s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 0.1;
  }
  50% {
    opacity: 0.3;
  }
}

/* Mouse gradient follower */
.mouse-gradient {
  position: fixed;
  pointer-events: none;
  border-radius: 9999px;
  width: 400px;
  height: 400px;
  background: radial-gradient(
    circle,
    rgba(230, 59, 46, 0.04),
    rgba(156, 163, 175, 0.03),
    transparent 70%
  );
  transform: translate(-50%, -50%);
  will-change: left, top, opacity;
  transition: opacity 300ms ease-out;
  filter: blur(40px);
  z-index: 0;
}

/* Click ripple */
.ripple-effect {
  position: fixed;
  width: 4px;
  height: 4px;
  background: rgba(230, 59, 46, 0.6);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: ripple 0.8s ease-out forwards;
  z-index: 9999;
}

@keyframes ripple {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(20);
    opacity: 0;
  }
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 2;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text-dim), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%,
  100% {
    opacity: 0.3;
    transform: scaleY(1);
  }
  50% {
    opacity: 0.8;
    transform: scaleY(1.2);
  }
}

.scroll-text {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}
