:root {
  --primary: hsl(16, 50%, 42%);
  --primary-dark: hsl(16, 55%, 34%);
  --primary-tint: hsl(16, 35%, 96%);
  --text: hsl(240, 10%, 10%);
  --text-muted: hsl(240, 4%, 46%);
  --text-faint: hsl(240, 4%, 64%);
  --bg: #ffffff;
  --bg-subtle: hsl(30, 20%, 97%);
  --border: hsl(30, 15%, 90%);
  --card-bg: #ffffff;
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-w: 1200px;
  --px: clamp(1.25rem, 5vw, 2.5rem);
  --section-py: clamp(3.5rem, 8vw, 7rem);
  --r: 8px;
  --r-lg: 12px;
  --nav-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Accessibility: keyboard skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--text);
  color: #fff;
  font-weight: 600;
  border-radius: 0 0 var(--r) 0;
}
.skip-link:focus { left: 0; outline: 2px solid var(--primary); outline-offset: 2px; }

/* Visible focus ring for keyboard users */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
ul { list-style: none; }

h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2.6rem, 6vw, 4.5rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); letter-spacing: -0.018em; }
h3 { font-size: 1.1rem; }

.eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
}

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

/* Navigation */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
#nav.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--px);
}
.nav-logo {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.nav-logo .accent { color: var(--primary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.125rem;
}
.nav-links a {
  padding: 0.45rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--r);
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--text); background: hsl(0, 0%, 95%); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}
.nav-icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--r);
  color: var(--text-muted);
  transition: color 0.15s, background 0.15s;
}
.nav-icon-link:hover { color: var(--text); background: hsl(0, 0%, 95%); }
.nav-icon-link svg { width: 16px; height: 16px; }

.nav-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--r);
  color: var(--text);
  transition: background 0.15s;
}
.nav-hamburger:hover { background: hsl(0, 0%, 95%); }
.nav-hamburger svg { width: 20px; height: 20px; }

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.mobile-menu.open { opacity: 1; pointer-events: all; }
.mobile-menu-close {
  position: absolute;
  top: 1.25rem; right: var(--px);
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r);
  color: var(--text-muted);
  transition: background 0.15s;
}
.mobile-menu-close:hover { background: hsl(0, 0%, 95%); }
.mobile-menu-close svg { width: 20px; height: 20px; }
.mobile-menu a.menu-link {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  transition: color 0.15s;
}
.mobile-menu a.menu-link:hover { color: var(--primary); }
.mobile-menu-icons {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.mobile-menu-icons a {
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text-muted);
  transition: color 0.15s, border-color 0.15s;
}
.mobile-menu-icons a:hover { color: var(--primary); border-color: var(--primary); }
.mobile-menu-icons svg { width: 18px; height: 18px; }

/* Hero */
#hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 65% 45%, hsl(16, 40%, 97%) 0%, transparent 62%);
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: 55fr 45fr;
  gap: 4rem;
  align-items: center;
  padding: 5rem 0;
  position: relative;
  z-index: 1;
}
.hero-eyebrow { display: inline-block; margin-bottom: 1.5rem; }
.hero-name { color: var(--text); margin-bottom: 1.25rem; }
.hero-tagline {
  font-size: clamp(1rem, 1.8vw, 1.175rem);
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 2.5rem;
  max-width: 46ch;
}
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--primary);
  color: white;
  padding: 0.875rem 2rem;
  min-height: 44px;
  border-radius: var(--r);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  cursor: pointer;
  border: none;
  font-family: var(--font);
  text-align: center;
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(161, 82, 54, 0.28);
}
.btn-primary:active { transform: translateY(0); box-shadow: none; }
.btn-primary:disabled { opacity: 0.65; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary svg { width: 16px; height: 16px; }

.hero-photo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-photo {
  width: min(400px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 4px solid hsl(16, 40%, 88%);
  box-shadow: 0 24px 64px rgba(161, 82, 54, 0.14), 0 4px 16px rgba(0,0,0,0.06);
}

/* Logo strip */
#clients {
  padding: 3.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}
.clients-label { text-align: center; margin-bottom: 2rem; }
.clients-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 3rem;
}
.client-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
}
.client-logo {
  height: 22px;
  width: auto;
  opacity: 0.42;
  filter: grayscale(1);
  display: block;
}
.client-name {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: hsl(240, 4%, 60%);
  white-space: nowrap;
  line-height: 1;
}

