/* ===== Colour System (Light Theme) ===== */
:root {
  /* Base */
  --c-bg: #f5f7fb;
  --c-bg-soft: #eef2fb;
  --c-surface: #ffffff;
  --c-surface-elevated: #ffffff;
  --c-ink: #050816;      /* near black */
  --c-ink-soft: #475569;
  --c-border: #d4dbe7;
  --c-muted: #94a3b8;

  /* Brand blue */
  --c-accent: #009cff;       /* your blue */
  --c-accent-dark: #0076c4;  /* slightly darker */
  --c-accent-soft: #e0f3ff;  /* pale blue */
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--c-ink);
  background-color: var(--c-bg);
  line-height: 1.6;
}

/* ===== Layout Helpers ===== */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Header / Nav ===== */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 247, 251, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(212, 219, 231, 0.9);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

header::after {
  content: "";
  display: block;
  height: 2px;
  background: linear-gradient(90deg, var(--c-accent), transparent);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Logo image */
.nav-logo {
  height: 32px;
  width: auto;
  display: block;
}

/* legacy circle (unused now, safe to keep) */
.nav-logo-circle {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #0f172a;
  border: 2px solid var(--c-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f9fafb;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
}

.nav-brand-text {
  display: flex;
  flex-direction: column;
}

.nav-brand-text span:first-child {
  font-size: 0.9rem;
  font-weight: 600;
}

.nav-brand-text span:last-child {
  font-size: 0.78rem;
  color: var(--c-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.9rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--c-ink-soft);
  position: relative;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--c-ink);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 0;
  height: 2px;
  background: var(--c-accent);
  transition: width 0.18s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-cta {
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--c-accent);
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--c-accent-dark);
  background: rgba(224, 243, 255, 0.85);
  transition: background 0.18s ease, color 0.18s ease, transform 0.1s ease, box-shadow 0.1s ease;
}

.nav-cta:hover {
  background: var(--c-accent-dark);
  color: #f9fafb;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 156, 255, 0.4);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
}

.nav-toggle-line {
  width: 20px;
  height: 2px;
  background: var(--c-ink);
  margin: 3px 0;
  border-radius: 999px;
}

.case-hero-img {
  width: 100%;
  border-radius: 1rem;
  box-shadow: 0 24px 60px rgba(0,0,0,0.20);
  margin-bottom: 2.5rem;
}

/* ===== Hero (Home) ===== */
.hero {
  padding: 3.5rem 0 3.2rem;
  background:
    radial-gradient(circle at top left, rgba(0, 156, 255, 0.25), transparent 55%),
    radial-gradient(circle at bottom right, rgba(148, 163, 184, 0.16), transparent 60%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}

.hero-kicker {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--c-muted);
  margin-bottom: 0.6rem;
}

.hero-title {
  font-size: 2.4rem;
  line-height: 1.1;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
}

.hero-title span.highlight {
  background: linear-gradient(120deg, var(--c-accent-dark), var(--c-accent));
  color: #f9fafb;
  padding: 0.12em 0.3em;
  border-radius: 0.55rem;
  box-shadow: 0 10px 26px rgba(0, 156, 255, 0.45);
}

.hero-subtitle {
  font-size: 0.98rem;
  color: var(--c-ink-soft);
  max-width: 34rem;
  margin-bottom: 1.4rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.hero-tag {
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  font-size: 0.8rem;
  color: var(--c-ink-soft);
  background: rgba(255, 255, 255, 0.9);
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--c-accent-dark), var(--c-accent));
  color: #f9fafb;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--c-accent), var(--c-accent-dark));
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 156, 255, 0.5);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.7);
  color: var(--c-ink-soft);
}

.btn-ghost:hover {
  background: rgba(15, 23, 42, 0.04);
  color: var(--c-ink);
}

.hero-note {
  font-size: 0.78rem;
  color: var(--c-muted);
}

/* Hero right */
.hero-card {
  border-radius: 1.25rem;
  background: radial-gradient(circle at top, #0f172a, #020617);
  color: #e5e7eb;
  padding: 1.5rem 1.6rem;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.75);
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at top right, rgba(0, 156, 255, 0.25), transparent 60%);
  opacity: 0.9;
  pointer-events: none;
}

.hero-card-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #9ca3af;
  margin-bottom: 0.7rem;
}

.hero-card-title {
  font-size: 1.1rem;
  margin-bottom: 0.7rem;
}

.hero-card-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  background: rgba(15, 23, 42, 0.9);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  margin-bottom: 0.8rem;
  border: 1px solid rgba(0, 156, 255, 0.7);
}

.hero-card-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.25);
}

