/* =========================================================================
   style.css — Northlight Studio
   One clean, white theme shared by every page. Change a value here once and
   it updates everywhere. Colors live in :root as easy-to-read variables.
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg:        #ffffff;   /* page background */
  --wash:      #f7f7f5;   /* soft section background */
  --ink:       #141414;   /* main text */
  --ink-soft:  #6e6e6e;   /* secondary text */
  --line:      #ececec;   /* borders + dividers */
  --accent:      #2c7a5b;   /* fresh green — the site's pop of color */
  --accent-dark: #24624a;   /* darker green for button hover */
  --brown:       #7a5b43;   /* deep walnut — nav border on hover/active */
  --brown-line:  #b39b82;   /* medium brown — default nav borders */

  --radius:    12px;
  --shadow:    0 1px 2px rgba(0,0,0,.04), 0 10px 40px rgba(0,0,0,.05);
  --maxw:      1120px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ---------- shared layout ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; cursor: pointer; text-decoration: none;
  font-size: 15px; font-weight: 600; border-radius: 999px;
  padding: 13px 26px; border: 1px solid transparent;
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
#submit-btn:disabled { background: #e0e0e0; color: #666; border-color: #e0e0e0; opacity: 1; cursor: not-allowed; }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--ink); }

/* =========================================================================
   NAVBAR  (markup comes from Navbar.js; styles live here)
   ========================================================================= */
.nav {
  /* three zones: logo (left) | links (center) | account (right) */
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 16px 28px;
  border-bottom: 2px solid var(--brown-line);
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
}
.nav a { text-decoration: none; }

/* Brand: a clean editorial text wordmark. */
.nav .brand {
  justify-self: start; color: var(--ink); line-height: 1;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 24px; letter-spacing: -.04em;
}

/* center cluster */
.nav .center { justify-self: center; display: flex; align-items: center; gap: 12px; }

/* pill links (Gallery, My Projects) + the Create toggle:
   brown border only, white fill, no colored background */
.nav .center > a,
.nav .drop-toggle {
  color: var(--ink-soft); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer;
  background: #fff; border: 1px solid var(--brown-line); border-radius: 999px; padding: 8px 18px;
  transition: color .15s ease, border-color .15s ease;
}
.nav .center > a:hover,
.nav .drop-toggle:hover { color: var(--ink); border-color: var(--brown); }
.nav .center > a.active,
.nav .drop-toggle.active { color: var(--ink); font-weight: 600; border-color: var(--brown); }

/* dropdown */
.nav .dropdown { position: relative; }
.nav .drop-toggle { display: inline-flex; align-items: center; gap: 6px; }
.nav .drop-toggle .caret { font-size: 11px; opacity: .8; }

/* invisible bridge fills the gap so hover never breaks between button and menu */
.nav .dropdown::after {
  content: "";
  position: absolute; top: 100%; left: 0; right: 0; height: 10px;
}

.nav .dropdown .menu {
  display: none; position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: #fff; border: 1px solid var(--brown-line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 6px; min-width: 160px; z-index: 50;
}
.nav .dropdown:hover .menu,
.nav .dropdown:focus-within .menu,
.nav .dropdown.open .menu { display: block; }
.nav .dropdown .menu a {
  display: block; padding: 10px 14px; border-radius: 8px;
  font-size: 14px; font-weight: 500; color: var(--ink);
}
.nav .dropdown .menu a:hover { background: var(--wash); }

/* account, top-right */
.nav .account { justify-self: end; }
.nav .account a {
  background: #fff; border: 1px solid var(--brown-line); border-radius: 999px; padding: 8px 16px;
  color: var(--ink); font-weight: 500; font-size: 15px;
}
.nav .account a:hover { border-color: var(--brown); }

@media (max-width: 700px) {
  .nav {
    grid-template-columns: 1fr auto;
    grid-template-areas: "brand account" "center center";
    row-gap: 12px; padding: 12px 16px;
  }
  .nav .brand   { grid-area: brand; }
  .nav .brand { font-size: 22px; }
  .nav .account { grid-area: account; justify-self: end; }
  .nav .center  { grid-area: center; justify-self: center; flex-wrap: wrap; justify-content: center; gap: 8px; }
  .nav .center > a, .nav .drop-toggle { font-size: 14px; padding: 7px 12px; }
}

