/* Design system: "Paper & Ink"
   Warm off-white paper surfaces, rich ink type, hairline rules.
   Headings: Space Grotesk. Body: DM Sans. */

:root {
  --paper: #f5f3ee;
  --paper-deep: #e8e4dd;
  --ink: #0d0d0d;
  --ink-fg: #f5f3ee;
  --card: #fbfaf7;
  --muted: #6b6862;
  --border: #dcd8d0;
  --radius: 1.25rem;
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; border-color: var(--border); }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.03em; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--ink); color: var(--paper); }

.container { max-width: 72rem; margin: 0 auto; padding-left: 23px; padding-right: 23px; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.dim { color: rgba(245, 243, 238, 0.5); }
.dim-text { color: rgba(245, 243, 238, 0.5); font-size: 0.875rem; }

.i-4 { width: 1rem; height: 1rem; }
.i-35 { width: 0.875rem; height: 0.875rem; }
.i-5 { width: 1.25rem; height: 1.25rem; }
.i-18 { width: 18px; height: 18px; }

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  border-radius: 999px; padding: 0.75rem 1.5rem;
  font-size: 0.875rem; font-weight: 500;
  transition: transform 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-outline { border: 1px solid rgba(13, 13, 13, 0.2); }
.btn-light { background: var(--ink-fg); color: var(--ink); }
.btn-lg { padding: 1rem 2rem; }
.btn-block { width: 100%; padding: 0.875rem 1.5rem; }

/* ---------- Animations ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.rise { animation: rise 0.8s var(--ease) both; }
.caret { animation: blink 1.1s steps(1) infinite; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  border-bottom: 1px solid rgba(220, 216, 208, 0.7);
  background: rgba(245, 243, 238, 0.85);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1rem; padding-bottom: 1rem; }
.brand { display: flex; align-items: center; gap: 0.625rem; }
.brand img { height: 1.5rem; width: auto; }
.brand span { font-family: var(--font-display); font-size: 1rem; font-weight: 600; letter-spacing: -0.025em; }

.menu-btn {
  display: grid; place-items: center; width: 2.5rem; height: 2.5rem;
  border: 0; border-radius: 999px; background: var(--ink); color: var(--paper); cursor: pointer;
}
.desktop-nav { display: none; align-items: center; gap: 0.25rem; font-size: 0.875rem; }
.desktop-nav a { border-radius: 999px; padding: 0.375rem 0.75rem; color: var(--muted); transition: color 0.2s; }
.desktop-nav a:hover { color: var(--ink); }
.desktop-nav a.active, .desktop-nav a.active:hover { background: var(--ink); color: var(--paper); }

/* ---------- Mobile drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.drawer.open { pointer-events: auto; }
.drawer-backdrop {
  position: absolute; inset: 0; background: rgba(13, 13, 13, 0.4);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; transition: opacity 0.3s;
}
.drawer.open .drawer-backdrop { opacity: 1; }
.drawer-panel {
  position: absolute; top: 0; bottom: 0; right: 0;
  display: flex; flex-direction: column;
  width: 88%; max-width: 24rem;
  background: var(--ink); color: var(--ink-fg);
  transform: translateX(100%); transition: transform 0.5s var(--ease);
}
.drawer.open .drawer-panel { transform: none; }
.drawer-top { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.5rem; }
.drawer-close {
  display: grid; place-items: center; width: 2.5rem; height: 2.5rem;
  border: 0; border-radius: 999px; background: var(--ink-fg); color: var(--ink); cursor: pointer;
}
.drawer-nav { display: flex; flex-direction: column; margin-top: 1.5rem; padding: 0 1.5rem; }
.drawer-nav a {
  display: flex; align-items: baseline; gap: 1rem;
  border-bottom: 1px solid rgba(245, 243, 238, 0.1);
  padding: 1.25rem 0;
  font-family: var(--font-display); font-size: 2.25rem; font-weight: 600; letter-spacing: -0.025em; line-height: 1.1;
  color: rgba(245, 243, 238, 0.6);
  opacity: 0; transform: translateX(2rem);
  transition: all 0.5s var(--ease), color 0.2s;
  transition-delay: 0ms;
}
.drawer.open .drawer-nav a { opacity: 1; transform: none; transition-delay: calc(120ms + var(--i) * 60ms); }
.drawer-nav a:hover, .drawer-nav a.active { color: var(--ink-fg); }
.drawer-nav .eyebrow { color: rgba(245, 243, 238, 0.4); }
.drawer-bottom { margin-top: auto; padding: 0 1.5rem 2rem; }
.drawer-socials { display: flex; align-items: center; justify-content: space-between; margin-top: 1.5rem; }

.social-row { display: flex; gap: 0.5rem; }
.social-btn {
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem;
  border: 1px solid rgba(245, 243, 238, 0.15); border-radius: 999px;
  color: rgba(245, 243, 238, 0.8); transition: all 0.2s;
}
.social-btn.sm { width: 2.25rem; height: 2.25rem; }
.social-btn:hover { background: var(--ink-fg); border-color: var(--ink-fg); color: var(--ink); }

/* ---------- Home ---------- */
.hero { padding-top: 5rem; padding-bottom: 5rem; }
.hero-title { margin-top: 1.5rem; font-size: 3rem; font-weight: 600; line-height: 0.95; letter-spacing: -0.04em; }
.hero-title .muted { color: var(--muted); }
.hero-sub { margin-top: 2rem; max-width: 36rem; font-size: 1.125rem; color: var(--muted); }
.hero-actions { margin-top: 2.5rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }

.section { padding-bottom: 6rem; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 2rem; }
.h2 { font-size: 1.875rem; font-weight: 600; }
.link-muted { font-size: 0.875rem; color: var(--muted); }
.link-muted:hover { color: var(--ink); }

.bento { display: grid; grid-auto-rows: 220px; gap: 1rem; }
.bento-item { position: relative; overflow: hidden; border-radius: 1rem; }
.bento-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.bento-item:hover img { transform: scale(1.05); }
.bento-label {
  position: absolute; left: 0.75rem; right: 0.75rem; bottom: 0.75rem;
  display: flex; align-items: center; justify-content: space-between;
  border-radius: 0.75rem; padding: 0.75rem 1rem;
  background: rgba(245, 243, 238, 0.9);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.bento-title { font-family: var(--font-display); font-weight: 600; }
.bento-cat { font-size: 0.75rem; color: var(--muted); }

.services-grid { margin-top: 2.5rem; display: grid; column-gap: 3rem; }
.service { border-top: 1px solid var(--border); padding: 2rem 0; }
.service h3 { margin-top: 0.75rem; font-size: 1.5rem; font-weight: 600; }
.service p.muted { margin-top: 0.5rem; }

.marquee-wrap { overflow: hidden; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 1.5rem 0; }
.marquee {
  display: flex; width: max-content; gap: 2rem;
  font-family: var(--font-display); font-size: 1.5rem; color: var(--muted);
  animation: marquee 32s linear infinite;
}
.marquee > span { display: flex; align-items: center; gap: 2rem; white-space: nowrap; }

.cta { padding-top: 6rem; padding-bottom: 6rem; text-align: center; }
.cta-title { font-size: 2.25rem; font-weight: 600; }
.cta .btn { margin-top: 2rem; }

/* ---------- Inner pages ---------- */
.page { padding-top: 5rem; padding-bottom: 5rem; }
.page-title { margin-top: 1rem; font-size: 3rem; font-weight: 600; letter-spacing: -0.04em; }

.work-list { margin-top: 4rem; display: flex; flex-direction: column; gap: 5rem; }
.work-item { display: grid; gap: 2rem; border-top: 1px solid var(--border); padding-top: 2.5rem; }
.work-meta h2 { margin-top: 0.75rem; font-size: 1.875rem; font-weight: 600; }
.work-meta .small { margin-top: 0.25rem; }
.work-summary { margin-top: 1.5rem; }
.work-link { margin-top: 1.5rem; }
.work-img-link { display: block; }
.work-img { width: 100%; height: auto; border-radius: 1rem; object-fit: cover; }

.about-title { max-width: 56rem; line-height: 0.95; }
.about-grid { margin-top: 4rem; display: grid; gap: 3rem; }
.about-text { font-size: 1.125rem; color: var(--muted); }
.about-text p + p { margin-top: 1.25rem; }
.about-text .btn { margin-top: 1.25rem; }
.about-service { border-top: 1px solid var(--border); padding: 1.25rem 0; }
.about-service h3 { font-size: 1.125rem; font-weight: 600; }
.about-service p { margin-top: 0.25rem; }

.contact-grid { display: grid; gap: 4rem; }
.contact-title { line-height: 0.95; }
.email-link {
  display: inline-block; margin-top: 2rem;
  font-family: var(--font-display); font-size: 1.5rem;
  text-decoration: underline; text-underline-offset: 4px;
}
.email-link:hover { color: var(--muted); }
.pills { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pill { border-radius: 999px; background: var(--paper-deep); padding: 0.375rem 1rem; font-size: 0.875rem; }
.social-link {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--border); padding: 1.25rem 0;
}
.social-link > span { display: flex; align-items: center; gap: 0.75rem; font-family: var(--font-display); font-size: 1.25rem; }
.social-link .arrow { transition: transform 0.2s; }
.social-link:hover .arrow { transform: translate(2px, -2px); }
.steps { margin-top: 1rem; }
.steps li { border-top: 1px solid var(--border); padding: 1.25rem 0; }
.step-title { margin-top: 0.5rem; font-family: var(--font-display); font-size: 1.125rem; font-weight: 600; }

.notfound { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.notfound h1 { font-size: 4.5rem; font-weight: 700; }
.notfound h2 { margin-top: 1rem; font-size: 1.25rem; font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 8rem; background: var(--ink); color: var(--ink-fg); }
.footer-top-wrap { padding-top: 4rem; }
.footer-cta {
  display: flex; flex-direction: column; gap: 2rem;
  border-bottom: 1px solid rgba(245, 243, 238, 0.15); padding-bottom: 3.5rem;
}
.footer-cta .btn { align-self: flex-start; }
.footer-statement { margin-top: 1rem; max-width: 36rem; font-family: var(--font-display); font-size: 2.25rem; font-weight: 600; line-height: 1.05; letter-spacing: -0.03em; }
.footer-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; padding: 3.5rem 0; }
.col-brand, .col-based { grid-column: span 2; }
.brand-row { display: flex; align-items: center; gap: 0.75rem; }
.brand-row img { height: 1.75rem; width: auto; }
.brand-row span { font-family: var(--font-display); font-size: 1.125rem; font-weight: 600; }
.footer-tagline { margin-top: 1rem; max-width: 20rem; font-size: 0.875rem; line-height: 1.6; color: rgba(245, 243, 238, 0.6); }
.col-brand .social-row { margin-top: 1.5rem; }
.footer-cols ul { margin-top: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; font-size: 0.875rem; color: rgba(245, 243, 238, 0.8); }
.footer-cols ul a { transition: color 0.2s; }
.footer-cols ul a:hover { color: var(--ink-fg); }
.based-1 { margin-top: 1.25rem; font-size: 0.875rem; color: rgba(245, 243, 238, 0.8); }
.based-2 { margin-top: 0.25rem; font-size: 0.875rem; color: rgba(245, 243, 238, 0.5); }
.wordmark-wrap { overflow: hidden; }
.wordmark {
  user-select: none; font-family: var(--font-display);
  font-size: 15vw; font-weight: 700; line-height: 0.8; letter-spacing: -0.06em;
  color: rgba(245, 243, 238, 0.07);
}
.footer-bottom { border-top: 1px solid rgba(245, 243, 238, 0.15); }
.footer-bottom-inner { display: flex; flex-direction: column; gap: 0.75rem; padding-top: 1.5rem; padding-bottom: 1.5rem; font-size: 0.75rem; color: rgba(245, 243, 238, 0.5); }
.footer-bottom a { display: inline-flex; align-items: center; gap: 0.375rem; transition: color 0.2s; }
.footer-bottom a:hover { color: var(--ink-fg); }

/* ---------- >= 640px ---------- */
@media (min-width: 640px) {
  .hero { padding-top: 7rem; }
  .hero-title { font-size: 6rem; }
  .h2 { font-size: 2.25rem; }
  .cta-title { font-size: 3.75rem; }
  .page-title { font-size: 4.5rem; }
  .email-link { font-size: 1.875rem; }
  .footer-top-wrap { padding-top: 5rem; }
  .footer-statement { font-size: 3.75rem; }
  .footer-bottom-inner { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* ---------- >= 768px ---------- */
@media (min-width: 768px) {
  .menu-btn, .drawer { display: none; }
  .desktop-nav { display: flex; }

  .bento { grid-template-columns: repeat(6, 1fr); }
  .bento-1 { grid-column: span 4; grid-row: span 2; }
  .bento-2 { grid-column: span 2; grid-row: span 2; }
  .bento-3, .bento-4, .bento-5 { grid-column: span 2; }

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

  .work-item { grid-template-columns: repeat(12, 1fr); }
  .work-meta { grid-column: span 4; }
  .work-img, .work-img-link { grid-column: span 8; }

  .about-grid { grid-template-columns: repeat(12, 1fr); }
  .about-text { grid-column: span 7; }
  .about-services { grid-column: span 5; }

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

  .footer-cta { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .footer-cta .btn { align-self: auto; }
  .footer-cols { grid-template-columns: repeat(12, 1fr); }
  .col-brand { grid-column: span 5; }
  .col-nav { grid-column: span 2; }
  .col-services { grid-column: span 3; }
  .col-based { grid-column: span 2; }
}

@media (min-width: 1024px) {
  .wordmark { font-size: 11rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
