/* Mary Montagu Books — modernist, monochrome, deliberate negative space.
   Inspired by Swiss/grotesque editorial layouts. */

:root {
  --ink:       #0e0d0b;
  --ink-soft:  #2c2a26;
  --ink-2:     #5a564f;
  --muted:     #8e887d;
  --rule:      #d4cdbe;
  --rule-soft: #e8e3d6;
  --paper:     #ece7da;     /* warm bone, like the tacto background */
  --paper-2:   #f3efe5;
  --paper-3:   #ffffff;
  --accent:    #2f30e6;     /* electric indigo — used very sparingly */
  --danger:    #8b2e1f;

  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --mono:  ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --measure: 36rem;
  --shell:   84rem;
  --gutter:  clamp(1.25rem, 4vw, 3rem);
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}

::selection { background: var(--ink); color: var(--paper); }

a { color: inherit; text-decoration: none; }
a.link {
  position: relative;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  transition: opacity 160ms ease;
}
a.link:hover { opacity: 0.65; }
a.accent { color: var(--accent); }

/* ── Header ────────────────────────────────────────────────────────── */

.site-header {
  position: relative;
  z-index: 10;
}
.site-header-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 1.75rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2.25rem);
}
.site-nav-link {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-2);
  font-weight: 500;
  transition: color 180ms ease;
}
.site-nav-link:hover { color: var(--ink); }
@media (max-width: 560px) {
  .site-nav { display: none; }
  .site-header-inner { padding-top: 1.25rem; padding-bottom: 1.25rem; }
}

/* ── Layout ────────────────────────────────────────────────────────── */

main { max-width: var(--shell); margin: 0 auto; padding: 0 var(--gutter); }

.shell-narrow { max-width: 56rem; margin: 0 auto; }

.site-footer {
  margin-top: 6rem;
  border-top: 1px solid var(--rule);
}
.site-footer-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 1.5rem var(--gutter);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

/* ── Type ──────────────────────────────────────────────────────────── */

h1, h2, h3 {
  font-family: var(--sans);
  font-weight: 500;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.025em;
  line-height: 1;
}
h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
}

p { margin: 0 0 1rem; max-width: var(--measure); }

.lead {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.4;
  color: var(--ink-soft);
  letter-spacing: -0.005em;
  max-width: 36rem;
}

.muted { color: var(--muted); font-size: 0.88rem; }

.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.tag {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
  font-weight: 500;
}
.tag-dot::before {
  content: "";
  display: inline-block;
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 0.6rem;
  transform: translateY(-2px);
}

code {
  font-family: var(--mono);
  font-size: 0.85em;
  color: var(--ink-soft);
  background: var(--rule-soft);
  padding: 0.1em 0.4em;
  border-radius: 2px;
}

/* ── Hero (tacto-style) ────────────────────────────────────────────── */

.hero {
  padding: clamp(3rem, 9vw, 7rem) 0 1.5rem;
  position: relative;
}

.hero-meta-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: clamp(2rem, 6vw, 5rem);
}

.hero-headline {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(4rem, 16vw, 14rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  color: var(--ink);
  margin: 0;
  display: block;
}
.hero-headline em {
  font-style: italic;
  font-weight: 400;
  font-family: var(--serif);
  letter-spacing: -0.02em;
  font-size: 0.92em;
}

.hero-rule {
  border: 0;
  border-top: 1px solid var(--ink);
  margin: clamp(0.5rem, 1vw, 1rem) 0 1.5rem;
  width: 100%;
}

.hero-sub {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(1.4rem, 3vw, 2.25rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 2.5rem;
  max-width: none;
}

.hero-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  flex-wrap: wrap;
  padding-top: 1rem;
}
.hero-foot-text {
  max-width: 28rem;
  font-size: 0.92rem;
  color: var(--ink-2);
  margin: 0;
}
.hero-foot-text small {
  display: block;
  margin-top: 0.65rem;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

/* ── Section primitives ────────────────────────────────────────────── */

.section {
  padding: clamp(3rem, 7vw, 6rem) 0;
  border-top: 1px solid var(--rule);
}

.section-head {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 2rem;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
  align-items: baseline;
}
.section-num {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  letter-spacing: -0.025em;
  font-weight: 500;
}

.two-col {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 2rem;
  align-items: start;
}

/* ── Specs row ─────────────────────────────────────────────────────── */

.specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2rem;
  margin: 2.5rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}
.spec dt {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
  font-weight: 500;
}
.spec dd {
  margin: 0;
  font-size: 1.1rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}

/* ── Form ──────────────────────────────────────────────────────────── */

.job-form { display: grid; gap: 1.75rem; max-width: 36rem; }

.field { display: flex; flex-direction: column; gap: 0.5rem; }

.field-label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
}
.field-label .opt {
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--muted);
  margin-left: 0.5rem;
  font-size: 0.78rem;
}

