/* ============ TOKENS ============ */
:root {
  --paper: #FBF6EE;
  --paper-deep: #F3EBDB;
  --ink: #1C1A17;
  --terracotta: #A8472E;
  --sage: #7C8466;
  --taupe: #D9CDB8;
  --taupe-line: #CBBFA8;

  --font-display: 'Fraunces', serif;
  --font-body: 'Inter', sans-serif;

  --container: 1280px;
  --gutter: clamp(20px, 5vw, 64px);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; height: 100%; object-fit: cover; }

em { font-style: italic; color: var(--terracotta); font-family: var(--font-display); }

/* subtle paper grain overlay */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 9999;
  opacity: 0.035; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ============ TYPE HELPERS ============ */
.section-eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--terracotta);
  display: block;
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.section-head {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  margin-bottom: 56px;
}

/* ============ BUTTON ============ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 16px 30px;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}
.btn-primary:hover { background: var(--terracotta); transform: translateY(-2px); }
.btn-primary:focus-visible { outline: 3px solid var(--sage); outline-offset: 3px; }

/* ============ MASTHEAD / NAV ============ */
.masthead {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(251, 246, 238, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--taupe-line);
}
.masthead-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
}
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.02em;
}
.brand-dot { color: var(--terracotta); }
.nav-links { display: flex; gap: 36px; }
.nav-links a {
  font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  position: relative; padding-bottom: 4px;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: var(--terracotta); transition: width 0.25s ease;
}
.nav-links a:hover::after { width: 100%; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); }

/* ============ HERO ============ */
.hero { padding: 130px var(--gutter) 0; }
.hero-frame { max-width: var(--container); margin: 0 auto; }

.hero-eyebrow {
  display: flex; justify-content: space-between;
  font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink); opacity: 0.6;
  padding-bottom: 18px; border-bottom: 1px solid var(--taupe-line);
  margin-bottom: 40px;
}

.hero-cover {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.hero-image {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  border-radius: 2px;
}
.hero-image img { width: 100%; height: 100%; }
.hero-image-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(28,26,23,0.75));
  color: #fff; font-size: 12px; letter-spacing: 0.05em;
  padding: 28px 16px 14px;
  font-family: var(--font-body);
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(56px, 9vw, 110px);
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.hero-title-line { display: block; }
.hero-title-italic { font-style: italic; font-weight: 500; color: var(--terracotta); margin-left: 0.05em; }

.hero-deck {
  font-size: clamp(16px, 1.8vw, 19px);
  line-height: 1.5;
  max-width: 420px;
  margin: 24px 0 28px;
  color: rgba(28,26,23,0.8);
}

.hero-meta {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--sage); text-transform: uppercase;
  margin-bottom: 32px;
}

/* ============ SERVICES / CONTACT SHEET ============ */
.services { padding: 120px 0 100px; }

.contact-sheet {
  background: var(--ink);
  padding: 0;
}

.sprocket-row {
  display: flex; gap: 14px;
  padding: 10px var(--gutter);
  overflow: hidden;
}
.sprocket-row::before, .sprocket-row::after { content: none; }
.sprocket-row {
  background-image: radial-gradient(circle, var(--paper) 3px, transparent 3px);
  background-size: 22px 100%;
  background-repeat: repeat-x;
  background-position: var(--gutter) center;
  height: 22px;
  opacity: 0.5;
}