.hero-card-list {
  list-style: none;
  font-size: 0.83rem;
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.hero-card-list li::before {
  content: "•";
  color: var(--c-accent);
  margin-right: 0.4rem;
}

.hero-card-footer {
  font-size: 0.78rem;
  color: #9ca3af;
}

/* ===== Sections ===== */
.section {
  padding: 2.75rem 0;
}

.section:nth-of-type(2n) {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), var(--c-bg-soft));
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.8rem;
  gap: 1rem;
}

.section-kicker {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--c-muted);
}

.section-title {
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 0.9rem;
  color: var(--c-ink-soft);
  max-width: 24rem;
}

/* ===== Work Grid ===== */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.work-card {
  background: var(--c-surface-elevated);
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--c-border);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
  color: inherit;
}

.work-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.14);
  border-color: rgba(0, 156, 255, 0.7);
}

.work-card-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: radial-gradient(circle at top, rgba(0, 156, 255, 0.25), #e2e8f0);
  background-position: center;
  background-size: cover;
}

.work-card-body {
  padding: 1rem;
}

.work-card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}

.work-card-title {
  font-size: 0.98rem;
  font-weight: 600;
}

.work-card-tag {
  font-size: 0.72rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: var(--c-accent-soft);
  color: var(--c-accent-dark);
}

.work-card-desc {
  font-size: 0.82rem;
  color: var(--c-ink-soft);
  margin-bottom: 0.6rem;
}

.work-card-meta {
  font-size: 0.75rem;
  color: var(--c-muted);
}

/* ===== About Layout ===== */
.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 3.5rem;
  align-items: flex-start;
}

.about-text p {
  margin-bottom: 0.9rem;
  font-size: 0.95rem;
  color: var(--c-ink-soft);
}

.about-highlight {
  border-left: 3px solid var(--c-accent);
  padding-left: 1rem;
  margin: 1.4rem 0;
  font-size: 0.9rem;
  color: var(--c-ink);
  background: rgba(224, 243, 255, 0.7);
  border-radius: 0 0.6rem 0.6rem 0;
}

.about-meta {
  font-size: 0.85rem;
  color: var(--c-ink-soft);
}

.about-badge-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.9rem;
}

.badge {
  font-size: 0.76rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: var(--c-ink-soft);
}

/* ===== Contact Page ===== */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: flex-start;
}

.contact-card {
  background: var(--c-surface);
  border-radius: 1rem;
  padding: 1.5rem;
  border: 1px solid var(--c-border);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.contact-card h2 {
  font-size: 1.3rem;
  margin-bottom: 0.4rem;
}

.contact-card p {
  font-size: 0.9rem;
  color: var(--c-ink-soft);
  margin-bottom: 1.1rem;
}

.contact-meta {
  font-size: 0.85rem;
  color: var(--c-ink-soft);
  margin-bottom: 0.4rem;
}

.contact-meta span.label {
  font-weight: 600;
}

.contact-meta a {
  color: var(--c-ink);
  text-decoration: none;
}

.contact-meta a:hover {
  color: var(--c-accent-dark);
}

.contact-form {
  display: grid;
  gap: 0.9rem;
}

.form-row {
  display: grid;
  gap: 0.8rem;
}

label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--c-ink-soft);
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  border-radius: 0.7rem;
  border: 1px solid #cbd5e1;
  padding: 0.55rem 0.7rem;
  font-size: 0.9rem;
  outline: none;
  background: #f9fafb;
  color: var(--c-ink);
}

input::placeholder,
textarea::placeholder {
  color: #9ca3af;
}

input:focus,
textarea:focus {
  border-color: var(--c-accent);
  background: #ffffff;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

/* ===== Back Link (case study) ===== */
.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--c-ink-soft);
  text-decoration: none;
}

.back-link:hover {
  color: var(--c-accent-dark);
}

/* Slight section-header shift on case study pages */
.case-study .section-header {
  margin-top: -0.5rem;
}

/* ===== Footer ===== */
footer {
  border-top: 1px solid var(--c-border);
  padding: 1.1rem 0;
  font-size: 0.78rem;
  color: var(--c-muted);
  background: #f8fafc;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.footer-links {
  display: flex;
  gap: 0.8rem;
}

.footer-links a {
  color: var(--c-ink-soft);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--c-accent-dark);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero-grid,
  .about-layout,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 2.4rem;
  }

  .hero-card {
    order: -1;
  }

  .work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .nav-links {
    position: absolute;
    inset: 56px 0 auto 0;
    background: rgba(245, 247, 251, 0.98);
    flex-direction: column;
    border-bottom: 1px solid var(--c-border);
    padding: 0.8rem 1.5rem 1rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.18s ease;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .hero-title {
    font-size: 1.9rem;
  }

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

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}