:root {
  --yellow: #ffcc19;
  --cream: #fff9cf;
  --ink: #080808;
  --muted: #5f520f;
  --white: #ffffff;
  --line: rgba(8, 8, 8, 0.16);
  --green: #00ff55;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--yellow);
  line-height: 1.5;
}

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

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

.page {
  min-height: 100vh;
  overflow: hidden;
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 72px);
  background: rgba(255, 204, 25, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--cream);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 850;
}

.nav-links a {
  padding: 10px 14px;
  border-radius: 999px;
  transition: background 160ms ease, color 160ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: var(--ink);
  color: var(--yellow);
  outline: none;
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.78fr);
  align-items: center;
  gap: clamp(32px, 6vw, 88px);
  min-height: calc(100vh - 82px);
  padding: clamp(48px, 7vw, 92px) clamp(20px, 5vw, 72px) 64px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: var(--ink);
}

h1 {
  max-width: 880px;
  margin: 0;
  font-size: clamp(54px, 10vw, 120px);
  line-height: 0.88;
  letter-spacing: 0;
  text-transform: uppercase;
  overflow-wrap: break-word;
  word-break: break-word;
}

.hero-copy {
  max-width: 690px;
  margin: 26px 0 0;
  color: #2a2305;
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 650;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: none;
  appearance: none;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--ink);
  outline: none;
}

.button.primary {
  background: var(--ink);
  color: var(--yellow);
}

.button.secondary {
  background: var(--cream);
  color: var(--ink);
}

.logo-panel {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 430px;
  padding: 32px;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: var(--cream);
  box-shadow: 14px 14px 0 var(--ink);
  animation: riseIn 780ms ease both, floatSoft 5.8s ease-in-out infinite 780ms;
}

.logo-panel img {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  border-radius: 6px;
}

.logo-panel::before,
.logo-panel::after {
  content: "0101 CODE RAIN PLAY WORD 1100";
  position: absolute;
  top: -18px;
  bottom: -18px;
  width: 22px;
  overflow: hidden;
  color: rgba(0, 0, 0, 0.5);
  font-family: "Courier New", monospace;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  writing-mode: vertical-rl;
  text-orientation: upright;
  animation: digitalFall 5s linear infinite;
}

.logo-panel::before {
  left: 18px;
}

.logo-panel::after {
  right: 18px;
  animation-duration: 7s;
  animation-delay: -2s;
}

/* ---------- Section shells ---------- */

.section {
  padding: clamp(56px, 8vw, 100px) clamp(20px, 5vw, 72px);
}

.dark {
  color: var(--white);
  background:
    linear-gradient(rgba(8, 8, 8, 0.92), rgba(8, 8, 8, 0.96)),
    repeating-linear-gradient(90deg, rgba(0, 255, 85, 0.12) 0 2px, transparent 2px 38px),
    var(--ink);
}

.rain-section {
  position: relative;
  overflow: hidden;
}

.rain-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.section-inner,
.footer-inner {
  position: relative;
  z-index: 1;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 30px;
}

.section h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 76px);
  line-height: 0.95;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-lead {
  max-width: 560px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 17px;
  font-weight: 650;
}

/* ---------- Services grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.service {
  min-height: 230px;
  padding: 28px;
  border: 1px solid rgba(255, 204, 25, 0.28);
  border-radius: 8px;
  background: #141414;
  transition: transform 180ms ease, border-color 180ms ease;
}

.service:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 204, 25, 0.72);
}

.service strong {
  display: block;
  margin-bottom: 16px;
  color: var(--yellow);
  font-size: 22px;
  text-transform: uppercase;
}

.service p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-weight: 550;
}

.grid .service:nth-child(1) { --reveal-delay: 0ms; }
.grid .service:nth-child(2) { --reveal-delay: 110ms; }
.grid .service:nth-child(3) { --reveal-delay: 220ms; }

/* ---------- Featured project ---------- */