.field-hint { font-size: 0.78rem; color: var(--muted); margin: 0; }

.field input[type="text"],
.field input[type="email"],
.field textarea {
  font-family: var(--sans);
  font-size: 1.05rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  padding: 0.45rem 0 0.6rem;
  width: 100%;
  outline: none;
  transition: border-color 160ms ease;
  letter-spacing: -0.005em;
}
.field input:focus, .field textarea:focus { border-bottom-color: var(--ink); }
.field input::placeholder, .field textarea::placeholder {
  color: #b4ad9f;
}
.field textarea { resize: vertical; min-height: 4.5rem; line-height: 1.45; }

.file-field {
  border: 1px dashed var(--rule);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
  position: relative;
}
.file-field:hover { border-color: var(--ink-soft); background: var(--paper-2); }
.file-field input[type="file"] {
  position: absolute;
  width: 1px; height: 1px; opacity: 0; overflow: hidden;
}
.file-field-text { font-size: 1rem; color: var(--ink); }
.file-field-text small {
  display: block; font-size: 0.74rem; color: var(--muted);
  margin-top: 0.3rem; letter-spacing: 0.04em;
}
.file-field-cta {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
}

.form-actions {
  margin-top: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* ── Buttons ───────────────────────────────────────────────────────── */

.button, button.button, button[type="submit"] {
  -webkit-appearance: none;
  appearance: none;
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  padding: 1rem 1.75rem;
  cursor: pointer;
  text-decoration: none;
  border-radius: 0;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
  line-height: 1;
}
.button:hover, button.button:hover, button[type="submit"]:hover {
  background: var(--paper);
  color: var(--ink);
}

.button-ghost {
  color: var(--ink); background: transparent; border: 1px solid var(--ink);
}
.button-ghost:hover { background: var(--ink); color: var(--paper); }

.button-accent {
  color: var(--paper-3); background: var(--accent); border-color: var(--accent);
}
.button-accent:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.button-link {
  background: transparent; border: 0;
  border-bottom: 1px solid var(--ink); color: var(--ink);
  padding: 0.25rem 0; letter-spacing: 0.18em;
}
.button-link:hover { background: transparent; color: var(--ink); border-bottom-width: 2px; }

.button-sm { padding: 0.65rem 1.1rem; font-size: 0.66rem; letter-spacing: 0.18em; }

.cta-row {
  display: flex; gap: 1rem; flex-wrap: wrap; align-items: center;
  margin-top: 1.5rem;
}
.cta-row .arrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); font-weight: 500;
}
.cta-row .arrow:hover .arrow-glyph { transform: translateX(4px); }
.arrow-glyph { transition: transform 200ms ease; }

/* ── Status ────────────────────────────────────────────────────────── */

.status-bar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  padding: 1.25rem 0;
  border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
  margin: 1.5rem 0 2rem;
  flex-wrap: wrap;
}
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--muted);
  display: inline-block;
  flex-shrink: 0;
}
.status-bar[data-status="ready"]   .status-dot { background: #2f6d3d; }
.status-bar[data-status="failed"]  .status-dot { background: var(--danger); }
.status-bar[data-status="pending"] .status-dot,
.status-bar[data-status="running"] .status-dot,
.status-bar[data-status="queued"]  .status-dot {
  background: var(--accent);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.35; transform: scale(0.85); }
}
.status-meta {
  font-size: 0.75rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-soft);
  font-weight: 400;
  margin-left: auto;
}

/* ── Job page ──────────────────────────────────────────────────────── */

.job-head { margin-bottom: 1.5rem; }
.job-title {
  font-size: clamp(2.5rem, 7vw, 5rem);
  letter-spacing: -0.035em;
  font-weight: 500;
  line-height: 0.95;
}
.job-subtitle {
  font-family: var(--sans);
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  color: var(--ink-2);
  margin: 0.5rem 0 0;
  letter-spacing: -0.015em;
  font-weight: 400;
}
.job-id {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-top: 1.25rem;
}

