/* ==========================================================================
   PawShot Studio — shared stylesheet
   Used by: index.html (landing) and studio.html (generator)
   Edit design tokens in :root once; both pages update.
   ========================================================================== */

:root {
  --paper: #FBF6EE;
  --paper-deep: #F6E7D7;
  --ink: #3B2A1F;
  --ink-soft: #6E5A4B;
  --amber: #D9962E;
  --amber-deep: #B5781D;
  --amber-soft: #F3D9A8;
  --white: #FFFDF9;
  --line: #E8D9C4;
  --shadow: 0 10px 30px rgba(89, 62, 30, 0.12);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Nunito Sans', system-ui, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
a { color: inherit; }
button { font-family: inherit; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 6px; }

/* ---------- Header ---------- */
header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 0;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 42px; height: 42px; border-radius: 11px; }
.brand span {
  font-family: 'Fraunces', serif; font-size: 1.3rem; font-weight: 650;
}
.header-cta {
  font-size: 0.9rem; font-weight: 700; color: var(--amber-deep);
  text-decoration: none; border: 2px solid var(--amber-soft); background: var(--white);
  padding: 10px 20px; border-radius: 999px; transition: all .2s ease; cursor: pointer;
  white-space: nowrap; text-align: center; line-height: 1;
}
.header-cta:hover { border-color: var(--amber); background: var(--amber-soft); }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px;
  align-items: center; padding: 56px 0 72px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--amber-deep);
  background: var(--amber-soft); border-radius: 999px;
  padding: 7px 16px; margin-bottom: 22px;
}
.eyebrow svg { width: 14px; height: 14px; }
h1 {
  font-family: 'Fraunces', serif; font-weight: 650;
  font-size: clamp(2.4rem, 5.4vw, 3.7rem);
  line-height: 1.07; letter-spacing: -0.01em; margin-bottom: 20px;
}
h1 em { font-style: italic; color: var(--amber-deep); }
.sub {
  font-size: clamp(1rem, 1.8vw, 1.13rem); color: var(--ink-soft);
  max-width: 480px; margin-bottom: 34px;
}

