/* ============ dkwy Studio ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:   #0A0E1A;
  --slate:  #141929;
  --slate2: #1a2035;
  --cyan:   #00D4FF;
  --cyan2:  #0099CC;
  --blue:   #3B7BFF;
  --fog:    #F0F4FF;
  --mid:    #8391B0;
  --border: rgba(0,212,255,0.12);
  --glow:   rgba(0,212,255,0.25);
  --head:   'Space Grotesk', system-ui, sans-serif;
  --body:   'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  background: var(--navy);
  color: var(--fog);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

#bg-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

/* ─── NAV ─── */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  padding: 1.1rem 5vw;
  background: rgba(10,14,26,0.72);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.logo { display: block; text-decoration: none; }
.logo img { height: 34px; width: auto; }

.nav-links { display: flex; gap: 2.4rem; list-style: none; margin-left: auto; }
.nav-links a {
  font-family: var(--head); font-size: 0.85rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--mid); text-decoration: none; transition: color 0.2s;
}
.nav-links a:hover { color: var(--cyan); }

.nav-cta, .btn-primary {
  font-family: var(--head); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--navy); background: var(--cyan); border: none; cursor: pointer; text-decoration: none;
  display: inline-block;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.nav-cta { font-size: 0.82rem; padding: 0.6rem 1.4rem; }
.nav-cta:hover, .btn-primary:hover {
  background: #33DDFF; transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,212,255,0.3);
}

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 6px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--fog); }

/* ─── BUTTONS ─── */
.btn-primary { font-size: 0.88rem; padding: 0.9rem 2.2rem; }
.btn-ghost {
  font-family: var(--head); font-size: 0.88rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none; color: var(--fog); border: 1px solid var(--border); padding: 0.9rem 2.2rem;
  cursor: pointer; background: none; display: inline-block; white-space: nowrap;
  transition: border-color 0.2s, color 0.2s;
}
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }

/* ─── HERO ─── */
#hero {
  position: relative; z-index: 1; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 10rem 5vw 6rem;
}
.hero-eyebrow, .section-eyebrow {
  font-family: var(--head); font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--cyan);
  margin-bottom: 1.6rem; display: flex; align-items: center; gap: 0.8rem;
}
.hero-eyebrow::before, .section-eyebrow::before {
  content: ''; display: inline-block; width: 28px; height: 1px; background: var(--cyan);
}
.section-eyebrow { font-size: 0.76rem; margin-bottom: 1rem; }
.section-eyebrow::before { width: 20px; }

h1 {
  font-family: var(--head); font-size: clamp(2.6rem, 7vw, 6.2rem); font-weight: 700;
  line-height: 1.04; letter-spacing: -0.035em; max-width: 860px; margin-bottom: 1.8rem;
}
h1 em, h2 em { font-style: normal; color: var(--cyan); }
.hero-sub { font-size: 1.05rem; color: var(--mid); max-width: 540px; line-height: 1.75; margin-bottom: 3rem; }
.hero-actions { display: flex; gap: 1.2rem; flex-wrap: wrap; align-items: center; }

.hero-scroll-hint {
  position: absolute; bottom: 2.5rem; left: 5vw; display: flex; align-items: center; gap: 0.6rem;
  font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mid);
}
.scroll-line { width: 1px; height: 40px; background: linear-gradient(to bottom, var(--mid), transparent); animation: scrollPulse 2s ease-in-out infinite; }
@keyframes scrollPulse { 0%,100% { opacity: .4; transform: scaleY(1); } 50% { opacity: 1; transform: scaleY(1.15); } }

/* ─── METRICS STRIP ─── */
.metrics {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: rgba(20,25,41,0.6); backdrop-filter: blur(12px);
  display: grid; grid-template-columns: repeat(4, 1fr); padding: 0 5vw;
}
.metric { padding: 2.4rem 2rem; border-right: 1px solid var(--border); text-decoration: none; transition: background .3s; }
.metric:hover { background: rgba(0,212,255,0.04); }
.metric:last-child { border-right: none; }
.metric-num { font-family: var(--head); font-size: 2.4rem; font-weight: 700; color: var(--cyan); letter-spacing: -0.04em; line-height: 1; margin-bottom: 0.4rem; }
.metric-label { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mid); }

