/* ==========================================================================
   White Oak
   Editorial paper-and-ink with iron-oxide accent.
   Two fonts: Fraunces (display) + Spline Sans (body), both Google Fonts.
   ========================================================================== */

/* === Tokens === */
:root {
  /* Color: paper, ink, and one accent */
  --paper:        #F2ECE2;   /* warm off-white background */
  --paper-soft:   #EAE3D5;   /* alt block background */
  --ink:          #1A1815;   /* warm near-black, primary text & headings */
  --ink-2:        #2D2925;   /* body copy */
  --ink-3:        #6B5D4E;   /* muted text, captions */
  --hairline:     #D9D2C4;   /* dividers, borders */
  --accent:       #c8813a;   /* amber, decorative: lines, dots, button hover, focus, badge bg-tint */
  --accent-deep:  #7e4f1a;   /* darker amber, text contexts (links, section numbers, badge text) for WCAG AA on paper */
  --accent-soft:  rgba(200, 129, 58, 0.10);

  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", "Palatino", Georgia, serif;
  --font-body:    "Spline Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono:    ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Layout */
  --container:        1200px;
  --container-narrow: 880px;
  --container-prose:  680px;

  /* Motion */
  --ease:     cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--paper);
  font-feature-settings: "kern", "ss01";
}
h1, h2, h3, h4, h5, h6, p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--ink); color: var(--paper); }

/* === Typography === */
h1, h2 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--ink);
  font-variation-settings: "opsz" 144, "SOFT" 50;
  letter-spacing: -0.025em;
  line-height: 1.02;
}
h1 {
  font-size: clamp(2.75rem, 7.5vw, 5.5rem);
}
h2 {
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-variation-settings: "opsz" 30, "SOFT" 50;
  font-size: 1.4375rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--ink);
}
p {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-2);
}
.lead {
  font-family: var(--font-display);
  font-weight: 300;
  font-variation-settings: "opsz" 30, "SOFT" 50;
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  line-height: 1.35;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-3);
}
.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: var(--accent);
}

/* === Layout === */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.container.narrow   { max-width: var(--container-narrow); }
.container.narrower { max-width: var(--container-prose); }
.text-center        { text-align: center; }

@media (min-width: 720px) {
  .container { padding: 0 2rem; }
}

/* === Header === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(242, 236, 226, 0.86);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-display);
}
.brand-logo {
  width: 26px;
  height: 26px;
  border-radius: 4px;
}
.brand-name {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.nav-actions {
  display: none;
  align-items: center;
  gap: 1.75rem;
}
.nav-link {
  position: relative;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-2);
  padding: 0.5rem 0;
  letter-spacing: -0.005em;
  transition: color 0.2s var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.3rem;
  height: 1px;
  width: 0;
  background: currentColor;
  transition: width 0.3s var(--ease-out);
}
.nav-link:hover, .nav-link.active { color: var(--ink); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.lang-toggle {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  transition: color 0.2s, border-color 0.2s;
}
.lang-toggle:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: none;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-nav {
  display: none;
  background: var(--paper);
  border-top: 1px solid var(--hairline);
  padding: 0.75rem 1.25rem 1.5rem;
}
.mobile-nav.open { display: block; }
.mobile-nav-inner {
  display: flex;
  flex-direction: column;
}
.mobile-nav-link {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 400;
  font-variation-settings: "opsz" 30;
  color: var(--ink);
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--hairline);
  letter-spacing: -0.015em;
}
.mobile-nav-link.active { color: var(--accent-deep); }
.lang-toggle-mobile {
  align-self: flex-start;
  margin-top: 1.25rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

@media (min-width: 640px) {
  .nav-actions { display: flex; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none !important; }
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  padding: 0.875rem 1.625rem;
  border-radius: 2px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
  cursor: pointer;
}
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
}
.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-outline:hover {
  background: var(--ink);
  color: var(--paper);
}
.btn-full { width: 100%; }

/* SVG icon inside buttons */
.btn svg {
  width: 14px;
  height: 14px;
  opacity: 0.85;
}