/* ---------- Signup ---------- */
.signup { max-width: 460px; }
.signup-row { display: flex; gap: 10px; }
.signup input[type="email"] {
  flex: 1; padding: 15px 20px; border-radius: 999px;
  border: 2px solid var(--line); background: var(--white);
  color: var(--ink); font-size: 1rem; font-family: inherit; outline: none;
  transition: border-color .2s;
}
.signup input[type="email"]:focus { border-color: var(--amber); }
.signup input::placeholder { color: #B5A28D; }
.signup button {
  padding: 15px 26px; border-radius: 999px; border: none; cursor: pointer;
  background: var(--amber); color: var(--white);
  font-weight: 800; font-size: 1rem;
  transition: background .2s, transform .15s; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(217, 150, 46, 0.35);
}
.signup button:hover { background: var(--amber-deep); transform: translateY(-1px); }
.signup button:disabled { opacity: 0.6; cursor: wait; transform: none; }
.signup-note {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 0.86rem; color: var(--ink-soft); margin-top: 14px; font-weight: 600;
}
.signup-note svg { width: 16px; height: 16px; color: var(--amber-deep); flex-shrink: 0; margin-top: 3px; }
.signup-msg { margin-top: 12px; font-size: 0.95rem; font-weight: 700; min-height: 1.4em; }
.signup-msg.ok { color: #4D7C3A; }
.signup-msg.err { color: #C0533E; }

/* ---------- Polaroid (shared by hero stack, gallery, and studio results) ---------- */
.stack { position: relative; height: 480px; }
.polaroid {
  position: absolute; background: var(--white);
  padding: 12px 12px 46px; border-radius: 6px;
  box-shadow: var(--shadow);
  transition: transform .25s ease;
}
.polaroid img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 3px; }
.polaroid .label {
  position: absolute; bottom: 12px; left: 0; right: 0; text-align: center;
  font-family: 'Fraunces', serif; font-style: italic; font-weight: 550;
  font-size: 1rem; color: var(--ink-soft);
}
.polaroid::before {
  content: ""; position: absolute; top: -12px; left: 50%; transform: translateX(-50%) rotate(-3deg);
  width: 84px; height: 26px; background: rgba(243, 217, 168, 0.85);
  border-left: 1px dashed rgba(181, 120, 29, 0.3); border-right: 1px dashed rgba(181, 120, 29, 0.3);
}
.polaroid:hover { transform: rotate(0deg) scale(1.04) !important; z-index: 10; }
.p1 { width: 56%; height: 330px; top: 0; left: 0; transform: rotate(-5deg); z-index: 3; }
.p2 { width: 52%; height: 300px; top: 60px; right: 0; transform: rotate(4deg); z-index: 2; }
.p3 { width: 48%; height: 270px; bottom: 0; left: 22%; transform: rotate(-2deg); z-index: 1; }

/* ---------- Section headings ---------- */
section { padding: 64px 0; }
.kicker {
  text-align: center; font-size: 0.8rem; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber-deep);
  margin-bottom: 10px;
}
h2 {
  font-family: 'Fraunces', serif; font-weight: 650;
  font-size: clamp(1.8rem, 3.6vw, 2.5rem); text-align: center;
  margin-bottom: 14px;
}
.section-sub {
  text-align: center; color: var(--ink-soft); max-width: 520px;
  margin: 0 auto 48px;
}

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step {
  background: var(--white); border: 1px solid var(--line);
  border-radius: 20px; padding: 32px 28px; text-align: center;
  transition: transform .2s ease, box-shadow .2s ease;
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.step-icon {
  width: 58px; height: 58px; margin: 0 auto 18px;
  background: var(--amber-soft); border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
}
.step-icon svg { width: 28px; height: 28px; color: var(--amber-deep); }
.step h3 { font-family: 'Fraunces', serif; font-size: 1.2rem; font-weight: 650; margin-bottom: 8px; }
.step p { font-size: 0.94rem; color: var(--ink-soft); }

/* ---------- Gallery ---------- */
.gallery { background: var(--paper-deep); border-radius: 32px; padding: 64px 40px; }
.gallery-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px;
  max-width: 920px; margin: 0 auto;
}
.gallery .polaroid { position: relative; height: auto; }
.gallery .polaroid img { aspect-ratio: 4 / 5; }
.g1 { transform: rotate(-2.5deg); }
.g2 { transform: rotate(1.5deg); }
.g3 { transform: rotate(-1deg); }

/* ---------- Gift band ---------- */
.gift {
  display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center;
  background: var(--white); border: 2px dashed var(--amber-soft);
  border-radius: 24px; padding: 40px 44px; margin-top: 8px;
}
.gift-icon {
  width: 72px; height: 72px; background: var(--amber-soft); border-radius: 22px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.gift-icon svg { width: 36px; height: 36px; color: var(--amber-deep); }
.gift h2 { text-align: left; font-size: clamp(1.4rem, 2.6vw, 1.8rem); margin-bottom: 8px; }
.gift p { color: var(--ink-soft); max-width: 560px; }
.gift strong { color: var(--amber-deep); }
.coming-soon-badge {
  display: inline-block; vertical-align: middle; margin-left: 10px;
  font-family: 'Nunito Sans', system-ui, sans-serif;
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--amber-deep); background: var(--amber-soft);
  border-radius: 999px; padding: 5px 12px; white-space: nowrap;
}

.bottom-cta { padding-top: 24px; }
.signup-center { margin: 0 auto; }
.signup-center .signup-msg { text-align: center; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--line); padding: 32px 0 48px; margin-top: 32px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.84rem; color: var(--ink-soft); flex-wrap: wrap; gap: 12px;
}

/* ==========================================================================
   STUDIO / GENERATOR PAGE (studio.html)
   Same tokens, same polaroid language as the landing page.
   ========================================================================== */
.studio { padding: 32px 0 80px; }
.studio-intro { text-align: center; margin-bottom: 34px; }
.studio-intro h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 10px; }
.studio-intro p { color: var(--ink-soft); max-width: 460px; margin: 0 auto; }

.panel {
  background: var(--white); border: 1px solid var(--line);
  border-radius: 24px; padding: 28px; margin-bottom: 20px;
}
.panel-step {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.8rem; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--amber-deep); margin-bottom: 18px;
}
.panel-step .num {
  width: 26px; height: 26px; border-radius: 999px; background: var(--amber-soft);
  display: flex; align-items: center; justify-content: center; font-size: 0.85rem;
}