/* ─── SECTIONS ─── */
section { position: relative; z-index: 1; padding: 8rem 5vw; }
h2 { font-family: var(--head); font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 1.2rem; }
h3 { font-family: var(--head); font-size: 1.4rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 1rem; line-height: 1.2; }
.section-intro { font-size: 1rem; color: var(--mid); max-width: 560px; line-height: 1.8; margin-bottom: 4rem; }
.section-intro strong { color: var(--fog); font-weight: 500; }

/* ─── SERVICES ─── */
#books, #services, #contact { background: var(--slate); }
.services-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border);
}
.service-card { background: var(--slate); padding: 2.4rem 2rem; transition: background 0.3s; position: relative; overflow: hidden; }
.service-card h3 { font-size: 1.2rem; margin-bottom: 0.6rem; }
.service-card .service-desc { margin-bottom: 0; font-size: 0.9rem; line-height: 1.7; }
.service-card .service-icon { width: 40px; height: 40px; margin-bottom: 1.4rem; }

.process {
  list-style: none; display: grid; grid-template-columns: repeat(4, 1fr);
  margin-top: 3rem; border-top: 1px solid var(--border);
}
.process li {
  padding: 1.4rem 0 0; font-family: var(--head); font-weight: 600; font-size: 1rem;
  display: flex; align-items: baseline; gap: 0.8rem; position: relative;
}
.process li::before { content: ''; position: absolute; top: -4px; left: 0; width: 7px; height: 7px; background: var(--cyan); border-radius: 50%; }
.process li span { font-size: 0.72rem; letter-spacing: 0.14em; color: var(--cyan); font-weight: 500; }
.service-card::after, .game-card::after {
  content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--cyan); transition: width 0.4s ease;
}
.service-card:hover { background: var(--slate2); }
.service-card:hover::after, .game-card:hover::after { width: 100%; }
.service-icon { width: 48px; height: 48px; margin-bottom: 1.6rem; color: var(--cyan); }
.service-num { font-family: var(--head); font-size: 0.72rem; letter-spacing: 0.18em; color: var(--mid); text-transform: uppercase; margin-bottom: 0.8rem; }
.service-desc { font-size: 0.92rem; color: var(--mid); line-height: 1.8; margin-bottom: 1.6rem; }
.service-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cyan);
  border: 1px solid rgba(0,212,255,0.25); padding: 0.25rem 0.7rem; background: rgba(0,212,255,0.04);
}

/* ─── APPROACH ─── */
.approach-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem 8rem; align-items: start; }
.step { display: flex; gap: 1.6rem; padding: 2rem 0; border-bottom: 1px solid var(--border); }
.step:first-child { border-top: 1px solid var(--border); }
.step-num { font-family: var(--head); font-size: 0.72rem; letter-spacing: 0.14em; color: var(--cyan); text-transform: uppercase; min-width: 32px; padding-top: 0.2rem; }
.step-content h4 { font-family: var(--head); font-size: 1rem; font-weight: 600; margin-bottom: 0.4rem; }
.step-content p { font-size: 0.88rem; color: var(--mid); line-height: 1.75; }

/* ─── BOOKS ─── */
.books-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; flex-wrap: wrap; margin-bottom: 4rem; }
.books-head .section-intro { margin-bottom: 0; }
.books-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.4rem; }
.book { text-decoration: none; display: block; }
.book-cover {
  position: relative; aspect-ratio: 5 / 8; overflow: hidden; margin-bottom: 1.6rem;
  border: 1px solid var(--border); background: var(--navy);
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s;
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.book-cover::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,0.08) 50%, transparent 60%);
  transform: translateX(-100%); transition: transform 0.8s ease;
}
.book:hover .book-cover { transform: translateY(-8px); border-color: var(--cyan); box-shadow: 0 24px 60px rgba(0,0,0,0.5), 0 0 40px rgba(0,212,255,0.15); }
.book:hover .book-cover img { transform: scale(1.03); }
.book:hover .book-cover::after { transform: translateX(100%); }
.book h3 { margin-bottom: 0.6rem; }
.book-link { font-family: var(--head); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cyan); }