/* Services */
#services { padding: var(--section-py) 0; }
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-header h2 { margin-top: 0.625rem; margin-bottom: 0.875rem; }
.section-header p { color: var(--text-muted); max-width: 52ch; margin: 0 auto; line-height: 1.75; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.service-card {
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--card-bg);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.service-card:hover {
  border-color: hsl(16, 40%, 80%);
  box-shadow: 0 4px 24px rgba(161, 82, 54, 0.09);
  transform: translateY(-2px);
}
.service-icon {
  width: 44px; height: 44px;
  border-radius: var(--r);
  background: var(--primary-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  flex-shrink: 0;
}
.service-icon svg { width: 22px; height: 22px; color: var(--primary); stroke: var(--primary); }
.service-card h3 { margin-bottom: 0.75rem; }
.service-card p { font-size: 0.875rem; color: var(--text-muted); line-height: 1.75; }

/* Selected Work */
#work {
  padding: var(--section-py) 0;
  background: var(--bg-subtle);
}
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.work-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}
.work-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.07);
  transform: translateY(-2px);
}
.work-category {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 1rem;
}
.work-card h3 { font-size: 1.15rem; margin-bottom: 0.3rem; }
.work-company { font-size: 0.825rem; color: var(--text-muted); margin-bottom: 1rem; }
.work-card > p { font-size: 0.875rem; color: var(--text-muted); line-height: 1.75; flex: 1; margin-bottom: 1.5rem; }
.work-metric {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: var(--primary-tint);
  border-radius: var(--r);
  align-self: flex-start;
}
.work-metric-value { font-size: 1.2rem; font-weight: 800; color: var(--primary); line-height: 1; }
.work-metric-label { font-size: 0.78rem; color: var(--text-muted); }

/* Experience */
#experience { padding: var(--section-py) 0; }
.experience-list {
  max-width: 760px;
  margin: 0 auto;
}
.experience-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 1rem 2rem;
  padding: 1.375rem 0;
  border-bottom: 1px solid var(--border);
}
.experience-item:first-child { border-top: 1px solid var(--border); }
.exp-company { font-weight: 700; font-size: 1rem; margin-bottom: 0.2rem; }
.exp-role { font-size: 0.875rem; color: var(--text-muted); }
.exp-period { font-size: 0.775rem; color: var(--text-faint); white-space: nowrap; text-align: right; line-height: 1.4; }

/* Contact */
#contact {
  padding: var(--section-py) 0;
  background: var(--bg-subtle);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 5rem;
  align-items: start;
}
.contact-info .eyebrow { margin-bottom: 0.75rem; display: block; }
.contact-info h2 { margin-bottom: 1rem; }
.contact-info > p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.75;
  margin-bottom: 2.25rem;
}
.contact-links { display: flex; flex-direction: column; gap: 0.75rem; }
.contact-link {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  color: var(--text);
  font-size: 0.875rem;
  transition: color 0.15s;
  padding: 0.125rem 0;
}
.contact-link:hover { color: var(--primary); }
.contact-link svg { width: 16px; height: 16px; color: var(--primary); flex-shrink: 0; }

.contact-form-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 2.5rem;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.375rem; margin-bottom: 1.125rem; }

label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.03em;
}
input[type="text"], input[type="email"], textarea {
  font-family: var(--font);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 0.75rem 0.875rem;
  width: 100%;
  min-height: 44px;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
input[type="text"]:focus, input[type="email"]:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px hsla(16, 50%, 42%, 0.12);
}
textarea { resize: vertical; min-height: 130px; }

.field-error {
  font-size: 0.74rem;
  color: hsl(0, 72%, 51%);
  margin-top: 0.2rem;
  display: none;
}
.field-error.visible { display: block; }
input.invalid, textarea.invalid { border-color: hsl(0, 72%, 70%); }

.form-submit-wrap { margin-top: 1.5rem; }
.form-error-msg {
  font-size: 0.84rem;
  color: hsl(0, 72%, 51%);
  padding: 0.875rem 1rem;
  background: hsl(0, 90%, 97%);
  border: 1px solid hsl(0, 72%, 88%);
  border-radius: var(--r);
  margin-top: 1rem;
  display: none;
}
.form-error-msg.visible { display: block; }

.form-success {
  display: none;
  text-align: center;
  padding: 3.5rem 1.5rem;
}
.form-success.visible { display: block; }
.success-icon {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--primary-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}
.success-icon svg { width: 28px; height: 28px; color: var(--primary); }
.form-success h3 { margin-bottom: 0.75rem; }
.form-success p { font-size: 0.9rem; color: var(--text-muted); }

/* Footer */
footer {
  padding: 2.75rem 0;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-logo {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.footer-logo .accent { color: var(--primary); }
.footer-copy { font-size: 0.78rem; color: var(--text-faint); }
.footer-links { display: flex; gap: 0.25rem; }
.footer-icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--r);
  color: var(--text-muted);
  transition: color 0.15s, background 0.15s;
}
.footer-icon-link:hover { color: var(--text); background: hsl(0, 0%, 95%); }
.footer-icon-link svg { width: 15px; height: 15px; }