.drop {
  border: 2px dashed var(--amber-soft); border-radius: 18px;
  padding: 30px; text-align: center; cursor: pointer;
  color: var(--ink-soft); font-weight: 700; background: var(--paper);
  transition: border-color .2s, background .2s, transform .15s, box-shadow .2s, color .2s;
}
.drop:hover { border-color: var(--amber); background: var(--white); }
.drop-text { pointer-events: none; }
/* active state while a photo is dragged over the zone */
.drop.drag {
  border-style: solid; border-color: var(--amber);
  background: var(--amber-soft); color: var(--amber-deep);
  transform: scale(1.01);
  animation: dropPulse 1s ease-in-out infinite;
}
@keyframes dropPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217, 150, 46, 0); }
  50% { box-shadow: 0 0 0 6px rgba(217, 150, 46, 0.18); }
}
.thumbs { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.thumb { width: 84px; height: 84px; border-radius: 12px; object-fit: cover; border: 2px solid var(--line); }
.thumb.loading {
  display: flex; align-items: center; justify-content: center;
  background: var(--paper-deep); font-size: 0.8rem; color: var(--ink-soft); font-weight: 700;
}

.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.chip {
  border: 2px solid var(--line); background: var(--white); border-radius: 999px;
  padding: 12px 14px; text-align: center; cursor: pointer;
  font-weight: 700; font-size: 0.95rem; color: var(--ink); transition: .18s; user-select: none;
}
.chip:hover { border-color: var(--amber-soft); }
.chip.on { border-color: var(--amber); background: var(--amber-soft); color: var(--amber-deep); }
.chip-hint { font-size: 0.85rem; color: var(--ink-soft); margin-top: 14px; text-align: center; }

.btn-primary {
  width: 100%; padding: 16px; border-radius: 999px; border: none; cursor: pointer;
  background: var(--amber); color: var(--white); font-weight: 800; font-size: 1.05rem;
  box-shadow: 0 6px 18px rgba(217, 150, 46, 0.35);
  transition: background .2s, transform .15s;
}
.btn-primary:hover { background: var(--amber-deep); transform: translateY(-1px); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; transform: none; }
/* anchor variant of the primary button (landing-page CTAs) */
a.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  text-align: center; text-decoration: none; box-sizing: border-box;
}