/* === Hero === */
.hero {
  padding: clamp(4rem, 10vw, 8rem) 0 clamp(3.5rem, 8vw, 6.5rem);
  position: relative;
}
.hero .container.narrow { max-width: 1080px; }
.hero .eyebrow { margin-bottom: 1.75rem; }
.hero h1 {
  margin-bottom: 1.75rem;
  max-width: 16ch;
  font-variation-settings: "opsz" 144, "SOFT" 30;
}
.hero .lead {
  max-width: 38rem;
  margin-bottom: 2rem;
}
.hero .location {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--ink-3);
  margin-bottom: 2.5rem;
}
.hero .location::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}
.cta-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
}
@media (min-width: 480px) {
  .cta-group { flex-direction: row; gap: 1rem; }
}

/* === Sections (home page rhythm with section numbering) === */
section.section {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
  border-top: 1px solid var(--hairline);
  position: relative;
}
section.section h2 { margin-bottom: 2.75rem; max-width: 22ch; }

/* === About === */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}
.about-media {
  align-self: start;
  max-width: 18rem;
}
.about-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 2px;
  object-fit: cover;
  object-position: top;
  filter: contrast(1.02);
  box-shadow:
    0 1px 2px rgba(26, 24, 21, 0.06),
    0 12px 32px rgba(26, 24, 21, 0.14);
}
.about-body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 38rem;
}
.about-body p:first-child {
  font-family: var(--font-display);
  font-size: 1.3125rem;
  font-weight: 300;
  font-variation-settings: "opsz" 30, "SOFT" 50;
  color: var(--ink);
  line-height: 1.45;
  letter-spacing: -0.012em;
}
@media (min-width: 800px) {
  .about-grid {
    grid-template-columns: 17rem 1fr;
    gap: 4rem;
  }
}

/* === What I build === */
.stack {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}
.what .stack { gap: 2.5rem; }
.service {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.625rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--hairline);
}
.service h3 {
  font-family: var(--font-display);
  font-size: 1.4375rem;
  font-weight: 500;
  font-variation-settings: "opsz" 30, "SOFT" 50;
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.service p { max-width: 42rem; }
@media (min-width: 720px) {
  .service {
    grid-template-columns: 16rem 1fr;
    gap: 3rem;
    align-items: start;
  }
  .service h3 { padding-right: 1.5rem; }
}
.aside {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--ink-3);
  font-style: normal;
  padding-top: 1.5rem;
  margin-top: 1rem;
  border-top: 1px dashed var(--hairline);
  max-width: 42rem;
}

/* === Why White Oak === */
.why-body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 42rem;
}
.why-body p:first-child {
  font-family: var(--font-display);
  font-weight: 300;
  font-variation-settings: "opsz" 30, "SOFT" 50;
  font-size: clamp(1.25rem, 2.4vw, 1.625rem);
  line-height: 1.45;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.why-body .bridge {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-variation-settings: "opsz" 30, "SOFT" 50;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  border-top: 1px dashed var(--hairline);
  padding-top: 1.25rem;
  margin-top: 0.5rem;
}

/* === How I work === */
.how .stack { gap: 1.75rem; }
.how .stack p {
  max-width: 38rem;
  font-size: 1.0625rem;
}
.how .stack p:last-child {
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 400;
  font-variation-settings: "opsz" 30, "SOFT" 50;
  font-style: italic;
  color: var(--ink);
  line-height: 1.45;
  letter-spacing: -0.01em;
  padding-top: 0.875rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--hairline);
}

/* === CTA === */
section.cta {
  padding: clamp(3rem, 6vw, 4.5rem) 0 clamp(3.5rem, 7vw, 5.5rem);
  background: var(--paper-soft);
  text-align: center;
}
section.cta h2 {
  margin: 0 auto 2rem;
  max-width: 18ch;
}