.pdf-actions {
  display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 0 0 2.5rem;
}

/* Cover preview — shown above the flipbook on ready jobs */
.cover-preview {
  margin: 2rem 0 2rem;
  padding: clamp(1rem, 3vw, 2rem);
  background: var(--paper-2);
  border: 1px solid var(--rule-soft);
  border-radius: 4px;
}
.cover-preview img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  background: white;
}
.cover-preview figcaption {
  margin-top: 1rem;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  text-align: center;
}

/* ── Flipbook ──────────────────────────────────────────────────────── */

.flipbook-wrap {
  margin: 2.5rem 0 1rem;
  padding: clamp(1.5rem, 4vw, 3rem);
  background: var(--paper-2);
  border: 1px solid var(--rule-soft);
}
.flipbook {
  width: 100%;
  max-width: 760px;
  aspect-ratio: 4 / 3;
  margin: 0 auto;
  background: transparent;
  overflow: hidden;
}
.flipbook-page { background: white; }
.flipbook-page img { width: 100%; height: 100%; object-fit: contain; }

.flipbook-controls {
  display: flex; align-items: center; justify-content: center;
  gap: 1.5rem; margin-top: 1.5rem;
}
.flip-num {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  min-width: 4rem; text-align: center;
}

.scroll-preview { display: none; margin: 2rem 0; }
.scroll-page {
  display: block; width: 100%; max-width: 600px;
  margin: 0 auto 1rem; border: 1px solid var(--rule-soft);
}

/* ── Build loading animation ──────────────────────────────────────── */

.build-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  padding: clamp(3rem, 8vw, 6rem) 0;
  text-align: center;
}

/* Book loader — 3D page-turning book */
.book-loader {
  position: relative;
  width: 100px;
  height: 130px;
  animation: book-float 4s ease-in-out infinite;
}
@keyframes book-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

.book-loader-inner {
  position: relative;
  width: 80px;
  height: 110px;
  margin: 0 auto;
  perspective: 400px;
  transform-style: preserve-3d;
}

.book-loader-cover {
  position: absolute;
  inset: 0;
  background: var(--ink);
  border-radius: 2px 4px 4px 2px;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.18);
}

.book-loader-spine {
  position: absolute;
  left: 0;
  top: 0;
  width: 6px;
  height: 100%;
  background: var(--ink-soft);
  border-radius: 2px 0 0 2px;
  z-index: 5;
}

.book-loader-page {
  position: absolute;
  top: 4px;
  left: 6px;
  right: 4px;
  bottom: 4px;
  background: var(--paper-3);
  border-radius: 0 3px 3px 0;
  transform-origin: left center;
  animation: page-turn 3s ease-in-out infinite;
  box-shadow: -1px 0 3px rgba(0, 0, 0, 0.06);
}
.book-loader-p1 { animation-delay: 0s; z-index: 4; }
.book-loader-p2 { animation-delay: 0.4s; z-index: 3; }
.book-loader-p3 { animation-delay: 0.8s; z-index: 2; }

@keyframes page-turn {
  0%, 30%  { transform: rotateY(0deg); }
  50%      { transform: rotateY(-155deg); }
  70%, 100% { transform: rotateY(0deg); }
}

.book-loader-shadow {
  width: 70px;
  height: 10px;
  margin: 12px auto 0;
  background: radial-gradient(ellipse, rgba(0,0,0,0.12) 0%, transparent 70%);
  animation: shadow-pulse 4s ease-in-out infinite;
}
@keyframes shadow-pulse {
  0%, 100% { transform: scaleX(1); opacity: 1; }
  50%      { transform: scaleX(0.7); opacity: 0.5; }
}

/* Loading text */
.build-loading-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.build-loading-headline {
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0;
}

.build-loading-steps {
  height: 1.5em;
  overflow: hidden;
  position: relative;
}
.build-loading-steps span {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  animation: step-cycle 12s ease-in-out infinite;
  opacity: 0;
  position: absolute;
  width: 100%;
  text-align: center;
}
.build-loading-steps span:nth-child(1) { animation-delay: 0s; }
.build-loading-steps span:nth-child(2) { animation-delay: 3s; }
.build-loading-steps span:nth-child(3) { animation-delay: 6s; }
.build-loading-steps span:nth-child(4) { animation-delay: 9s; }