.project {
  display: grid;
  grid-template-columns: minmax(280px, 0.74fr) minmax(320px, 1fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  padding: clamp(30px, 5vw, 56px);
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: var(--cream);
  box-shadow: 10px 10px 0 var(--ink);
}

.project-badge {
  display: inline-flex;
  margin-bottom: 20px;
  padding: 8px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.project h2 {
  color: var(--ink);
}

.project p {
  margin: 22px 0 0;
  color: #2d2607;
  font-size: 18px;
  font-weight: 650;
}

.feature-list {
  display: grid;
  gap: 10px;
  margin: 26px 0 0;
  padding: 0;
  color: #211b04;
  font-weight: 850;
  list-style: none;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.feature-list li::before {
  content: "";
  width: 10px;
  height: 10px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 255, 85, 0.2), 0 0 14px rgba(0, 255, 85, 0.8);
}

.store-note {
  display: inline-flex;
  margin-top: 18px;
  color: #2d2607;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.project-media {
  position: relative;
  min-height: 640px;
}

.asset-card {
  width: min(100%, 620px);
  border: 3px solid var(--ink);
  border-radius: 8px;
  box-shadow: 9px 9px 0 var(--ink);
}

.screenshots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
  margin-top: 22px;
}

.shot {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top center;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: #030303;
  box-shadow: 6px 6px 0 var(--ink);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.shot:hover {
  transform: translateY(-6px);
  box-shadow: 9px 9px 0 var(--ink);
}

.shot:nth-child(2) {
  margin-top: 44px;
}

.shot:nth-child(3) {
  margin-top: 12px;
}

.screenshots .shot:nth-child(1) { --reveal-delay: 0ms; }
.screenshots .shot:nth-child(2) { --reveal-delay: 130ms; }
.screenshots .shot:nth-child(3) { --reveal-delay: 260ms; }

/* ---------- Footer ---------- */

.footer-main {
  color: var(--white);
  background:
    linear-gradient(rgba(5, 5, 5, 0.94), rgba(5, 5, 5, 0.98)),
    repeating-linear-gradient(90deg, rgba(0, 255, 85, 0.1) 0 2px, transparent 2px 38px),
    #050505;
  padding: clamp(48px, 7vw, 88px) clamp(20px, 5vw, 72px) 0;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: clamp(32px, 6vw, 80px);
  padding-bottom: clamp(40px, 6vw, 64px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.footer-about .brand {
  margin-bottom: 16px;
}

.footer-about p {
  max-width: 380px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
}

.footer-link {
  display: inline-flex;
  margin: 0 18px 8px 0;
  color: var(--yellow);
  font-weight: 800;
}

.footer-link:hover,
.footer-link:focus-visible {
  text-decoration: underline;
  outline: none;
}

.footer-form h2 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 0.95;
  text-transform: uppercase;
  color: var(--white);
}

.footer-form > p {
  max-width: 480px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
}

#contact-form {
  display: grid;
  gap: 16px;
  max-width: 480px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: #101010;
  color: var(--white);
  font: inherit;
  font-weight: 600;
  resize: vertical;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(255, 204, 25, 0.25);
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

#contact-form .button {
  width: fit-content;
  box-shadow: 5px 5px 0 var(--yellow);
}

#contact-form .button:hover,
#contact-form .button:focus-visible {
  box-shadow: 2px 2px 0 var(--yellow);
}

#contact-form .button[disabled] {
  opacity: 0.65;
  cursor: progress;
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--yellow);
}

.form-status {
  margin: 0;
  min-height: 20px;
  font-size: 14px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.7);
}

.form-status.success {
  color: var(--green);
}

.form-status.error {
  color: #ff6b5b;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0 24px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  font-weight: 700;
}

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease, transform 700ms ease;
  transition-delay: var(--reveal-delay, 0ms);
}

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

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

@keyframes floatSoft {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(0.6deg);
  }
}

@keyframes digitalFall {
  from {
    transform: translateY(-18%);
  }
  to {
    transform: translateY(18%);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero,
  .project {
    grid-template-columns: 1fr;
  }

  .footer-top {
    grid-template-columns: 1fr;
  }

  .logo-panel {
    min-height: 280px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: block;
  }

  .section-lead {
    margin-top: 16px;
  }

  .project-media {
    min-height: auto;
  }
}

@media (max-width: 620px) {
  .nav {
    position: relative;
    align-items: flex-start;
    flex-direction: column;
  }

  .logo-panel::before {
    left: 5px;
}
.logo-panel::after {
    right: 6px;
}
  .nav-links {
    width: 100%;
    justify-content: space-between;
    gap: 4px;
  }

  .nav-links a {
    padding: 8px 5px;
  }

  .hero {
    min-height: auto;
    padding-top: 44px;
  }

  h1 {
    font-size: clamp(38px, 12vw, 64px);
  }

  .logo-panel,
  .project,
  .asset-card,
  .shot {
    box-shadow: 7px 7px 0 var(--ink);
  }

  .screenshots {
    grid-template-columns: 1fr;
  }

  .shot {
    max-height: 620px;
    object-fit: contain;
  }

  .shot:nth-child(2),
  .shot:nth-child(3) {
    margin-top: 0;
  }

  .footer-bottom {
    display: block;
  }

  .footer-bottom span {
    display: block;
    margin-bottom: 6px;
  }
}
