/* =============================================================
   edev.io — Stylesheet
   Organisation: tokens → resets → utilities → components → sections
   ============================================================= */

/* ── Design tokens ───────────────────────────────────────── */
:root {
  --bg:          oklch(98.5% 0.005 250);
  --bg-warm:     oklch(97% 0.006 90);
  --surface:     oklch(100% 0 0);
  --border:      oklch(91% 0.006 250);
  --border-mid:  oklch(86% 0.008 250);
  --text:        oklch(18% 0.01 250);
  --text-mid:    oklch(42% 0.012 250);
  --text-soft:   oklch(48% 0.01 250);
  --accent:      #3076b9;
  --accent-dim:  #2d6ea8;
  --accent-bg:   #eef4fb;
  --cta:         #c45516;
  --cta-hover:   #a83e0e;
  --mono:        'JetBrains Mono', monospace;
  --serif:       'DM Serif Display', Georgia, serif;
  --sans:        'DM Sans', system-ui, sans-serif;
  --radius:      6px;
  --radius-lg:   12px;
  --shadow-sm:   0 1px 3px oklch(18% 0.01 250 / 0.06), 0 1px 2px oklch(18% 0.01 250 / 0.04);
  --shadow-md:   0 4px 16px oklch(18% 0.01 250 / 0.08), 0 1px 4px oklch(18% 0.01 250 / 0.04);
  --shadow-lg:   0 12px 40px oklch(18% 0.01 250 / 0.10), 0 2px 8px oklch(18% 0.01 250 / 0.05);
  --max-w:       1160px;
}

/* ── Reset & base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; }

/* ── Skip link (a11y) ────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 9999;
  padding: 10px 18px;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius);
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

/* ── Visually-hidden (for honeypot) ──────────────────────── */
.visually-hidden {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* ── Utilities ───────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 40px; }
@media (max-width: 768px) { .container { padding: 0 24px; } }

.label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}

/* ── Scroll reveal ───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── Navigation ──────────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: oklch(98.5% 0.005 250 / 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}
.site-nav.is-scrolled { box-shadow: var(--shadow-sm); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
}
@media (max-width: 768px) { .nav-inner { padding: 0 24px; } }

.nav-logo {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  position: relative;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-mid);
  transition: color 0.2s ease;
}
.nav-links li:not(:last-child) a::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -6px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links li:not(:last-child) a:hover::after { transform: scaleX(1); }

.nav-cta {
  font-size: 13px;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: var(--radius);
  border: 1.5px solid var(--cta);
  color: var(--cta) !important;
  transition: background 0.2s, color 0.2s !important;
}
.nav-cta:hover { background: var(--cta) !important; color: white !important; }

@media (max-width: 640px) {
  .nav-links { display: none; }
}

/* ── Sticky mobile CTA ───────────────────────────────────── */
/* WCAG 2.5.5 (AAA, 44px+), Apple HIG (44pt), Material (48dp).
   56px min-height + 17px text for primary-action comfort. */
.mobile-cta {
  display: none;
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  min-height: 56px;
  padding: 16px 28px;
  background: var(--cta);
  color: white !important;
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(15, 23, 42, 0.04);
  transition: opacity 0.25s ease, transform 0.25s ease;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.mobile-cta svg { width: 16px; height: 16px; flex-shrink: 0; }
.mobile-cta:active { transform: translateY(1px); }
.mobile-cta.is-hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}
@media (max-width: 640px) {
  .mobile-cta { display: flex; }
  .site-footer { padding-bottom: calc(48px + 80px + env(safe-area-inset-bottom, 0px)); }
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn-primary,
.btn-secondary,
.form-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  transition: background 0.2s, transform 0.15s, color 0.2s, border-color 0.2s;
}
.btn-primary, .form-submit {
  background: var(--text);
  color: var(--bg);
}
.btn-primary:hover, .form-submit:hover { background: var(--cta); transform: translateY(-1px); }