@keyframes step-cycle {
  0%, 4%   { opacity: 0; transform: translateY(8px); }
  8%, 21%  { opacity: 1; transform: translateY(0); }
  25%, 100% { opacity: 0; transform: translateY(-8px); }
}

.build-loading-hint {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin: 0.5rem 0 0;
}

@media (prefers-reduced-motion: reduce) {
  .book-loader,
  .book-loader-page,
  .book-loader-shadow,
  .build-loading-steps span {
    animation: none;
  }
  .build-loading-steps span:first-child {
    opacity: 1;
    position: static;
  }
}

/* ── Errors & details ──────────────────────────────────────────────── */

.error-box {
  border-left: 2px solid var(--danger);
  padding: 0.5rem 0 0.5rem 1.25rem;
  margin: 1.5rem 0;
}
.error-box h2 {
  color: var(--danger);
  font-size: 1.2rem; margin-bottom: 0.5rem; letter-spacing: -0.01em;
}
.error-box pre {
  white-space: pre-wrap;
  font-family: var(--mono); font-size: 0.82rem; color: var(--ink-soft);
  margin: 0;
}

.build-report {
  margin: 1.5rem 0;
  padding: 1rem 0;
  border-top: 1px solid var(--rule-soft);
}
.build-report summary {
  cursor: pointer;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  list-style: none;
}
.build-report summary::-webkit-details-marker { display: none; }
.build-report summary::after { content: " ↓"; }
.build-report[open] summary::after { content: " ↑"; }
.build-report ul { margin: 1rem 0 0; padding-left: 1.25rem; }
.build-report li { font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 0.35rem; }

/* ══════════════════════════════════════════════════════════════════════
   Landing page — single-focus hero, gallery band, centered form
   ══════════════════════════════════════════════════════════════════════ */

.landing-hero-v2 {
  max-width: 48rem;
  margin: 0 auto;
  padding: clamp(4.5rem, 12vw, 8rem) 0 clamp(3.5rem, 8vw, 5.5rem);
  text-align: left;
}

.landing-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin: 0 0 1.5rem;
}

.landing-headline {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(2.75rem, 7vw, 5rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 2.5rem;
  max-width: 18ch;
}

.landing-lede {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.65;
  letter-spacing: 0.003em;
  color: var(--ink-2);
  max-width: 34rem;
  margin: 0 0 2.5rem;
}

.landing-cta {
  margin-top: 1.5rem;
}

/* Gallery band — full-width, just the two scrolling rows */
.gallery-band {
  padding: 1rem 0 clamp(3rem, 6vw, 5rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: hidden;
}
.gallery-row {
  display: flex;
  overflow: hidden;
  padding: 0.4rem 0;
}
.gallery-track {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
  animation: gallery-scroll 32s linear infinite;
  will-change: transform;
}
.gallery-row + .gallery-row .gallery-track {
  animation-direction: reverse;
  animation-duration: 40s;
}
.gallery-tile {
  flex-shrink: 0;
  width: 14rem;
  height: 10rem;
  border-radius: 24px;
  overflow: hidden;
  background: var(--rule-soft);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
@media (min-width: 640px) {
  .gallery-tile { width: 18rem; height: 13rem; }
}
.gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@keyframes gallery-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-track { animation: none; }
}

/* Form section — centered, own breathing room */
.order-section {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 0 clamp(2.5rem, 5vw, 4rem);
}

.order-card {
  border-radius: 34px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.6);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.order-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
}
.order-card-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.order-card-title {
  font-weight: 300;
  font-size: clamp(1.3rem, 2.5vw, 1.6rem);
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0.75rem 0 0;
}
.order-card-badge {
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: rgba(255, 255, 255, 0.8);
  padding: 0.35rem 0.85rem;
  font-size: 0.72rem;
  color: var(--ink-2);
  white-space: nowrap;
}
@media (max-width: 560px) {
  .order-card-badge { display: none; }
  .gallery-band { gap: 0.65rem; }
  .gallery-tile { width: 11rem; height: 8rem; border-radius: 16px; }
  .order-field input[type="text"],
  .order-field input[type="email"],
  .order-field textarea {
    font-size: max(1rem, 16px);
  }
}

.order-form {
  display: grid;
  gap: 2rem;
}
.order-field {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.order-field-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
}
.order-field-label .opt {
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--muted);
  font-weight: 400;
  font-size: 0.78rem;
}
.order-field input[type="text"],
.order-field input[type="email"],
.order-field textarea {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  letter-spacing: -0.03em;
  color: var(--ink);
  background: transparent;
  border: 0;
  padding: 0;
  outline: none;
  width: 100%;
  line-height: 1.2;
}
.order-field input::placeholder,
.order-field textarea::placeholder {
  color: #bdb5a4;
  font-weight: 300;
}
.order-field textarea {
  resize: none;
  min-height: 4.5rem;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  line-height: 1.35;
}
.order-field-hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.25rem 0 0;
  line-height: 1.5;
}

