:root {
  --bg: #FFFFFF;
  --bg-subtle: #F7F9F9;
  --text: #14181F;
  --text-muted: #4B5563;
  --text-faint: #8A93A0;
  --border: #E5E8EB;
  --accent: #0F6B62;
  --accent-dark: #0B4F49;
  --accent-tint: #E7F1EF;
  --live: #0F6B62;
  --dev: #B08900;
  --dev-bg: #FBF4DF;
  --live-bg: #E7F1EF;
  --radius: 10px;
  --max-width: 1080px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

a { color: inherit; }

.inline-link {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.15s ease;
}

.inline-link:hover { text-decoration-color: var(--accent); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.logo-mark { flex-shrink: 0; border-radius: 10px; }

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14.5px;
  font-weight: 500;
}

.nav a {
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.nav a:hover { color: var(--text); }

.nav-cta {
  background: var(--text);
  color: #fff !important;
  padding: 9px 16px;
  border-radius: 8px;
}

.nav-cta:hover { background: var(--accent-dark) !important; color: #fff !important; }

/* Hero */
.hero {
  padding: 96px 0 72px;
  border-bottom: 1px solid var(--border);
}

.hero { position: relative; overflow: hidden; }

.hero-blob {
  position: absolute;
  top: -180px;
  right: -160px;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(15,107,98,0.14) 0%, rgba(15,107,98,0.05) 45%, rgba(15,107,98,0) 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 56px;
  align-items: center;
}

.hero-photo { position: relative; }

.hero-photo-ring {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 100%;
  height: 100%;
  border: 2px solid var(--accent);
  border-radius: 20px;
  z-index: 0;
  opacity: 0.35;
}

.hero-photo img {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px -20px rgba(20, 24, 31, 0.25);
}

/* Stats */
.stats {
  background: var(--accent-dark);
  padding: 44px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.stat-tile {
  text-align: center;
  color: #fff;
}

.stat-number {
  display: block;
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.stat-label {
  display: block;
  font-size: 13.5px;
  color: rgba(255,255,255,0.75);
  max-width: 26ch;
  margin: 0 auto;
}

.eyebrow {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 20px;
}

.hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0 0 24px;
  max-width: 16ch;
}

.hero-sub {
  font-size: 19px;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 0 36px;
}

.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-weight: 600;
  font-size: 15.5px;
  padding: 13px 24px;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover { background: var(--accent-dark); }

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover { border-color: var(--text); }

.hero-tags {
  font-size: 13.5px;
  color: var(--text-faint);
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Section labels */
.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin: 0 0 20px;
}

.section-label .index {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.section-note {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 640px;
  margin: 0 0 40px;
}

/* About */
.about { padding: 80px 0; border-bottom: 1px solid var(--border); }

.about-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
}

.about-copy p {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 680px;
}

.about-copy p:first-child { color: var(--text); }

/* Systems / case studies */
.systems { padding: 80px 0; border-bottom: 1px solid var(--border); background: var(--bg-subtle); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.case-card {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.case-card:hover {
  border-color: var(--accent);
  box-shadow: 0 16px 32px -18px rgba(20, 24, 31, 0.18);
  transform: translateY(-3px);
}

.case-watermark {
  position: absolute;
  top: -14px;
  right: 4px;
  font-size: 76px;
  font-weight: 800;
  color: var(--accent-tint);
  z-index: 0;
  line-height: 1;
  user-select: none;
}

.case-card > *:not(.case-watermark) {
  position: relative;
  z-index: 1;
}

.case-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.case-id {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}

.status {
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.status-live { background: var(--live-bg); color: var(--live); }
.status-dev { background: var(--dev-bg); color: var(--dev); }

.case-card h3 {
  font-size: 20px;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

.case-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin: 16px 0 4px;
}

.case-card > p:not(.case-label) {
  font-size: 14.5px;
  color: var(--text-muted);
  margin: 0;
}

/* Services */
.services { padding: 80px 0; border-bottom: 1px solid var(--border); }

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent-tint);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.icon-badge svg { width: 22px; height: 22px; }

.icon-badge-sm {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.icon-badge-sm svg { width: 18px; height: 18px; }

.service-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.service-card:hover {
  border-color: var(--accent);
  box-shadow: 0 16px 32px -18px rgba(20, 24, 31, 0.16);
  transform: translateY(-3px);
}

.service-card h3 {
  font-size: 17.5px;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}

.service-card p {
  font-size: 14.5px;
  color: var(--text-muted);
  margin: 0;
}

.service-secondary {
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.service-secondary-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  margin: 0 0 14px;
}

.service-secondary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.service-secondary-item {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-subtle);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.service-secondary-item:hover {
  border-color: var(--accent);
  background: #fff;
  transform: translateY(-2px);
}

.service-secondary-item h4 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: -0.005em;
}

.service-secondary-item p {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0;
}

/* Contact */
.contact { padding: 96px 0; background: var(--text); color: #fff; }

.contact-inner { text-align: center; max-width: 620px; margin: 0 auto; }

.contact h2 {
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

.contact p {
  color: rgba(255,255,255,0.7);
  font-size: 17px;
  margin: 0 0 36px;
}

.contact-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.contact-links a {
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 22px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.25);
  transition: all 0.15s ease;
}

.contact-links a:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.08);
}

/* Footer */
.site-footer { padding: 32px 0; }

.site-footer p {
  font-size: 13px;
  color: var(--text-faint);
  margin: 0;
  text-align: center;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.card-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.card-grid .reveal:nth-child(3) { transition-delay: 0.16s; }

.service-grid .reveal:nth-child(2) { transition-delay: 0.06s; }
.service-grid .reveal:nth-child(3) { transition-delay: 0.12s; }
.service-grid .reveal:nth-child(4) { transition-delay: 0.18s; }

.service-secondary-grid .reveal:nth-child(2) { transition-delay: 0.05s; }
.service-secondary-grid .reveal:nth-child(3) { transition-delay: 0.1s; }
.service-secondary-grid .reveal:nth-child(4) { transition-delay: 0.15s; }
.service-secondary-grid .reveal:nth-child(5) { transition-delay: 0.2s; }

.stats-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.stats-grid .reveal:nth-child(3) { transition-delay: 0.16s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Responsive */
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 20px; }
  .card-grid { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: 1fr; }
  .nav { gap: 16px; }
  .nav a:not(.nav-cta) { display: none; }
  .hero { padding: 64px 0 48px; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-photo { order: -1; max-width: 180px; }
  .hero-blob { width: 360px; height: 360px; top: -120px; right: -140px; }
  .service-secondary-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; gap: 28px; }
}