/* =========================================================================
   HERO
   ========================================================================= */
.hero {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 42px;
  align-items: center; padding: 44px 0 48px;
}
.hero h1 {
  font-size: 54px; line-height: 1.05; letter-spacing: -.02em; font-weight: 700;
  margin-bottom: 20px;
}
.hero p.lead { font-size: 18px; color: var(--ink-soft); max-width: 30ch; margin-bottom: 30px; }
.hero .cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .reassure { margin-top: 18px; font-size: 14px; color: var(--ink-soft); }

/* the framed portrait shown in the hero */
.frame {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px; justify-self: center; max-width: 310px; width: 100%;
}
.frame .art {
  background: var(--wash); border-radius: 8px; aspect-ratio: 4/5;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
}
.frame .art svg { width: 44%; opacity: .85; }
.frame .art .petname { font-size: 26px; letter-spacing: .02em; color: var(--ink); }

/* =========================================================================
   STEPS
   ========================================================================= */
.steps { background: var(--wash); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.steps .container { padding-top: 72px; padding-bottom: 72px; }
.steps h2 { font-size: 30px; letter-spacing: -.01em; text-align: center; margin-bottom: 8px; }
.steps .sub { text-align: center; color: var(--ink-soft); margin-bottom: 48px; }
.steps .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.step .num {
  width: 34px; height: 34px; border-radius: 999px; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 15px;
  margin-bottom: 16px;
}
.step h3 { font-size: 18px; margin-bottom: 6px; }
.step p { color: var(--ink-soft); font-size: 15px; }

/* =========================================================================
   FOOTER
   ========================================================================= */
.footer { padding: 44px 0; }
.footer .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.footer .brand { color: var(--ink); font-family: "DM Serif Display", Georgia, serif; font-size: 22px; letter-spacing: -.04em; text-decoration: none; }
.footer .muted { color: var(--ink-soft); font-size: 14px; }
.footer a { color: var(--ink-soft); text-decoration: none; font-size: 14px; margin-left: 20px; }
.footer a:hover { color: var(--ink); }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding: 56px 0 64px; text-align: center; }
  .hero h1 { font-size: 40px; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero .cta-row { justify-content: center; }
  .frame { grid-row: 1; }
  .steps .grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto; } }

/* =========================================================================
   AUTH  (login.html)
   ========================================================================= */