.studio-err { text-align: center; color: #C0533E; font-weight: 700; margin-top: 14px; min-height: 1.2em; }

.results {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px;
  max-width: 860px; margin: 36px auto 0;
}
.results .polaroid { position: relative; height: auto; }
.results .polaroid img { aspect-ratio: 4 / 5; }
.results .r0 { transform: rotate(-2deg); }
.results .r1 { transform: rotate(1.5deg); }
.results .r2 { transform: rotate(-1deg); }
.results .shimmer {
  aspect-ratio: 4 / 5; border-radius: 3px; display: flex;
  align-items: center; justify-content: center; text-align: center;
  color: var(--ink-soft); font-weight: 700; font-size: 0.9rem;
  background: linear-gradient(100deg, var(--paper-deep) 30%, #fff 50%, var(--paper-deep) 70%);
  background-size: 200% 100%; animation: sweep 1.4s infinite;
}
@keyframes sweep { to { background-position: -200% 0; } }
.results-note { text-align: center; color: var(--ink-soft); font-weight: 600; margin-top: 26px; }
.results-note b { color: var(--amber-deep); }

/* two-takes-per-scene picker */
.scene-group { margin-bottom: 34px; }
.scene-title {
  text-align: center; font-family: 'Fraunces', serif; font-style: italic;
  font-weight: 550; font-size: 1.15rem; color: var(--ink-soft); margin-bottom: 16px;
}
.variants {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px; max-width: 560px; margin: 0 auto;
}
.variant { cursor: pointer; }
.variant .pick-badge {
  position: absolute; top: 20px; right: 20px; width: 30px; height: 30px;
  border-radius: 999px; background: var(--amber); color: var(--white);
  display: none; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.95rem; box-shadow: 0 2px 8px rgba(89, 62, 30, 0.3); z-index: 5;
}
.variant.picked { outline: 3px solid var(--amber); outline-offset: 3px; }
.variant.picked .pick-badge { display: flex; }
.pick-hint { text-align: center; color: var(--ink-soft); font-weight: 700; margin: 2px 0 22px; }
#checkout { max-width: 460px; margin: 6px auto 0; display: block; }

/* start over */
.btn-ghost {
  display: block; margin: 14px auto 0; background: none; border: none;
  color: var(--ink-soft); font-weight: 700; font-size: 0.92rem; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.btn-ghost:hover { color: var(--amber-deep); }

/* generation progress */
.progress { max-width: 460px; margin: 10px auto 26px; }
.progress-track { height: 10px; border-radius: 999px; background: var(--paper-deep); overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--amber); border-radius: 999px; transition: width .4s ease; }
.progress.indeterminate .progress-fill { width: 38%; animation: indet 1.2s ease-in-out infinite; }
@keyframes indet { 0% { margin-left: -38%; } 100% { margin-left: 100%; } }
.progress-label { text-align: center; color: var(--ink-soft); font-weight: 700; font-size: 0.9rem; margin-top: 10px; }

/* full-size preview lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(31, 21, 12, 0.84);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: min(86vw, 560px); max-height: 68vh; border-radius: 10px;
  background: #fff; box-shadow: var(--shadow);
}
.lb-close {
  position: absolute; top: 16px; right: 22px; background: none; border: none;
  color: #fff; font-size: 2.2rem; line-height: 1; cursor: pointer;
}
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); border: none; cursor: pointer;
  background: rgba(255, 255, 255, 0.16); color: #fff; font-size: 2rem; line-height: 1;
  width: 48px; height: 48px; border-radius: 999px;
}
.lb-nav:hover { background: rgba(255, 255, 255, 0.28); }
.lb-prev { left: 16px; } .lb-next { right: 16px; }
.lb-cap { color: #fff; font-family: 'Fraunces', serif; font-style: italic; font-size: 1.2rem; }
.lb-choose { max-width: 300px; }
.lb-figure { position: relative; display: inline-block; line-height: 0; }

/* tiled preview watermark (previews only — never the paid finals) */
.wm::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: 3px;
  background-repeat: repeat; background-size: 150px auto;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='190' height='150'%3E%3Ctext x='8' y='82' font-family='Helvetica,Arial,sans-serif' font-size='15' font-weight='700' fill='white' fill-opacity='0.45' transform='rotate(-28 95 75)'%3EPawShot Studio%3C/text%3E%3C/svg%3E");
}
.polaroid.wm::after { inset: 12px 12px 46px; }

/* delivery downloads (success page) */
.final-card { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.dl-btn {
  border: 2px solid var(--amber-soft); background: var(--white); color: var(--amber-deep);
  font-weight: 800; font-size: 0.92rem; padding: 9px 22px; border-radius: 999px; cursor: pointer;
  transition: all .2s ease;
}
.dl-btn:hover { border-color: var(--amber); background: var(--amber-soft); }
.dl-all { max-width: 320px; margin: 4px auto 26px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 32px; gap: 40px; text-align: center; }
  .hero > div { display: flex; flex-direction: column; align-items: center; }
  .eyebrow { margin-left: auto; margin-right: auto; }
  .sub { margin-left: auto; margin-right: auto; }
  .signup { margin-left: auto; margin-right: auto; width: 100%; }
  .signup-note { display: block; text-align: center; font-size: 0.95rem; }
  .signup-note svg { display: inline-block; vertical-align: middle; margin-right: 6px; margin-top: 0; }
  .stack { height: 420px; max-width: 480px; margin: 0 auto; width: 100%; }
  .steps { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; max-width: 380px; }
  .gift { grid-template-columns: 1fr; text-align: center; }
  .gift-icon { margin: 0 auto; }
  .gift h2 { text-align: center; }
  .signup-row { flex-direction: column; }
}
@media (max-width: 640px) {
  .chips { grid-template-columns: repeat(2, 1fr); }
  .results { grid-template-columns: 1fr; max-width: 340px; }
  .variants { grid-template-columns: 1fr; max-width: 320px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
