/* ==========================================================
   KEVOY — Design tokens
   All colors, type and spacing are defined once here as
   CSS custom properties, so the whole site can be restyled
   by changing values in one place.
   ========================================================== */
:root {
  /* Colors — pulled from the KEVOY logo's blue gradient */
  --bg: #0a0a0f;
  --surface: #121218;
  --surface-raised: #17171f;
  --border: #23232e;
  --text: #f2f2f5;
  --muted: #9a9aa8;
  --accent: #3d7fff;
  --accent-light: #6fa8ff;

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

  /* Layout */
  --container-width: 1180px;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; color: var(--muted); max-width: 62ch; }

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

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 96px 0; }

.section-lead { font-size: 1.05rem; margin-bottom: 48px; }

/* Focus visibility, kept consistent across every interactive element */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* ==========================================================
   Buttons
   ========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #06060a;
}
.btn-primary:hover { filter: brightness(1.08); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--accent-light); }

.btn-small { padding: 9px 18px; font-size: 0.85rem; }

/* ==========================================================
   Navigation
   ========================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand-mark { height: 34px; width: auto; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.main-nav a:not(.nav-cta) {
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 0.15s ease;
}
.main-nav a:not(.nav-cta):hover { color: var(--text); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle span {
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.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); }

/* ==========================================================
   Hero
   ========================================================== */
.hero { padding-top: 110px; padding-bottom: 110px; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  color: var(--accent-light);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.hero-lead { font-size: 1.1rem; }

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

.hero-visual {
  display: flex;
  justify-content: center;
  animation: hero-rise 0.8s ease both;
}

.hero-logo { width: 100%; max-width: 340px; }

@keyframes hero-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================
   About
   ========================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 64px;
  align-items: start;
}

.about-note { color: var(--text); font-weight: 500; }

.journey {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
}

.journey li {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 18px 0 18px 24px;
  border-bottom: 1px solid var(--border);
}
.journey li:last-child { border-bottom: none; }

.journey-index {
  font-family: var(--font-display);
  color: var(--accent-light);
  font-size: 0.95rem;
}

.journey-label {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--text);
}

/* ==========================================================
   Services
   ========================================================== */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.service-card:hover { border-color: var(--accent); transform: translateY(-3px); }

.service-card ul {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.service-card li {
  color: var(--muted);
  font-size: 0.92rem;
  padding: 4px 0;  
}

/* ==========================================================
   Selected Work
   ========================================================== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.project-card:hover { border-color: var(--accent); transform: translateY(-3px); }

.project-thumb { border-bottom: 1px solid var(--border); background: #000; }
.project-thumb img { width: 100%; height: 220px; object-fit: cover; object-position: top; }

.project-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }

.project-category {
  color: var(--accent-light);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.project-tech {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0 0 20px;
}
.project-tech li {
  font-size: 0.78rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 10px;
}

.project-body .btn { margin-top: auto; align-self: flex-start; }

/* Project detail modal */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.project-modal[hidden] { display: none; }

.project-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 6, 10, 0.8);
}

.project-modal-panel {
  position: relative;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 900px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 32px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
}

.project-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
}

.project-modal-images { display: flex; flex-direction: column; gap: 12px; }
.project-modal-images img { border-radius: 8px; border: 1px solid var(--border); }

.project-modal-info h4 {
  margin-top: 24px;
  font-size: 0.95rem;
  color: var(--text);
}
.project-modal-info ul { padding-left: 20px; color: var(--muted); }
.project-modal-info li { margin-bottom: 6px; }
.modal-role, .modal-live { font-size: 0.92rem; color: var(--muted); }
.modal-role strong, .modal-live strong { color: var(--text); }

/* ==========================================================
   How It Works
   ========================================================== */
.process-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: none;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--border);
}

.process-list li {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

.process-index {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--accent-light);
}

.process-list h3 { margin-bottom: 4px; }
.process-list p { margin-bottom: 0; }

/* ==========================================================
   Why KEVOY
   ========================================================== */
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
}

.why-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
}

.why-list li {
  position: relative;
  padding-left: 22px;
  color: var(--text);
  font-size: 0.98rem;
}
.why-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
}

/* ==========================================================
   Future Vision
   ========================================================== */
.future {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.future-inner { max-width: 720px; }
.future p { font-size: 1.05rem; }

/* ==========================================================
   Contact
   ========================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 56px;
}

.contact-details {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.contact-details dt {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: none;
}
.contact-details dd {
  margin: 2px 0 0;
  font-family: var(--font-display);
  color: var(--text);
  font-size: 1.05rem;
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.form-row { margin-bottom: 20px; display: flex; flex-direction: column; gap: 8px; }

.form-row label { font-size: 0.9rem; color: var(--text); }

.form-row input,
.form-row select,
.form-row textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: var(--accent);
}

.form-row textarea { resize: vertical; }

.form-note {
  margin: 16px 0 0;
  font-size: 0.9rem;
  color: var(--accent-light);
  max-width: none;
}

/* ==========================================================
   Footer
   ========================================================== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 24px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
  align-items: flex-start;
}

.footer-mark { height: 26px; margin-bottom: 8px; }
.footer-brand p { font-size: 0.88rem; margin: 0; }

.footer-nav, .footer-social {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-nav a, .footer-social a {
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-nav a:hover, .footer-social a:hover { color: var(--text); }

.footer-copy {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  margin: 40px 0 0;
}

/* ==========================================================
   Responsive — tablet
   ========================================================== */
@media (max-width: 900px) {
  .service-grid,
  .project-grid { grid-template-columns: 1fr 1fr; }
  .about-grid,
  .why-grid,
  .contact-grid { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 240px; margin: 0 auto; }
  .why-list { grid-template-columns: 1fr; }
  .project-modal-panel { grid-template-columns: 1fr; }
}

/* ==========================================================
   Responsive — mobile
   ========================================================== */
@media (max-width: 640px) {
  section { padding: 64px 0; }

  .service-grid,
  .project-grid { grid-template-columns: 1fr; }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 16px 24px 24px;
    gap: 18px;
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav .nav-cta { text-align: center; margin-top: 8px; }

  .nav-toggle { display: flex; }

  .process-list li { grid-template-columns: 48px 1fr; }
}