.auth-wrap { display: flex; justify-content: center; padding: 72px 28px 120px; }
.auth-card {
  width: 100%; max-width: 420px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 36px;
}
.auth-card h1 { font-size: 26px; letter-spacing: -.01em; margin-bottom: 6px; }
.auth-card .sub { color: var(--ink-soft); font-size: 15px; margin-bottom: 24px; }
.auth-card label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.auth-card input[type="email"],
.auth-card input[type="password"] {
  width: 100%; font: inherit; font-size: 15px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px; margin-bottom: 16px;
}
.auth-card input[type="email"]:focus,
.auth-card input[type="password"]:focus {
  outline: 2px solid var(--ink); outline-offset: 1px; border-color: transparent;
}
.auth-tabs {
  display: flex; gap: 6px; background: var(--wash);
  border-radius: 10px; padding: 4px; margin-bottom: 24px;
}
.auth-tabs button {
  flex: 1; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  border: none; background: transparent; color: var(--ink-soft);
  padding: 9px 0; border-radius: 7px; transition: background .15s, color .15s;
}
.auth-tabs button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.auth-card .btn { width: 100%; text-align: center; }
.auth-card .msg { margin-top: 16px; font-size: 14px; line-height: 1.45; }
.auth-card .msg.ok  { color: #1a7f4b; }
.auth-card .msg.err { color: #b4232a; }
.auth-card .fine { margin-top: 18px; font-size: 13px; color: var(--ink-soft); text-align: center; }
.auth-card .signed { font-size: 15px; color: var(--ink); margin-bottom: 20px; }
.auth-card .signed b { font-weight: 600; }

/* link at the bottom of an auth card to switch between login / signup */
.auth-card .switch { margin-top: 20px; text-align: center; font-size: 14px; color: var(--ink-soft); }
.auth-card .switch a { color: var(--ink); font-weight: 600; text-decoration: none; }
.auth-card .switch a:hover { text-decoration: underline; }
.terms-check { display: flex !important; align-items: flex-start; gap: 9px; margin: 2px 0 18px; color: var(--ink-soft); font-size: 13px !important; font-weight: 400 !important; line-height: 1.45; }
.terms-check input { width: 16px; height: 16px; flex: 0 0 auto; margin: 2px 0 0; accent-color: var(--accent); }
.terms-check a { color: var(--ink); font-weight: 600; }

/* =========================================================================
   TERMS OF SERVICE
   ========================================================================= */
.legal-page { max-width: 760px; margin: 0 auto; padding: 72px 28px 88px; }
.legal-page .eyebrow { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .12em; }
.legal-page h1 { margin: 8px 0 8px; font-size: 42px; letter-spacing: -.03em; }
.legal-updated { color: var(--ink-soft); font-size: 14px; margin-bottom: 42px; }
.legal-page section { padding: 22px 0; border-top: 1px solid var(--line); }
.legal-page h2 { font-size: 19px; margin-bottom: 9px; }
.legal-page p { color: var(--ink-soft); margin-top: 10px; }
.legal-page a { color: var(--ink); font-weight: 600; }

/* =========================================================================
   ACCOUNT  (account.html)
   ========================================================================= */
.account-page { max-width: 720px; margin: 0 auto; padding: 56px 28px 120px; }
.account-page h1 { font-size: 32px; letter-spacing: -.01em; margin-bottom: 28px; }
.account-body { background: #fff; }
.account-page h1, .account-page .panel h2 { color: var(--accent-dark); }
.account-page .panel { background: #fff; border-color: #bdd8c8; }
.credits-panel #credit-balance { font-size: clamp(22px, 4vw, 30px); font-weight: 700; }
.credits-panel .info-row { align-items: center; border-bottom-color: #c9ddd1; }
.credits-panel .credit-summary { padding-top: 14px; border-top: 1px solid #c9ddd1; color: var(--accent-dark); }

.panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px; margin-bottom: 24px;
}
.panel h2 { font-size: 18px; margin-bottom: 18px; }
.credit-summary { margin: 14px 0 0; color: var(--ink-soft); font-size: 14px; line-height: 1.45; }
#credit-balance { color: var(--accent); font-weight: 700; }
#credit-reload { margin-top: 18px; }
.credit-packages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.credit-packages .btn { min-width: 0; padding: 12px 8px; font-size: 14px; text-align: center; white-space: normal; }
.credits-panel .credit-packages .btn { display: flex; flex-direction: column; gap: 6px; border-radius: 14px; padding: 18px 8px; background: #fff; color: var(--accent-dark); border-color: #b7d3c2; }
.credits-panel .credit-packages .btn:hover:not(:disabled) { background: #dcefe3; border-color: var(--accent); }
.credits-panel .credit-packages .btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.package-credits { font-weight: 700; }
.package-price { font-size: 19px; }
.package-price small { font-size: 11px; font-weight: 400; }

.info-row {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px;
}
.info-row:last-child { border-bottom: none; }
.info-row .label { color: var(--ink-soft); }
.info-row .value { font-weight: 500; text-align: right; }

.account-actions { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }

.order {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.order:last-child { border-bottom: none; }
.order .oid { font-weight: 600; color: var(--ink); font-size: 15px; }
.order .meta { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.order .right { text-align: right; }
.badge {
  font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 999px;
  background: var(--wash); color: var(--ink); text-transform: capitalize;
}
.order .amount { font-weight: 600; font-size: 15px; margin-top: 4px; }

.empty { text-align: center; padding: 28px 0; color: var(--ink-soft); font-size: 15px; }
.empty a { color: var(--ink); font-weight: 600; text-decoration: none; }
.empty a:hover { text-decoration: underline; }

/* small button variant + keep account rows vertically centered */
.btn-sm { padding: 8px 16px; font-size: 14px; }
.info-row { align-items: center; }
.account-actions.bottom { margin-top: 0; }

/* =========================================================================
   CUSTOM  (custom.html)
   ========================================================================= */
.projects-page { max-width: 900px; margin: 0 auto; padding: 48px 28px 120px; }
.projects-page h1 { font-size: 32px; letter-spacing: -.01em; margin-bottom: 24px; text-align: center; }
.projects-page h2 { font-size: 18px; margin-bottom: 16px; }
.custom-credit-status { position: absolute; top: 112px; right: 28px; margin: 0; color: var(--ink-soft); font-size: 12.5px; text-align: right; }

/* the create box */
.create-box { margin-bottom: 40px; }
.create-box .drop {
  border: 1.5px dashed var(--line); border-radius: 12px; padding: 30px;
  text-align: center; cursor: pointer; color: var(--ink-soft);
  transition: border-color .15s, background .15s, color .15s;
}
.create-box .drop svg { opacity: .5; margin-bottom: 8px; }
.create-box .drop strong { color: var(--ink); font-weight: 600; }
.create-box .drop:hover, .create-box .drop.drag {
  border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, #fff);
}
.create-box .drop.has-file {
  border-style: solid; border-color: var(--accent); color: var(--accent); font-weight: 600;
}
.create-box textarea {
  width: 100%; font: inherit; font-size: 15px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px; margin: 16px 0;
  min-height: 74px; resize: vertical;
}
.create-box textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.create-box .btn { width: 100%; text-align: center; }
.create-box .msg { margin-top: 14px; font-size: 14px; }

/* projects grid */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
#saved-section { text-align: center; }
#saved-section .project-grid { text-align: left; }
#saved-section .project-grid .empty { grid-column: 1 / -1; width: 100%; text-align: center; }
.project-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.project-card img { width: 100%; aspect-ratio: 4/5; object-fit: cover; display: block; background: var(--wash); }
.project-card .body { padding: 12px 14px; }
.project-card .note { font-size: 14px; color: var(--ink); line-height: 1.4; }
.project-card .note.none { color: var(--ink-soft); font-style: italic; }
.project-card .meta { font-size: 12px; color: var(--ink-soft); margin-top: 8px; display: flex; justify-content: space-between; }
.project-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.project-delete { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink-soft); cursor: pointer; }
.project-delete:hover { color: #a32b2b; background: #fff3f3; }
.project-delete:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.project-delete:disabled { opacity: .45; cursor: wait; }
.project-editor { margin: auto; width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); }
.project-editor::backdrop { background: rgba(0, 0, 0, .45); }
.project-review { width: min(960px, calc(100% - 32px)); }
.review-image { display: block; width: 100%; height: min(60vh, 680px); object-fit: contain; background: var(--wash); border-radius: 8px; }
.review-message { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 8px; }

/* create-box text fields */
.create-box input[type="text"] {
  width: 100%; font: inherit; font-size: 15px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px; margin-top: 16px;
}
.create-box input[type="text"]:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.create-box .hint { font-size: 12.5px; color: var(--ink-soft); margin-top: 6px; }

/* Custom project picker */
.custom-picker { max-width: 1040px; margin: 0 auto 48px; }
.custom-picker > h2,
.custom-picker > .sub { text-align: center; }
.custom-picker > .sub { color: var(--ink-soft); margin: -8px 0 20px; }
.custom-product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: start; }
.custom-product {
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden;
  cursor: pointer; min-width: 0; padding: 0; color: var(--ink); font: inherit; font-weight: 600; text-align: left;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.custom-product:hover, .custom-product:focus-visible { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); outline: none; }
.custom-product img { display: block; width: 100%; height: 190px; object-fit: contain; padding: 10px; background: var(--wash); }
.custom-product span { display: block; padding: 14px 16px; }
.custom-modal { max-width: 560px; }
.custom-step { padding: 42px; }
.custom-step h2 { font-size: 26px; letter-spacing: -.02em; margin: 7px 0 4px; }
.custom-step .modal-sub { color: var(--ink-soft); font-size: 15px; }
.eyebrow { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .12em; }
.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 26px; }
.category-choice { border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); cursor: pointer; font: inherit; font-weight: 600; padding: 18px 8px; }
.category-choice:hover, .category-choice:focus-visible { border-color: var(--accent); color: var(--accent); outline: none; }
.custom-step .drop { border: 1.5px dashed var(--line); border-radius: 10px; padding: 22px; text-align: center; cursor: pointer; color: var(--ink-soft); }
.custom-step .drop:hover, .custom-step .drop.drag { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, #fff); }
.custom-step .drop.has-file { border-style: solid; border-color: var(--accent); color: var(--accent); font-weight: 600; }
.custom-step textarea { width: 100%; min-height: 100px; resize: vertical; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 15px; padding: 12px 14px; }
.custom-step textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.custom-step .btn { width: 100%; margin-top: 20px; }
.card-inside-preview { position: relative; width: min(100%, 470px); margin: 16px auto; overflow: hidden; border-radius: 8px; }
.card-inside-preview img { display: block; width: 100%; }
.card-inside-message { position: absolute; top: 53%; left: 54%; right: 7%; transform: translateY(-50%); color: #302c29; font-family: Georgia, "Times New Roman", serif; font-size: clamp(13px, 2vw, 20px); line-height: 1.35; text-align: center; white-space: pre-wrap; overflow-wrap: anywhere; pointer-events: none; }
.custom-step .msg { margin-top: 14px; font-size: 14px; }
.back-link { border: 0; background: none; color: var(--ink-soft); cursor: pointer; font: inherit; font-size: 14px; margin-bottom: 20px; padding: 0; }
.back-link:hover { color: var(--ink); }
@media (max-width: 800px) { .custom-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .custom-credit-status { position: static; margin: -8px 0 20px; text-align: left; } .custom-product-grid, .category-grid { grid-template-columns: 1fr; } .custom-step { padding: 30px 24px; } }

/* customer examples grid */
.example-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.example-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.example-thumb {
  position: relative; aspect-ratio: 4/5; background: var(--wash);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft); font-size: 13px;
}
.example-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.example-card .cap { padding: 12px 14px; font-size: 14px; }
.example-card .cap .who { font-weight: 600; }
.example-card .cap .sub { color: var(--ink-soft); font-size: 13px; margin-top: 2px; }

/* photo tip on the create box */
.upload-tip {
  margin-top: 12px; font-size: 13.5px; color: var(--ink-soft);
  background: var(--wash); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 12px;
}
.upload-tip strong { color: var(--ink); }

/* =========================================================================
   HOMEPAGE product cards (index.html)
   ========================================================================= */
.home-hero { text-align: center; padding: 84px 0 56px; }
.home-hero h1 { font-size: 52px; line-height: 1.05; letter-spacing: -.02em; margin-bottom: 18px; }
.home-hero p.lead { font-size: 18px; color: var(--ink-soft); max-width: 46ch; margin: 0 auto 28px; }
.home-hero .cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding-bottom: 20px; }
.product-card {
  display: block; text-decoration: none; color: inherit;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; background: #fff;
  transition: box-shadow .15s ease, transform .1s ease, border-color .15s ease;
}
.product-card:hover { box-shadow: var(--shadow); border-color: var(--brown-line); transform: translateY(-2px); }
.product-card .ic {
  width: 76px; height: 76px; border-radius: 12px; background: var(--wash);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.product-card .ic svg { width: 46px; height: 46px; }
.product-card h3 { font-size: 20px; margin-bottom: 6px; }
.product-card p { color: var(--ink-soft); font-size: 14px; }
.product-card .go { margin-top: 14px; color: var(--accent); font-weight: 600; font-size: 14px; }

@media (max-width: 760px) {
  .home-hero h1 { font-size: 38px; }
  .cards { grid-template-columns: 1fr; }
}

/* =========================================================================
   PET PRODUCT STRIP + MODAL WORKFLOW (pet.html)
   ========================================================================= */
.strip-head { text-align: center; padding: 48px 28px 26px; }
.strip-head h2 {
  font-family: "Quicksand", "Inter", sans-serif;
  font-size: 32px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 6px;
}
.strip-head p { color: var(--ink-soft); font-size: 15px; }

/* full-width row of product images */
.product-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; width: 100%; }
.product-tile {
  position: relative; cursor: pointer; border: none; padding: 0; background: var(--wash);
  overflow: hidden; aspect-ratio: 1 / 1;
}
.product-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.product-tile:hover img { transform: scale(1.04); }
.product-tile .pick {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: rgba(20,20,20,.72); color: #fff; text-align: center;
  padding: 12px; font-size: 14px; font-weight: 600; opacity: 0; transition: opacity .15s ease;
}
.product-tile:hover .pick, .product-tile:focus-visible .pick { opacity: 1; }

@media (max-width: 900px) { .product-strip { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 540px) {
  .product-strip {
    display: flex; gap: 12px; overflow-x: auto; padding: 0 16px 10px;
    scroll-snap-type: x mandatory; scroll-padding-left: 16px; -webkit-overflow-scrolling: touch;
  }
  .product-tile { flex: 0 0 74vw; scroll-snap-align: start; border-radius: var(--radius); }
}

/* modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(20,20,20,.5);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff; border-radius: 16px; max-width: 840px; width: 100%; max-height: 92vh;
  overflow: auto; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.modal-close {
  position: absolute; top: 12px; right: 14px; border: none; background: transparent;
  font-size: 28px; line-height: 1; cursor: pointer; color: var(--ink-soft); z-index: 2;
}
.modal-close:hover { color: var(--ink); }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; }
.modal-preview { background: var(--wash); display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-preview img { max-width: 100%; border-radius: 8px; }
.modal-form { padding: 32px; }
.modal-form h2 { font-size: 22px; margin-bottom: 2px; }
.modal-form .modal-sub { color: var(--ink-soft); font-size: 14px; margin-bottom: 8px; }

.field-label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink); margin: 20px 0 10px; }

.size-list { display: flex; flex-wrap: wrap; gap: 8px; }
.size-opt {
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 13px;
  cursor: pointer; font-size: 14px; font-weight: 500; color: var(--ink); background: #fff;
}
.size-opt[aria-checked="true"] {
  border-color: var(--accent); color: var(--accent); font-weight: 600;
  background: color-mix(in srgb, var(--accent) 8%, #fff);
}

.modal-form .drop {
  border: 1.5px dashed var(--line); border-radius: 10px; padding: 22px; text-align: center;
  cursor: pointer; color: var(--ink-soft); transition: border-color .15s, background .15s, color .15s;
}
.modal-form .drop:hover, .modal-form .drop.drag { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, #fff); }
.modal-form .drop.has-file { border-style: solid; border-color: var(--accent); color: var(--accent); font-weight: 600; }
.modal-form input[type="text"] {
  width: 100%; font: inherit; font-size: 15px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px;
}
.modal-form input[type="text"]:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.modal-form .btn { width: 100%; margin-top: 22px; }
.modal-form .msg { margin-top: 14px; font-size: 14px; }

@media (max-width: 640px) {
  .modal-grid { grid-template-columns: 1fr; }
  .modal-preview { display: flex; max-height: 46vh; }
}

/* =========================================================================
   CHECKOUT (checkout.html)
   ========================================================================= */
.checkout {
  max-width: 1000px; margin: 0 auto; padding: 40px 28px 100px;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 36px; align-items: start;
}
.preview-panel {
  background: var(--wash); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; min-height: 380px; display: flex; align-items: center; justify-content: center;
}
.preview-panel img { max-width: 100%; border-radius: 8px; box-shadow: var(--shadow); }
.preview-panel .mockup-stage img { box-shadow: none; }
.preview-panel .checkout-mockup .mockup-art {
  border-radius: 0;
  object-fit: cover;
  object-position: center;
}
.preview-panel .mockup-base { border-radius: 8px; box-shadow: var(--shadow); }
.preview-loading { text-align: center; color: var(--ink-soft); font-size: 14px; }
.spinner {
  width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.summary {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
}
.summary h1 { font-size: 24px; margin-bottom: 2px; }
.summary .sub { color: var(--ink-soft); font-size: 14px; margin-bottom: 20px; }
.summary .row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.summary .row .label { color: var(--ink-soft); }
.summary .row .value { font-weight: 500; text-align: right; }
.summary .total { font-weight: 700; font-size: 18px; border-bottom: none; padding-top: 14px; }
.summary .btn { width: 100%; margin-top: 18px; }
.summary .secure { text-align: center; font-size: 12.5px; color: var(--ink-soft); margin-top: 12px; }
.summary .stub { margin-top: 12px; font-size: 13px; color: var(--ink-soft); background: var(--wash); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; text-align: center; }

.shipping-form { margin-top: 28px; }
.shipping-form fieldset { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
.shipping-form legend { font-size: 18px; font-weight: 700; padding: 0; margin-bottom: 16px; }
.shipping-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.shipping-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.shipping-wide { grid-column: 1 / -1; }
.shipping-grid input, .shipping-grid select { box-sizing: border-box; width: 100%; min-width: 0; padding: 12px; font: inherit; font-size: 16px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 8px; }
.shipping-grid input:focus-visible, .shipping-grid select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.shipping-help { font-size: 13px; color: var(--ink-soft); margin-top: 12px; }
@media (max-width: 480px) { .shipping-grid { grid-template-columns: 1fr; } }
.checkout-empty { max-width: 520px; margin: 90px auto; text-align: center; }
.checkout-empty a { color: var(--accent); font-weight: 600; text-decoration: none; }

@media (max-width: 820px) { .checkout { grid-template-columns: 1fr; } }

/* loading overlay on the modal preview panel */
.modal-preview { position: relative; }
.mp-loading {
  position: absolute; inset: 0; background: rgba(247,247,245,.92);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: var(--ink-soft); font-size: 13px; text-align: center; padding: 20px;
}
.attempts-note { font-size: 12.5px; color: var(--ink-soft); margin-top: 10px; text-align: center; }

/* product rows (pet.html) */
.product-row { margin-bottom: 46px; }
.row-title {
  font-family: "Quicksand", "Inter", sans-serif;
  font-size: 22px; font-weight: 600; letter-spacing: -.01em; padding: 0 40px 16px;
}
.size-opt .price { color: var(--ink-soft); font-weight: 500; }
.size-opt[aria-checked="true"] .price { color: var(--accent); }

/* inline "create your portrait" card (same look as the old modal, not a popup) */
.creator-card {
  max-width: 900px; margin: 0 auto 64px; background: #fff; border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow); overflow: hidden;
}
.creator-card .modal-grid { min-width: 0; }
.preview-placeholder { text-align: center; color: var(--ink-soft); font-size: 14px; padding: 20px; }
.preview-placeholder svg { opacity: .35; margin-bottom: 10px; }

/* product/frame/size picker on checkout */
.checkout-options .field-label:first-child { margin-top: 4px; }
.checkout-options .select { margin-bottom: 4px; }
.checkout-note { font-size: 13px; color: var(--ink-soft); background: var(--wash); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-top: 4px; }
.select {
  width: 100%; font: inherit; font-size: 15px; padding: 12px 40px 12px 14px;
  border: 1px solid var(--line); border-radius: 10px; background-color: #fff; color: var(--ink);
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236e6e6e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 14px center;
}
.select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }

/* keep long, unbreakable filenames from blowing out the upload box / modal */
.modal-form .drop #fname {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.modal-form { min-width: 0; overflow-wrap: anywhere; }
.modal-grid { min-width: 0; }

/* Mobile typography only — desktop sizing remains unchanged. */
@media (max-width: 640px) {
  body { font-size: 15px; }
  .hero h1,
  .home-hero h1,
  .legal-page h1 { font-size: 34px; }
  .hero p.lead,
  .home-hero p.lead { font-size: 16px; }
  .projects-page h1,
  .account-page h1 { font-size: 28px; }
  .strip-head h2 { font-size: 27px; }
  .steps h2 { font-size: 26px; }
  .frame .art .petname { font-size: 22px; }
  .product-card h3 { font-size: 18px; }
  .row-title { font-size: 20px; }
  .custom-step h2 { font-size: 23px; }
  .modal-form h2 { font-size: 20px; }
  .summary h1 { font-size: 22px; }
  .panel h2,
  .projects-page h2 { font-size: 17px; }
  .info-row,
  .summary .row { font-size: 14px; }
  .btn { font-size: 14px; }
}

/* product mockup with the portrait composited on top of the blank canvas */
.artwork-modal { max-width: 1200px; }
.artwork-modal .modal-grid { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); }
.artwork-modal .modal-preview { padding: 12px; }
.artwork-stage { width: 100%; }
.artwork-stage .preview-sketch { margin: 24px auto; max-width: min(390px, 100%); }
.artwork-stage .preview-sketch[hidden] { display: none; }
.artwork-preview { display: none; width: 100%; height: 72vh; object-fit: contain; }
@media (max-width: 700px) {
  .artwork-modal .modal-grid { grid-template-columns: 1fr; }
  .artwork-modal .modal-preview { max-height: none; }
  .artwork-preview { height: 46vh; }
}

.mockup-stage { position: relative; width: 100%; }
.mockup-stage .mockup-base { width: 100%; display: block; border-radius: 4px; }
.mockup-stage .mockup-art {
  position: absolute; object-fit: cover; display: none;
}

/* Product catalog */
.catalog-page { padding-top: 56px; padding-bottom: 72px; }
.catalog-heading h1 { font-family: "DM Serif Display", Georgia, serif; font-size: clamp(36px, 6vw, 56px); font-weight: 400; }
.catalog-heading p, .catalog-description, #catalog-status { color: var(--ink-soft); }
.catalog-categories { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0; }
.catalog-section { margin-top: 40px; scroll-margin-top: 100px; }
.catalog-section h2 { font-family: "DM Serif Display", Georgia, serif; font-size: 32px; font-weight: 400; }
.catalog-description { margin: 6px 0 20px; }
.catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.catalog-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.catalog-image { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; background: var(--wash); text-decoration: none; }
.catalog-image img { width: 100%; height: 100%; object-fit: contain; }
.catalog-details { padding: 22px; }
.catalog-details h3 { font-size: 20px; }
.catalog-price { color: var(--ink-soft); margin-top: 6px; }
.catalog-details .btn { margin-top: 18px; }
.product-row[id] { scroll-margin-top: 100px; }
@media (max-width: 760px) { .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 500px) { .catalog-grid { grid-template-columns: 1fr; } .catalog-page { padding-top: 32px; } }
.catalog-product { width: 100%; padding: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.catalog-product:hover { border-color: var(--brown); }
.catalog-product:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.catalog-product:disabled { opacity: .6; cursor: wait; }
.catalog-product .catalog-details { display: block; }
.catalog-product-label { display: block; font-family: "DM Serif Display", Georgia, serif; font-size: 32px; }
#artPrompt { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; resize: vertical; }

/* Custom creation progress and dialog layout */
.project-editor [hidden] { display: none !important; }
.project-editor .custom-credit-status { position: static; margin: 0 0 20px; text-align: left; }
.creation-progress { text-align: center; padding: 48px 28px; }
.creation-progress .spinner { margin: 0 auto 24px; }
.creation-progress h2 { margin: 0 0 16px; }
.creation-progress p { color: var(--ink-soft); line-height: 1.6; }