/* Animations */
.animate {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.animate.from-left { transform: translateX(-24px); }
.animate.from-right { transform: translateX(24px); }
.animate.in-view { opacity: 1; transform: none; }

.stagger-wrap > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.stagger-wrap.in-view > *:nth-child(1) { opacity: 1; transform: none; transition-delay: 0s; }
.stagger-wrap.in-view > *:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.09s; }
.stagger-wrap.in-view > *:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.18s; }
.stagger-wrap.in-view > *:nth-child(4) { opacity: 1; transform: none; transition-delay: 0.27s; }
.stagger-wrap.in-view > *:nth-child(5) { opacity: 1; transform: none; transition-delay: 0.36s; }
.stagger-wrap.in-view > *:nth-child(6) { opacity: 1; transform: none; transition-delay: 0.45s; }
.stagger-wrap.in-view > *:nth-child(7) { opacity: 1; transform: none; transition-delay: 0.54s; }

/* ============================================================
   Responsive — desktop down to small mobile
   Breakpoints: 1100 (small desktop), 1024 (tablet landscape),
   900 (tablet portrait), 768 (large phone), 600, 480, 380
   ============================================================ */

/* Small desktop / large tablet landscape */
@media (max-width: 1100px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
  .hero-inner { gap: 3rem; }
}

/* Tablet landscape */
@media (max-width: 1024px) {
  .hero-inner { padding: 4rem 0; gap: 2.5rem; }
  .contact-grid { gap: 3rem; }
  .clients-row { gap: 0.5rem 2.25rem; }
}

/* Tablet portrait */
@media (max-width: 900px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .hero-photo { width: min(320px, 100%); }
  #hero { min-height: auto; padding-top: calc(var(--nav-h) + 1.5rem); padding-bottom: 2rem; }
  .section-header { margin-bottom: 2.5rem; }
  .contact-form-card { padding: 2rem; }
}

/* Large phone — single column starts here */
@media (max-width: 768px) {
  :root { --nav-h: 64px; }
  .nav-links, .nav-actions { display: none; }
  .nav-hamburger { display: flex; }
  h1 { font-size: clamp(2.25rem, 9vw, 3.25rem); }
  h2 { font-size: clamp(1.6rem, 5.5vw, 2.1rem); }
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
    padding: 2.5rem 0 3rem;
  }
  .hero-photo-wrap { order: -1; }
  .hero-photo { width: min(220px, 60vw); border-width: 3px; }
  .hero-eyebrow { margin-bottom: 1rem; }
  .hero-name { margin-bottom: 1rem; }
  .hero-tagline { margin: 0 auto 2rem; font-size: 1rem; line-height: 1.65; }
  .hero-actions { justify-content: center; }
  .btn-primary { width: 100%; max-width: 320px; padding: 1rem 1.5rem; }
  .services-grid { grid-template-columns: 1fr; gap: 0.875rem; }
  .service-card { padding: 1.5rem; }
  .work-grid { grid-template-columns: 1fr; gap: 0.875rem; }
  .work-card { padding: 1.75rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .experience-item {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    padding: 1.25rem 0;
  }
  .exp-period { text-align: left; }
  .footer-inner { justify-content: center; text-align: center; flex-direction: column; gap: 1.25rem; }
  /* Larger tap targets across the board */
  .nav-icon-link, .nav-hamburger { width: 44px; height: 44px; }
  .footer-icon-link { width: 44px; height: 44px; }
  .contact-link { padding: 0.5rem 0; min-height: 44px; }
}

/* Small phone */
@media (max-width: 600px) {
  #clients { padding: 2.5rem 0; }
  .clients-label { margin-bottom: 1.5rem; }
  .clients-row { gap: 0.75rem 1.75rem; }
  .client-name { font-size: 0.66rem; letter-spacing: 0.14em; }
  .client-logo { height: 20px; }
  .section-header { margin-bottom: 2rem; }
  .work-metric { padding: 0.5rem 0.875rem; }
  .work-metric-value { font-size: 1.1rem; }
  footer { padding: 2rem 0; }
}

/* Smaller phones */
@media (max-width: 480px) {
  :root { --section-py: 3rem; }
  .contact-form-card { padding: 1.5rem 1.25rem; }
  .hero-photo { width: min(200px, 56vw); }
  .mobile-menu a.menu-link { font-size: 1.5rem; }
  .work-card h3 { font-size: 1.05rem; }
  .exp-company { font-size: 0.95rem; }
  .exp-role { font-size: 0.825rem; }
}

/* Very small phones (iPhone SE, Galaxy Fold cover) */
@media (max-width: 380px) {
  :root { --px: 1rem; }
  .nav-logo, .footer-logo { font-size: 1rem; }
  .hero-tagline { font-size: 0.95rem; }
  .clients-row { gap: 0.5rem 1.25rem; }
  .service-card, .work-card { padding: 1.25rem; }
  .contact-form-card { padding: 1.25rem 1rem; }
}

/* Landscape phones — short viewport */
@media (max-height: 520px) and (orientation: landscape) {
  #hero { min-height: auto; padding: calc(var(--nav-h) + 1.5rem) 0 2rem; }
  .hero-inner { padding: 1rem 0; gap: 1.5rem; }
  .hero-photo { width: min(140px, 22vh); }
}