/* Photo upload tile */
.upload-tile {
  border-radius: 28px;
  border: 1px dashed var(--rule);
  background: var(--paper-2);
  padding: 1.5rem;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease;
  display: block;
}
.upload-tile:hover {
  border-color: var(--ink-soft);
  background: var(--paper-3);
}
.upload-tile input[type="file"] {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0; overflow: hidden;
}
.upload-tile-row {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
@media (min-width: 560px) {
  .upload-tile-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.upload-tile-lead {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.upload-tile-lead svg { width: 20px; height: 20px; color: var(--ink-soft); }
.upload-tile-sub {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0.4rem 0 0;
}
.upload-tile-count {
  font-size: 0.85rem;
  color: var(--ink-2);
  margin: 0.6rem 0 0;
}
.upload-tile-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  align-self: flex-start;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 3px;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 500;
}
.upload-tile-cta svg { width: 14px; height: 14px; }

/* File list preview */
.file-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin-top: 1rem;
}
@media (min-width: 560px) {
  .file-list { grid-template-columns: repeat(2, 1fr); }
}
.file-chip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 16px;
  border: 1px solid var(--rule-soft);
  background: rgba(255, 255, 255, 0.8);
  padding: 0.7rem 1rem;
  font-size: 0.88rem;
  color: var(--ink-2);
  min-width: 0;
}
.file-chip svg { width: 14px; height: 14px; color: var(--ink); flex-shrink: 0; }
.file-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-chip-more {
  border-radius: 16px;
  border: 1px solid var(--rule-soft);
  background: rgba(255, 255, 255, 0.7);
  padding: 0.7rem 1rem;
  font-size: 0.88rem;
  color: var(--muted);
}

/* Upload progress */
.upload-progress-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.upload-progress-name {
  font-size: 0.82rem;
  color: var(--ink-2);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 0 0 40%;
}
.upload-progress-bar {
  flex: 1;
  height: 4px;
  background: var(--rule-soft);
  border-radius: 2px;
  overflow: hidden;
}
.upload-progress-fill {
  height: 100%;
  width: 0;
  background: var(--ink);
  border-radius: 2px;
  transition: width 200ms ease;
}

/* Pill submit button */
.order-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 0.5rem;
}
@media (min-width: 560px) {
  .order-actions {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.order-actions-note {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
  max-width: 22rem;
}
.pill-button {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  padding: 0.9rem 1.5rem;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: none;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}
.pill-button:hover {
  background: var(--ink-soft);
  transform: translateY(-1px);
}
.pill-button[disabled] {
  cursor: progress;
  opacity: 0.85;
  transform: none;
}
.pill-button svg { width: 14px; height: 14px; }
.pill-button-spinner { display: none; animation: pill-spin 900ms linear infinite; }
.pill-button.is-busy .pill-button-spinner { display: inline; }
.pill-button.is-busy .pill-button-arrow { display: none; }
@keyframes pill-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .pill-button-spinner { animation: none; }
}

/* Bottom "how it works" row */
.how-row {
  display: grid;
  gap: 1rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--rule);
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .how-row { grid-template-columns: repeat(3, 1fr); }
}
.how-card {
  border-radius: 28px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.4);
  padding: 1.5rem;
}
.how-step {
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 1.25rem;
}
.how-title {
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 0.5rem;
}
.how-text {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
}

/* ── Responsive ────────────────────────────────────────────────────── */

@media (max-width: 720px) {
  .nav-center { display: none; }
  .section-head, .two-col {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .form-actions { flex-direction: column; align-items: stretch; }
  .form-actions .button { width: 100%; text-align: center; }
  .hero-foot { flex-direction: column; align-items: flex-start; }
  .file-field { flex-direction: column; align-items: flex-start; }
  .site-footer-inner { flex-direction: column; align-items: center; text-align: center; gap: 0.5rem; }
}