/* ─── GAMES ─── */
.games-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); }
.game-card { background: var(--navy); position: relative; overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.game-visual {
  position: relative; aspect-ratio: 16 / 7; overflow: hidden;
  background:
    radial-gradient(ellipse 60% 80% at 70% 0%, rgba(59,123,255,0.35), transparent 70%),
    linear-gradient(180deg, #060c1a, #0d1f3c);
  border-bottom: 1px solid var(--border);
}
.game-skyline {
  position: absolute; left: 0; right: 0; bottom: 0; height: 75%;
  background:
    repeating-linear-gradient(90deg, transparent 0 22px, rgba(0,212,255,0.10) 22px 23px),
    repeating-linear-gradient(0deg, transparent 0 14px, rgba(0,212,255,0.06) 14px 15px);
  -webkit-mask: linear-gradient(#000,#000) 0 100%/7% 55% no-repeat, linear-gradient(#000,#000) 9% 100%/6% 80% no-repeat,
    linear-gradient(#000,#000) 17% 100%/9% 45% no-repeat, linear-gradient(#000,#000) 28% 100%/5% 95% no-repeat,
    linear-gradient(#000,#000) 35% 100%/8% 65% no-repeat, linear-gradient(#000,#000) 45% 100%/6% 100% no-repeat,
    linear-gradient(#000,#000) 53% 100%/10% 50% no-repeat, linear-gradient(#000,#000) 65% 100%/5% 85% no-repeat,
    linear-gradient(#000,#000) 72% 100%/8% 60% no-repeat, linear-gradient(#000,#000) 82% 100%/6% 90% no-repeat,
    linear-gradient(#000,#000) 90% 100%/10% 40% no-repeat;
          mask: linear-gradient(#000,#000) 0 100%/7% 55% no-repeat, linear-gradient(#000,#000) 9% 100%/6% 80% no-repeat,
    linear-gradient(#000,#000) 17% 100%/9% 45% no-repeat, linear-gradient(#000,#000) 28% 100%/5% 95% no-repeat,
    linear-gradient(#000,#000) 35% 100%/8% 65% no-repeat, linear-gradient(#000,#000) 45% 100%/6% 100% no-repeat,
    linear-gradient(#000,#000) 53% 100%/10% 50% no-repeat, linear-gradient(#000,#000) 65% 100%/5% 85% no-repeat,
    linear-gradient(#000,#000) 72% 100%/8% 60% no-repeat, linear-gradient(#000,#000) 82% 100%/6% 90% no-repeat,
    linear-gradient(#000,#000) 90% 100%/10% 40% no-repeat;
  background-color: rgba(0,212,255,0.05);
}
.game-scan {
  position: absolute; top: 0; bottom: 0; width: 30%;
  background: linear-gradient(90deg, transparent, rgba(0,212,255,0.14), transparent);
  animation: scan 5s linear infinite;
}
@keyframes scan { from { left: -30%; } to { left: 100%; } }
.game-body { padding: 2.4rem; }
.status {
  display: inline-flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem;
  font-family: var(--head); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cyan);
}
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.3; } }
.game-cta { background: var(--slate); padding: 3rem 2.4rem; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }

/* ─── ABOUT ─── */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6rem; align-items: center; }
.about-visual { position: relative; height: 440px; border: 1px solid var(--border); background: var(--navy); overflow: hidden; }
#building-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.slider-dots { position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%); display: flex; gap: 0.2rem; z-index: 2; }
.sdot { width: 22px; height: 22px; border: none; background: none; cursor: pointer; padding: 8px; }
.sdot::before { content: ''; display: block; width: 6px; height: 6px; border-radius: 50%; border: 1px solid rgba(0,212,255,0.5); transition: background 0.3s; }
.sdot.active::before { background: var(--cyan); }
.about-text { color: var(--mid); font-size: 0.95rem; line-height: 1.85; margin-bottom: 1.2rem; }
.about-pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-top: 2.4rem; }
.pillar { border-left: 2px solid var(--cyan); padding: 0.6rem 0 0.6rem 1rem; }
.pillar-title { font-family: var(--head); font-size: 0.88rem; font-weight: 600; margin-bottom: 0.2rem; }
.pillar-text { font-size: 0.8rem; color: var(--mid); }

/* ─── CONTACT ─── */
.contact-block { max-width: 720px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; }
.contact-block .section-intro { margin: 0 auto 2.4rem; }
.contact-big-email {
  font-family: var(--head); font-weight: 700; letter-spacing: -0.03em; text-decoration: none;
  font-size: clamp(1.6rem, 6vw, 3.4rem); color: var(--cyan); margin-bottom: 2.4rem;
  overflow-wrap: anywhere; transition: text-shadow 0.3s;
}
.contact-big-email:hover { text-shadow: 0 0 30px rgba(0,212,255,0.45); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.contact-actions .btn-ghost { font-family: var(--head); }

/* ─── FOOTER ─── */
footer {
  position: relative; z-index: 1; border-top: 1px solid var(--border); background: var(--slate);
  padding: 3rem 5vw; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.4rem;
}
.footer-logo { height: 28px; width: auto; }
.footer-copy { font-size: 0.78rem; color: var(--mid); letter-spacing: 0.04em; }
.footer-links { display: flex; flex-wrap: wrap; gap: 2rem; list-style: none; }
.footer-links a { font-size: 0.78rem; color: var(--mid); text-decoration: none; letter-spacing: 0.06em; transition: color 0.2s; }
.footer-links a:hover { color: var(--cyan); }

/* ─── MOBILE MENU ─── */
.mobile-menu {
  display: none; position: fixed; inset: 0; z-index: 200; background: rgba(10,14,26,0.97);
  flex-direction: column; align-items: center; justify-content: center; gap: 2.2rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a { font-family: var(--head); font-size: 1.6rem; font-weight: 600; text-decoration: none; letter-spacing: -0.02em; transition: color 0.2s; }
.mobile-menu a:hover { color: var(--cyan); }
.mobile-menu-close { position: absolute; top: 1.4rem; right: 5vw; background: none; border: none; color: var(--fog); font-size: 1.8rem; cursor: pointer; }

/* ─── SCROLL REVEAL ─── */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

/* ─── RESPONSIVE ─── */
@media (max-width: 1000px) {
  .nav-links { gap: 1.6rem; }
  .approach-grid { gap: 3rem 4rem; }
  .about-grid { gap: 4rem; }
}
@media (max-width: 900px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(2) { border-right: none; }
  .metric:nth-child(3), .metric:nth-child(4) { border-top: 1px solid var(--border); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .approach-grid, .about-grid, .games-grid { grid-template-columns: 1fr; }
  .approach-grid { gap: 3rem; }
  .books-grid { grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
  .book h3 { font-size: 1.1rem; }
  .about-visual { height: 360px; }
}
@media (max-width: 760px) {
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
  .logo img { height: 28px; }
}
@media (max-width: 680px) {
  section { padding: 5rem 5vw; }
  .site-nav, section, .metrics, footer { padding-left: 16px; padding-right: 16px; }
  .hero-scroll-hint { display: none; }
  .metric { padding: 1.8rem 1rem; }
  .metric-num { font-size: 1.9rem; }
  .service-card, .game-body, .game-cta { padding: 2.2rem 1.4rem; }
  .about-pillars, .services-grid { grid-template-columns: 1fr; }
  .process { grid-template-columns: repeat(2, 1fr); row-gap: 1.4rem; }
  .process li:nth-child(n+3) { border-top: 1px solid var(--border); }
  .process li:nth-child(n+3)::before { top: -4px; }
  .books-grid { grid-template-columns: 1fr; max-width: 320px; gap: 3rem; }
  .about-visual { height: 300px; }
  footer { flex-direction: column; align-items: flex-start; }
}

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