:root {
  --ink: #14231e;
  --forest: #173c30;
  --forest-deep: #102b22;
  --sage: #bed0bf;
  --cream: #fffaf0;
  --paper: #fffdf7;
  --rose: #dba89a;
  --muted: #6f7e77;
  --line: rgba(20, 35, 30, 0.13);
  --shadow: 0 20px 70px rgba(16, 43, 34, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--paper); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

.page-width { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .75rem;
  font-weight: 800;
  color: #d8e5d7;
}
.eyebrow.dark { color: #557367; }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; }
h1 { font-size: clamp(3rem, 9vw, 6.8rem); line-height: .9; letter-spacing: -.055em; margin-bottom: 24px; }
h2 { font-size: clamp(2.1rem, 5vw, 3.8rem); line-height: 1; letter-spacing: -.035em; margin-bottom: 10px; }
h3 { font-size: 1.6rem; margin-bottom: 8px; }

.hero {
  min-height: 570px;
  position: relative;
  display: grid;
  align-items: center;
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 75% 30%, rgba(219, 168, 154, .32), transparent 26%),
    linear-gradient(135deg, #102b22, #1f4b3d 68%, #2d584a);
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 80px;
  background: var(--paper);
  clip-path: polygon(0 75%, 100% 0, 100% 100%, 0 100%);
}
.hero-content { position: relative; z-index: 2; padding: 90px 0 120px; }
.hero-content > p:not(.eyebrow) { max-width: 590px; font-size: clamp(1.05rem, 2vw, 1.35rem); color: #e4ece7; margin-bottom: 34px; }
.hero-orb { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .55; }
.hero-orb-one { width: 430px; height: 430px; right: -90px; top: -150px; border: 1px solid rgba(255,255,255,.25); }
.hero-orb-two { width: 260px; height: 260px; right: 16%; bottom: -110px; background: rgba(218, 168, 154, .15); }

.primary-button, .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  min-height: 50px;
  padding: 0 24px;
  border: 0;
  cursor: pointer;
  font-weight: 750;
  text-decoration: none;
  transition: transform .18s ease, opacity .18s ease, box-shadow .18s ease;
}
.primary-button { color: var(--forest-deep); background: #f4d7c9; box-shadow: 0 12px 34px rgba(0,0,0,.14); }
.dark-button { color: white; background: var(--forest); }
.secondary-button { color: var(--ink); background: #edf0eb; }
.primary-button:hover, .secondary-button:hover { transform: translateY(-2px); }
.primary-button:disabled { opacity: .45; cursor: default; transform: none; }

.upload-section { padding: 60px 0 100px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 28px; }
.section-heading > p { color: var(--muted); text-align: right; margin-bottom: 8px; }
.upload-card {
  padding: clamp(20px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: white;
  box-shadow: var(--shadow);
}
#photoInput { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; pointer-events: none; }
.drop-zone {
  min-height: 230px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  cursor: pointer;
  border: 2px dashed #adc0b4;
  border-radius: 20px;
  background: #f7f9f5;
  transition: border-color .18s ease, background .18s ease;
}
.drop-zone.dragging { border-color: var(--forest); background: #eef5ef; }
.drop-zone span:last-child { color: var(--muted); }
.upload-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: white; background: var(--forest); font-size: 1.5rem; margin-bottom: 8px; }
.upload-preview { display: block; max-width: min(100%, 620px); max-height: 520px; margin: 24px auto 0; border-radius: 18px; object-fit: contain; }
.form-actions { display: flex; align-items: center; gap: 20px; margin-top: 24px; }
.form-status { margin: 0; color: #51635b; font-weight: 650; }
.error-text { color: #a83a35; }

.gallery-section { padding: 90px 0 130px; background: #edf1eb; }
.photo-count { padding: 9px 15px; border-radius: 999px; color: #365347; background: rgba(255,255,255,.72); font-weight: 750; }
.gallery-grid { columns: 3 260px; column-gap: 18px; }
.photo-card { position: relative; margin-bottom: 18px; break-inside: avoid; overflow: hidden; border-radius: 18px; background: #d8dfd8; box-shadow: 0 8px 30px rgba(17,49,38,.08); }
.photo-card img { display: block; width: 100%; height: auto; min-height: 180px; object-fit: cover; }
.photo-overlay { position: absolute; inset: 0; display: flex; justify-content: end; align-items: end; padding: 14px; background: linear-gradient(transparent 55%, rgba(9,26,20,.5)); opacity: 0; transition: opacity .2s ease; }
.photo-card:hover .photo-overlay, .photo-card:focus-within .photo-overlay { opacity: 1; }
.print-chip { border: 0; border-radius: 999px; padding: 10px 16px; color: var(--forest-deep); background: rgba(255,253,247,.94); cursor: pointer; font-weight: 800; }
.empty-state { padding: 80px 20px; text-align: center; color: var(--muted); }
.empty-state > span { display: block; font-size: 2.5rem; color: var(--rose); margin-bottom: 15px; }

.access-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(135deg, #102b22, #214e40); }
.access-card { width: min(470px, 100%); padding: 48px; border-radius: 28px; text-align: center; background: var(--paper); box-shadow: var(--shadow); }
.access-card h1 { font-size: 2.6rem; line-height: 1; }
.brand-mark { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 28px; border-radius: 50%; color: white; background: var(--forest); font: 500 2rem Georgia, serif; }

.print-dialog { width: min(900px, calc(100% - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 0; border-radius: 26px; color: var(--ink); background: var(--paper); box-shadow: 0 30px 100px rgba(0,0,0,.3); }
.print-dialog::backdrop { background: rgba(10,26,20,.72); backdrop-filter: blur(6px); }
.dialog-card { position: relative; padding: clamp(22px, 4vw, 42px); }
.close-button { position: absolute; right: 18px; top: 15px; width: 40px; height: 40px; border: 0; border-radius: 50%; cursor: pointer; font-size: 1.8rem; background: #edf0eb; }
.print-layout { display: grid; grid-template-columns: minmax(220px, 330px) 1fr; gap: 42px; align-items: center; margin-top: 30px; }
.print-preview { aspect-ratio: 5 / 6; overflow: hidden; border: 10px solid white; background: #dde3dd; box-shadow: 0 10px 40px rgba(20,35,30,.18); }
.print-preview img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .12s ease; }
.print-controls { display: grid; gap: 24px; }
.print-controls label { display: grid; gap: 10px; font-weight: 750; }
.print-controls input { width: 100%; accent-color: var(--forest); }
.dialog-actions { display: flex; justify-content: end; gap: 12px; margin-top: 32px; }

.print-success { padding: 4px 10px 0; text-align: center; }
.pixel-kicker {
  display: inline-block;
  margin: 0 0 8px;
  padding: 6px 10px;
  color: #e9f3df;
  background: var(--forest-deep);
  box-shadow: 4px 4px 0 #9cb2a4;
  font: 800 .72rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .2em;
}
.printer-scene { position: relative; width: min(330px, 82vw); height: 260px; margin: 0 auto 10px; }
.pixel-printer {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 240px;
  transform: translateX(-50%);
  shape-rendering: crispEdges;
  filter: drop-shadow(8px 9px 0 rgba(23, 60, 48, .13));
}
.pixel-printer path { vector-effect: non-scaling-stroke; stroke: var(--forest-deep); stroke-width: 5; stroke-linejoin: miter; }
.printer-body { fill: #c8d9c6; }
.printer-detail { fill: #fffdf7; }
.printer-paper { fill: #f4d7c9; }
.printer-photo { fill: #dba89a; }
.printer-buttons { fill: var(--forest); }
.thought-bubble {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  width: 100px;
  height: 62px;
  border: 4px solid var(--forest-deep);
  background: var(--paper);
  box-shadow: 5px 5px 0 #c8d9c6;
}
.thought-bubble::before, .thought-bubble::after { content: ""; position: absolute; border: 4px solid var(--forest-deep); background: var(--paper); }
.thought-bubble::before { width: 15px; height: 15px; left: 3px; bottom: -23px; }
.thought-bubble::after { width: 7px; height: 7px; left: -10px; bottom: -36px; }
.thought-bubble span { display: inline-block; width: 10px; height: 10px; margin: 22px 4px 0; background: var(--forest-deep); }
.printer-quote { max-width: 600px; min-height: 3.2em; margin: 0 auto 10px; font: 500 clamp(1.45rem, 4vw, 2.25rem)/1.15 Georgia, "Times New Roman", serif; }
.queue-note { margin-bottom: 24px; color: var(--muted); font-weight: 750; }
.success-close { min-width: 170px; }
.pixel-spark { position: absolute; width: 8px; height: 8px; background: var(--rose); box-shadow: 8px 0 var(--rose), 0 8px var(--rose), 8px 8px var(--rose); }
.spark-one { left: 18px; top: 88px; }
.spark-two { right: 28px; top: 112px; transform: scale(.7); }
.spark-three { left: 42px; bottom: 24px; transform: scale(.55); }

.print-success.is-animating .pixel-printer { animation: printer-work 1s steps(2, end) infinite; }
.print-success.is-animating .printer-paper { animation: paper-feed 1.35s steps(5, end) infinite; transform-origin: center bottom; }
.print-success.is-animating .thought-bubble { animation: think-bob 1.6s steps(2, end) infinite; }
.print-success.is-animating .thought-bubble span { animation: thinking-dot 1.2s steps(2, end) infinite; }
.print-success.is-animating .thought-bubble span:nth-child(2) { animation-delay: .2s; }
.print-success.is-animating .thought-bubble span:nth-child(3) { animation-delay: .4s; }
.print-success.is-animating .pixel-spark { animation: pixel-blink .8s steps(1, end) infinite; }

@keyframes printer-work { 50% { transform: translateX(-50%) translateY(3px); } }
@keyframes paper-feed { 50% { transform: translateY(8px); } }
@keyframes think-bob { 50% { transform: translateY(-5px); } }
@keyframes thinking-dot { 50% { opacity: .25; transform: translateY(-3px); } }
@keyframes pixel-blink { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .print-success.is-animating .pixel-printer,
  .print-success.is-animating .printer-paper,
  .print-success.is-animating .thought-bubble,
  .print-success.is-animating .thought-bubble span,
  .print-success.is-animating .pixel-spark { animation: none; }
}

@media (max-width: 680px) {
  .page-width { width: min(100% - 28px, 1180px); }
  .hero { min-height: 520px; }
  .section-heading { display: block; }
  .section-heading > p { text-align: left; }
  .form-actions { align-items: stretch; flex-direction: column; }
  .gallery-grid { columns: 2 145px; column-gap: 10px; }
  .photo-card { margin-bottom: 10px; border-radius: 12px; }
  .photo-overlay { opacity: 1; padding: 8px; }
  .print-layout { grid-template-columns: 150px 1fr; gap: 20px; }
  .dialog-actions { flex-direction: column-reverse; }
  .access-card { padding: 34px 24px; }
}
