*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #FFF1DB;
  --ink:         #1C1C1E;
  --ink-muted:   rgba(28,28,30,0.55);
  --ink-faint:   rgba(28,28,30,0.35);
  --accent:      #FF9500;
  --accent-gradient: linear-gradient(135deg, #FFD000 0%, #FF9500 100%);
  --rule:        rgba(28,28,30,0.11);
  --radius:      14px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Grain */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* ─── Shared utilities ─── */
.eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(16px, 1.5vw, 20px);
  font-weight: 300;
  color: var(--ink-muted);
}

.section-rule {
  width: 100%;
  height: 1px;
  background: var(--rule);
}

/* ─── Nav ─── */
nav {
  position: sticky;
  top: 0;
  z-index: 500;
  height: 72px;
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,241,219,0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-emblem-wrap {
  overflow: hidden;
  max-width: 0;
  margin-right: 0;
  opacity: 0;
  transform: translateX(-10px);
  transition:
    max-width   0.5s cubic-bezier(0.22, 1, 0.36, 1),
    margin-right 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    opacity     0.4s ease,
    transform   0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-logo.logo-visible .nav-emblem-wrap {
  max-width: 48px;
  margin-right: 12px;
  opacity: 1;
  transform: translateX(0);
}

.nav-logo .emblem { height: 40px; width: auto; display: block; margin-right: 12px; }
.nav-logo .wordmark { height: 40px; width: auto; margin-top: 1px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  font-weight: 400;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--bg);
  background: var(--ink);
  padding: 10px 24px;
  border-radius: 100px;
  text-decoration: none;
  transition: background 0.25s, transform 0.2s;
  white-space: nowrap;
}

.nav-cta:hover { background: var(--accent-gradient); transform: translateY(-1px); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  background: none;
  border: none;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: all 0.3s;
}

/* Mobile menu */
@keyframes menu-slide-in {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}
@keyframes menu-slide-out {
  from { transform: translateX(0); }
  to   { transform: translateX(100%); }
}
@keyframes menu-item-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.mobile-menu {
  display: flex;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 900;
  flex-direction: column;
  padding: 20px 28px 40px;
  transform: translateX(100%);
  pointer-events: none;
}

.mobile-menu.open {
  animation: menu-slide-in 0.38s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  pointer-events: all;
}

.mobile-menu.closing {
  animation: menu-slide-out 0.28s cubic-bezier(0.55, 0, 1, 1) forwards;
  pointer-events: none;
}

.mobile-menu.open .mobile-nav-links li {
  opacity: 0;
  animation: menu-item-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.mobile-menu.open .mobile-nav-links li:nth-child(1) { animation-delay: 0.12s; }
.mobile-menu.open .mobile-nav-links li:nth-child(2) { animation-delay: 0.18s; }
.mobile-menu.open .mobile-nav-links li:nth-child(3) { animation-delay: 0.24s; }
.mobile-menu.open .mobile-nav-links li:nth-child(4) { animation-delay: 0.30s; }
.mobile-menu.open .mobile-nav-links li:nth-child(5) { animation-delay: 0.36s; }
.mobile-menu.open .mobile-cta {
  opacity: 0;
  animation: menu-item-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.42s forwards;
}

.mobile-menu-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  margin-bottom: 32px;
}

.mobile-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--ink);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--rule);
}

.mobile-nav-links {
  list-style: none;
  flex: 1;
}

.mobile-nav-links li { border-bottom: 1px solid var(--rule); }

.mobile-nav-links a {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 36px;
  font-weight: 300;
  color: var(--ink-muted);
  text-decoration: none;
  padding: 14px 0;
  transition: color 0.2s, padding-left 0.2s;
}

.mobile-nav-links a:hover { color: var(--ink); padding-left: 8px; }

.mobile-cta { margin-top: 32px; }

/* ─── Shared buttons ─── */
.btn-dark {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--bg);
  background: var(--ink);
  padding: 13px 26px;
  border-radius: 100px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.25s, transform 0.2s;
}

.btn-dark:hover { background: var(--accent-gradient); transform: translateY(-2px); }

.btn-ghost {
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.btn-ghost:hover { color: var(--ink); }

/* ─── Footer ─── */
footer {
  padding: 52px 48px 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 28px;
}

.footer-brand-logo { height: 38px; width: auto; margin-bottom: 14px; }

.footer-brand-desc {
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-muted);
  max-width: 220px;
}

.footer-col-label {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 18px;
}

.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.footer-links a {
  font-size: 13.5px;
  font-weight: 300;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

.footer-email {
  display: inline-block;
  font-family: 'Fraunces', serif;
  font-size: 16px;
  font-weight: 300;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
  margin-bottom: 16px;
  transition: color 0.2s, border-color 0.2s;
}

.footer-email:hover {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  border-color: var(--accent);
}

.footer-social {
  display: flex;
  gap: 14px;
}

.footer-social a {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-social a:hover { color: var(--ink); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-copy { font-size: 12px; color: var(--ink-faint); letter-spacing: 0.01em; }

/* ─── Scroll reveal ─── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s cubic-bezier(0.22,1,0.36,1), transform 0.75s cubic-bezier(0.22,1,0.36,1);
}

.reveal.in { opacity: 1; transform: none; }

.d1 { transition-delay: 0.08s; }
.d2 { transition-delay: 0.16s; }
.d3 { transition-delay: 0.24s; }
.d4 { transition-delay: 0.32s; }

/* ─── Mailto toast (Start a conversation) ─── */
.mailto-toast {
  position: fixed;
  left: 50%;
  bottom: max(28px, env(safe-area-inset-bottom, 0px));
  transform: translate3d(-50%, calc(120% + 20px), 0);
  padding: 14px 24px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  border-radius: 100px;
  box-shadow: 0 10px 40px rgba(28, 28, 30, 0.2);
  z-index: 10001;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.35s ease,
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  max-width: min(440px, calc(100vw - 48px));
  text-align: center;
}

.mailto-toast.mailto-toast--visible {
  opacity: 1;
  transform: translate3d(-50%, 0, 0);
}

/* ─── Responsive: tablet ─── */
@media (max-width: 1100px) {
  nav { padding-left: 32px; padding-right: 32px; }
  footer { padding-left: 32px; padding-right: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}

/* ─── Responsive: mobile ─── */
@media (max-width: 700px) {
  nav { padding: 0 20px; }
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
  footer { padding: 48px 20px 28px; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
}