.btn-secondary {
  background: transparent;
  color: var(--text-mid);
  font-weight: 400;
  border: 1.5px solid var(--border-mid);
}
.btn-secondary:hover { border-color: var(--text-mid); color: var(--text); transform: translateY(-1px); }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 160px 0 120px;
  overflow: hidden;
}
.hero-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-content { position: relative; z-index: 2; }
.hero-label { margin-bottom: 24px; }
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  font-weight: 400;
  max-width: 800px;
  color: var(--text);
  margin-bottom: 28px;
  text-wrap: pretty;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero-sub {
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.65;
  color: var(--text-mid);
  max-width: 560px;
  font-weight: 300;
  margin-bottom: 44px;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ── Section shell ───────────────────────────────────────── */
section { padding: 100px 0; }
.section-header { margin-bottom: 56px; }
.section-header h2 {
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-top: 12px;
  text-wrap: pretty;
}
.section-header p {
  margin-top: 16px;
  font-size: 17px;
  color: var(--text-mid);
  line-height: 1.7;
  max-width: 600px;
  font-weight: 300;
}
.section-divider { border: none; border-top: 1px solid var(--border); margin: 0; }

/* ── Services ────────────────────────────────────────────── */
#services { background: var(--surface); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.service-card {
  background: var(--surface);
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: background 0.25s;
}
@media (max-width: 860px) { .services-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .services-grid { grid-template-columns: 1fr; } }
.service-card:hover { background: var(--accent-bg); }

.service-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.25s, background 0.25s;
}
.service-card:hover .service-icon {
  background: var(--accent-bg);
  border-color: var(--accent-dim);
}
.service-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.service-card h3 {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.service-card p {
  font-size: 14.5px;
  color: var(--text-mid);
  line-height: 1.7;
  font-weight: 300;
}
.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
  list-style: none;
}
.service-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-soft);
}

/* ── Stack ───────────────────────────────────────────────── */
#stack { background: var(--bg); }
.stack-categories {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 32px;
}
@media (max-width: 900px) { .stack-categories { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .stack-categories { grid-template-columns: 1fr; } }

.stack-category h3 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.stack-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
}
.stack-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-mid);
  font-weight: 400;
}
.stack-item::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  opacity: 0.7;
}

/* ── Team ────────────────────────────────────────────────── */
#team { background: var(--surface); }
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(460px, 1fr));
  gap: 24px;
}
@media (max-width: 560px) { .team-grid { grid-template-columns: 1fr; } }

.team-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 36px 32px;
  background: var(--bg);
  transition: box-shadow 0.25s, transform 0.2s;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.team-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.team-card-header {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}
.team-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent-bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  flex-shrink: 0;
  letter-spacing: 0.04em;
}
.team-meta { flex: 1; }
.team-meta h3 {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 5px;
}
.team-title {
  font-size: 13px;
  color: var(--text-soft);
  font-weight: 400;
  line-height: 1.4;
}
.team-bio {
  font-size: 14.5px;
  color: var(--text-mid);
  line-height: 1.75;
  font-weight: 300;
}
.team-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
}
.team-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--accent-bg);
  border: 1px solid #b8d4ef;
  color: var(--accent);
}

/* ── Contact ─────────────────────────────────────────────── */
#contact { background: var(--bg); }
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
@media (max-width: 768px) { .contact-inner { grid-template-columns: 1fr; gap: 40px; } }

.contact-left h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 12px 0 20px;
  text-wrap: pretty;
}
.contact-left p {
  font-size: 16px;
  color: var(--text-mid);
  line-height: 1.7;
  font-weight: 300;
}
.contact-detail {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contact-detail a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--text-mid);
  transition: color 0.2s;
}
.contact-detail a:hover { color: var(--accent); }
.contact-detail a svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.form-input, .form-textarea {
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 300;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-input:focus, .form-textarea:focus {
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 3px rgba(48, 118, 185, 0.15);
}
.form-textarea { resize: vertical; min-height: 120px; line-height: 1.6; }
.form-submit { align-self: flex-start; }

.form-status {
  font-size: 14px;
  font-family: var(--mono);
  margin-top: 4px;
}
.form-status.is-ok    { color: var(--accent); }
.form-status.is-error { color: var(--cta); }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  background: var(--text);
  color: oklch(60% 0.01 250);
  padding: 48px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-logo {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  color: oklch(88% 0.008 250);
}
.footer-logo span { color: var(--cta); }
.footer-links {
  display: flex;
  gap: 28px;
  list-style: none;
}
.footer-links a {
  font-size: 13px;
  color: oklch(55% 0.01 250);
  transition: color 0.2s;
}
.footer-links a:hover { color: oklch(85% 0.01 250); }
.footer-copy {
  font-size: 12px;
  color: oklch(40% 0.008 250);
  font-family: var(--mono);
}