.frames {
  max-width: var(--container);
  margin: 0 auto;
  padding: 30px var(--gutter) 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.frame {
  border-right: 1px dashed rgba(251,246,238,0.18);
  padding: 20px 22px;
  color: var(--paper);
}
.frame:nth-child(4n) { border-right: none; }

.frame-img {
  aspect-ratio: 1/1;
  overflow: hidden;
  margin-bottom: 16px;
  filter: grayscale(45%) contrast(1.05);
  transition: filter 0.4s ease;
}
.frame:hover .frame-img { filter: grayscale(0%) contrast(1.05); }
.frame-img img { width: 100%; height: 100%; }

.frame-tag {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
  color: var(--terracotta); margin-bottom: 8px;
}
.frame h3 {
  font-family: var(--font-display); font-weight: 600; font-size: 19px;
  margin-bottom: 8px; line-height: 1.2;
}
.frame p { font-size: 13.5px; line-height: 1.5; color: rgba(251,246,238,0.7); }

/* ============ SELECTED WORK / MASONRY ============ */
.work { padding: 0 0 120px; }

.masonry {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 16px;
}
.m-item { overflow: hidden; border-radius: 2px; }
.m-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.m-item:hover img { transform: scale(1.05); }
.m-tall { grid-row: span 2; }
.m-wide { grid-column: span 2; }

/* ============ ABOUT ============ */
.about { padding: 0 0 120px; }
.about-grid {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 64px;
  align-items: center;
}
.about-image { position: relative; aspect-ratio: 3/4; overflow: hidden; }
.about-image img { width: 100%; height: 100%; }
.about-image-caption {
  position: absolute; bottom: 14px; left: 14px;
  background: var(--paper); padding: 6px 12px;
  font-size: 11px; letter-spacing: 0.05em; font-weight: 600;
}
.about-copy p { font-size: 16.5px; line-height: 1.65; color: rgba(28,26,23,0.82); margin: 20px 0 0; max-width: 520px; }
.about-stats { display: flex; gap: 48px; margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--taupe-line); }
.stat-num { font-family: var(--font-display); font-weight: 700; font-size: 36px; color: var(--terracotta); display: block; }
.stat-label { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink); opacity: 0.65; }

/* ============ CONTACT ============ */
.contact { background: var(--paper-deep); padding: 110px 0 120px; border-top: 1px solid var(--taupe-line); }
.contact-inner { max-width: 720px; margin: 0 auto; padding: 0 var(--gutter); }
.contact-title { margin-bottom: 40px; }

.contact-form { display: flex; flex-direction: column; gap: 22px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field label { font-size: 12.5px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink); opacity: 0.75; }
.form-field input, .form-field select, .form-field textarea {
  font-family: var(--font-body); font-size: 15px;
  background: var(--paper); border: 1px solid var(--taupe-line);
  padding: 13px 14px; border-radius: 2px; color: var(--ink);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--terracotta);
}
.form-note { font-size: 13.5px; color: var(--sage); font-weight: 600; min-height: 18px; }

/* ============ FOOTER ============ */
.colophon { background: var(--ink); color: var(--paper); padding: 70px 0 30px; }
.colophon-inner { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.colophon-brand { font-family: var(--font-display); font-weight: 700; font-size: 28px; margin-bottom: 48px; }
.colophon-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; padding-bottom: 40px; border-bottom: 1px solid rgba(251,246,238,0.15); }
.colophon-cols div { display: flex; flex-direction: column; gap: 10px; }
.colophon-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--terracotta); font-weight: 600; margin-bottom: 6px; }
.colophon-cols a { font-size: 14.5px; color: rgba(251,246,238,0.82); }
.colophon-cols a:hover { color: var(--paper); }
.colophon-bottom { display: flex; justify-content: space-between; padding-top: 24px; font-size: 12.5px; color: rgba(251,246,238,0.55); }

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .hero-cover { grid-template-columns: 1fr; }
  .hero-image { aspect-ratio: 16/10; }
  .frames { grid-template-columns: repeat(2, 1fr); }
  .frame:nth-child(2n) { border-right: none; }
  .frame:nth-child(4n) { border-right: 1px dashed rgba(251,246,238,0.18); }
  .masonry { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
  .m-wide { grid-column: span 2; }
  .about-grid { grid-template-columns: 1fr; }
  .about-image { max-width: 420px; }
  .colophon-cols { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 640px) {
  .hero { padding-top: 110px; }
  .frames { grid-template-columns: 1fr; }
  .frame { border-right: none !important; border-bottom: 1px dashed rgba(251,246,238,0.18); }
  .form-row { grid-template-columns: 1fr; }
  .colophon-bottom { flex-direction: column; gap: 6px; }
  .hero-eyebrow { font-size: 9px; }
}