/* === Footer === */
.site-footer {
  background: var(--paper);
  border-top: 1px solid var(--hairline);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  align-items: center;
  padding: 3.5rem 0 2.5rem;
  text-align: center;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  justify-self: center;
}
.footer-logo { width: 22px; height: 22px; border-radius: 4px; }
.footer-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.footer-tagline,
.footer-location {
  font-size: 0.875rem;
  color: var(--ink-3);
  max-width: 28rem;
  margin: 0 auto;
  line-height: 1.55;
}
.footer-location { margin-top: -0.75rem; }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.8125rem;
}
.footer-nav a {
  color: var(--ink-3);
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.footer-nav a:hover { color: var(--ink); }
.footer-copy {
  font-size: 0.75rem;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}
.stella {
  color: var(--accent);
  font-size: 0.95em;
  margin-left: 0.15em;
  letter-spacing: 0;
}

@media (min-width: 720px) {
  .footer-copy {
    border-top: 1px solid var(--hairline);
    padding-top: 1.5rem;
    margin-top: 0.5rem;
    width: 100%;
  }
}

/* === Page header (work, contact, legal) === */
.page-header {
  padding-top: clamp(3rem, 7vw, 5rem);
  padding-bottom: clamp(2.25rem, 4vw, 3rem);
  border-bottom: 1px solid var(--hairline);
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.page-header h1 {
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  margin-bottom: 1rem;
  max-width: 14ch;
}
.page-header .lead {
  max-width: 36rem;
}

/* === Work page === */
.page-work {
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
  min-height: 100vh;
}

.work-item {
  padding-bottom: 4rem;
  margin-bottom: 4rem;
  border-bottom: 1px solid var(--hairline);
}
.work-item.last {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.work-item-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 1.75rem;
}
@media (min-width: 720px) {
  .work-item-header {
    grid-template-columns: 6rem 1fr;
    gap: 2rem;
  }
}
.work-item-logo img {
  width: 5rem;
  height: 5rem;
  object-fit: contain;
  filter: contrast(1.02);
}
.work-item-title {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}
.work-item h2 {
  font-size: clamp(1.875rem, 3vw, 2.5rem);
  margin-bottom: 0;
  max-width: none;
}
.title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.875rem;
}
.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  border: 1px solid rgba(200, 129, 58, 0.30);
}
.work-item-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
  max-width: 42rem;
}
.sub-section { margin-bottom: 0.5rem; }
.sub-section:last-child { margin-bottom: 0; }
.sub-section h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  font-variation-settings: "opsz" 30;
  letter-spacing: -0.012em;
  margin-bottom: 0.375rem;
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.75rem;
}
.tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-3);
  background: transparent;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  padding: 0.3rem 0.55rem;
  letter-spacing: -0.01em;
}
.page-cta {
  text-align: center;
  padding: clamp(2.5rem, 5vw, 4rem) 0 0;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--hairline);
}
.page-cta h2 {
  margin: 0 auto 1.75rem;
  max-width: 22ch;
}

.hidden-mobile { display: none; }
@media (min-width: 768px) { .hidden-mobile { display: block; } }

/* === Contact page === */
.page-contact {
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
  min-height: 100vh;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1rem;
  max-width: 42rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .form-row { grid-template-columns: 1fr 1fr; }
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.form-field label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: 0.02em;
}
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--ink-3);
}
.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
}
.form-fallback {
  font-size: 0.875rem;
  color: var(--ink-3);
  text-align: center;
  margin-top: 2rem;
}
.form-fallback a {
  color: var(--accent-deep);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.form-fallback a:hover { color: var(--ink); }

/* === Legal pages === */
.page-legal {
  padding-top: clamp(2.5rem, 5vw, 4rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  min-height: 100vh;
}
.legal-content {
  max-width: 42rem;
  margin: 0 auto;
}
.legal-content h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}
.legal-content h3 {
  font-size: 1.125rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
.legal-content h4 {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}
.legal-content p {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--ink-2);
}
.legal-content ul {
  margin: 0 0 1rem 0;
  padding-left: 1.25rem;
  color: var(--ink-2);
}
.legal-content li { margin-bottom: 0.5rem; line-height: 1.6; }
.legal-content strong { color: var(--ink); }
.legal-content a {
  color: var(--accent-deep);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* === 404 === */
.page-404 {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.page-404 h1 {
  font-size: clamp(4rem, 14vw, 9rem);
  margin-bottom: 1rem;
  font-variation-settings: "opsz" 144, "SOFT" 80;
}
.page-404 p {
  font-size: 1.125rem;
  color: var(--ink-3);
  margin-bottom: 2rem;
}

/* === Utilities === */
.svg-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

/* === Motion: subtle staggered reveal on first paint === */
.hero > .container > * {
  opacity: 0;
  transform: translateY(0.6rem);
  animation: reveal 0.75s var(--ease-out) forwards;
}
.hero > .container > *:nth-child(1) { animation-delay: 0.05s; }
.hero > .container > *:nth-child(2) { animation-delay: 0.15s; }
.hero > .container > *:nth-child(3) { animation-delay: 0.28s; }
.hero > .container > *:nth-child(4) { animation-delay: 0.42s; }
.hero > .container > *:nth-child(5) { animation-delay: 0.55s; }

@keyframes reveal {
  to { opacity: 1; transform: translateY(0); }
}
