/* ==========================================================================
   Crystal Memorial — pet memorial 3D crystal keepsakes
   Warm ivory + deep bronze palette; serif display headings; editorial layout.
   NOTE: JS modules toggle style.display directly on .form-error, .dup-note,
   .success-panel, .pay-success, .file-chosen, .photo-preview and on the two
   <form> elements — keep these classes and their default display values.
   ========================================================================== */

:root {
  --bg: #f8f4ec;
  --surface: #fffcf6;
  --ink: #2c2620;
  --muted: #6d6255;
  --accent: #7a5c3e;
  --accent-deep: #55402a;
  --glow: #e9cf9d;
  --line: #e5dccd;
  --dark: #221b14;
  --ok-bg: #f0f7ee;
  --err-bg: #fbeeee;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(44, 38, 32, .05), 0 10px 30px -12px rgba(44, 38, 32, .18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }

h1, h2, h3, .wordmark {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.18;
  margin: 0 0 .5em;
  color: var(--accent-deep);
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2.1rem, 4.4vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); text-align: center; }
h3 { font-size: 1.15rem; color: var(--ink); }

p { margin: 0 0 1em; }
a { color: var(--accent); }
small { color: var(--muted); }

.container { width: min(1080px, calc(100% - 48px)); margin: 0 auto; }
section { padding: clamp(56px, 9vw, 96px) 0; }
.section-sub {
  text-align: center; color: var(--muted);
  max-width: 620px; margin: 0 auto 42px;
}

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- skip link ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--accent-deep); color: #fff;
  padding: 10px 18px; border-radius: 0 0 10px 0; text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ---------- announcement bar ---------- */
.announce {
  background: var(--accent-deep); color: #f3ead9;
  text-align: center; font-size: .82rem; letter-spacing: .02em;
  padding: 9px 20px;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(248, 244, 236, .88);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 28px; padding: 14px 0; }
.wordmark {
  font-size: 1.28rem; letter-spacing: .01em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.wordmark span { color: var(--accent); font-style: italic; }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: .95rem;
  transition: color .15s ease;
}
.nav-links a:hover { color: var(--accent-deep); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; text-align: center; text-decoration: none;
  font-weight: 600; font-size: 1rem; line-height: 1.2;
  border-radius: 999px; cursor: pointer;
  padding: 14px 30px; border: 1.5px solid transparent;
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 6px 16px -8px rgba(85, 64, 42, .55);
}
.btn-primary:hover { background: var(--accent-deep); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); background: transparent; color: var(--accent-deep); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-sm { padding: 9px 20px; font-size: .92rem; }
.btn-block { width: 100%; display: block; }
.linklike {
  background: none; border: none; padding: 0;
  color: var(--accent); font: inherit; font-size: .92rem;
  text-decoration: underline; cursor: pointer;
}

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: 1fr 1fr;
  align-items: center; gap: clamp(36px, 5vw, 72px);
  width: min(1120px, calc(100% - 48px)); margin: 0 auto;
  padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(48px, 7vw, 84px);
}
.hero-media img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.hero-copy .eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 14px;
}
.hero h1 { margin-bottom: 18px; text-align: left; }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 46ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin: 26px 0 22px; }
.hero-checks {
  list-style: none; margin: 0; padding: 0; color: var(--muted); font-size: .95rem;
}
.hero-checks li { padding-left: 27px; position: relative; margin-bottom: 6px; }
.hero-checks li::before {
  content: ""; position: absolute; left: 0; top: .22em;
  width: 17px; height: 17px;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><circle cx="12" cy="12" r="12" fill="%237a5c3e"/><path d="M16.5 8l-5.5 6.5L7.5 11" stroke="white" stroke-width="2.4" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>') center / contain no-repeat;
}

/* ---------- keepsake photo grid ---------- */
.photo-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
.photo-grid figure { margin: 0; }
.photo-grid img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius-sm); box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.photo-grid figcaption { font-size: .93rem; color: var(--muted); line-height: 1.55; }
.photo-grid figcaption strong { color: var(--ink); display: block; margin-bottom: 3px; font-size: 1rem; }

.price-box {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 18px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px 28px; margin-top: 44px;
}
.price-box small { display: block; margin-top: 2px; }
.price {
  font-family: Georgia, serif; font-weight: 700;
  font-size: 2.1rem; color: var(--accent-deep);
}

/* ---------- dark mood band ---------- */
.mood-band {
  position: relative; overflow: hidden;
  background: var(--dark); color: #efe6d6;
  padding: clamp(72px, 11vw, 130px) 0;
}
.mood-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: .38; filter: saturate(.85);
}
.mood-band::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(34,27,20,.25), rgba(34,27,20,.78));
}
.mood-copy { position: relative; z-index: 1; max-width: 720px; }
.mood-copy h2 { color: var(--glow); text-align: left; }
.mood-copy p { font-size: 1.08rem; color: #e4d9c6; }
.pull {
  font-family: Georgia, serif; font-style: italic;
  font-size: 1.35rem !important; color: var(--glow) !important;
  border-left: 3px solid var(--accent); padding-left: 20px; margin-top: 30px;
}

/* ---------- process steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; }
.steps li {
  display: flex; gap: 26px; padding: 30px 0;
  border-top: 1px solid var(--line);
}
.steps li:last-child { border-bottom: 1px solid var(--line); }
.step-no {
  font-family: Georgia, serif; font-size: 2.2rem; font-weight: 700;
  color: transparent; -webkit-text-stroke: 1.2px var(--accent);
  line-height: 1.05; min-width: 64px;
}
.steps p { color: var(--muted); margin: 0; max-width: 62ch; }
.steps h3 { margin-bottom: 6px; }

.photo-tips {
  background: var(--surface); border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 26px 30px; margin-top: 40px;
}
.photo-tips h3 { margin-bottom: 12px; }
.photo-tips ul { margin: 0; padding-left: 20px; color: var(--muted); }
.photo-tips li { margin-bottom: 7px; }

/* ---------- privacy ---------- */
.privacy { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.privacy-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 34px 46px; }
.privacy-item strong { display: block; font-size: 1.05rem; margin-bottom: 6px; color: var(--accent-deep); }
.privacy-item p { color: var(--muted); margin: 0; font-size: .96rem; }

/* ---------- delivery ---------- */
.delivery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.delivery-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 26px 20px;
}
.delivery-card h3 { font-size: 1.05rem; }
.delivery-card p { color: var(--muted); font-size: .94rem; margin: 0; }
.delivery-note {
  text-align: center; color: var(--muted); font-size: .95rem;
  max-width: 620px; margin: 34px auto 0;
  font-style: italic;
}

/* ---------- FAQ ---------- */
.alt-band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.faq { max-width: 780px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; position: relative;
  font-weight: 600; padding: 18px 40px 18px 0;
  transition: color .15s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 6px; top: 50%;
  transform: translateY(-50%);
  font-family: Georgia, serif; font-size: 1.45rem; color: var(--accent);
  transition: transform .18s ease;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq summary:hover { color: var(--accent-deep); }
.faq details > p { color: var(--muted); font-size: .97rem; padding-bottom: 20px; margin: 0; }

/* ---------- order section ---------- */
.order-grid {
  display: grid; grid-template-columns: 380px 1fr;
  gap: 40px; align-items: start;
}
.order-summary {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
  position: sticky; top: 86px;
}
.summary-photo { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.order-summary h3 { font-size: 1.2rem; padding: 20px 24px 0; margin-bottom: 10px; }
.order-summary ul { margin: 0; padding: 0 24px 8px 44px; color: var(--muted); font-size: .9rem; }
.order-summary li { margin-bottom: 6px; }
.sum-price {
  padding: 12px 24px; margin: 0; border-top: 1px dashed var(--line);
  font-weight: 700; font-size: 1.15rem; color: var(--accent-deep);
}
.guarantee {
  padding: 0 24px 22px; margin: 0; font-size: .87rem; color: var(--muted);
}

.order-form-wrap { min-width: 0; }

/* ---------- forms ---------- */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label {
  display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap;
  font-weight: 600; font-size: .93rem; margin-bottom: 7px;
}
.opt { font-weight: 400; color: var(--muted); font-size: .87rem; }
.counter { font-weight: 400; color: var(--muted); font-size: .82rem; }

input[type="text"], input[type="email"], select, textarea {
  width: 100%; padding: 13px 15px;
  font: inherit; font-size: .98rem; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input[type="file"] { font-size: .92rem; color: var(--muted); width: 100%; }
textarea { resize: vertical; min-height: 96px; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(122, 92, 62, .16);
}
.file-label-hint { font-size: .83rem; color: var(--muted); margin: 7px 0 0; }
.hp { position: absolute; left: -5000px; opacity: 0; height: 0; overflow: hidden; }
.noscript-warn {
  background: var(--err-bg); border: 1px solid #ddc4bb;
  border-radius: var(--radius-sm); padding: 14px 18px;
}

.pay-microcopy {
  text-align: center; color: var(--muted); font-size: .85rem; margin: 12px 0 0;
}

/* JS-toggled panels — defaults hidden; JS sets style.display explicitly */
.form-error {
  display: none;
  background: var(--err-bg); border: 1px solid #e4c4c0; color: #7a3b33;
  border-radius: var(--radius-sm); padding: 13px 16px;
  font-size: .93rem; margin-bottom: 18px;
}
.dup-note {
  display: none;
  background: #fdf6e7; border: 1px solid #ecd9ae; color: #6d5420;
  border-radius: var(--radius-sm); padding: 13px 16px;
  font-size: .93rem; margin-bottom: 18px;
}
.success-panel {
  display: none;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 38px 34px;
}
.big-check {
  width: 52px; height: 52px; stroke: var(--accent);
  fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  margin-bottom: 14px;
}
.order-number-chip {
  display: inline-block; font-family: ui-monospace, Menlo, monospace;
  font-size: 1.25rem; font-weight: 700; letter-spacing: .04em;
  background: var(--bg); border: 1.5px dashed var(--accent);
  color: var(--accent-deep); border-radius: var(--radius-sm);
  padding: 10px 22px; margin: 6px 0 22px;
}
.success-steps { margin: 0; padding-left: 22px; color: var(--muted); }
.success-steps li { margin-bottom: 12px; font-size: .96rem; }
.success-steps strong { color: var(--ink); }

.file-chosen {
  display: none; font-size: .9rem; color: var(--accent-deep);
  font-weight: 600; margin: 8px 0 0;
}
.photo-preview {
  display: none; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: 12px;
}
.photo-preview img {
  width: 110px; height: 110px; object-fit: cover;
  border-radius: var(--radius-sm); border: 1px solid var(--line);
}

.pay-confirm-wrap { max-width: 720px; margin: 0 auto; }
.pay-success {
  display: none;
  background: var(--ok-bg); border: 1px solid #cde3c8; color: #3c6034;
  border-radius: var(--radius-sm); padding: 14px 18px;
  font-size: .95rem; font-weight: 600; margin-bottom: 18px;
}

/* ---------- footer ---------- */
.site-footer {
  background: var(--dark); color: #b9ac99;
  padding: 54px 0 34px; font-size: .93rem;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px;
}
.site-footer .wordmark { color: #f0e8da; font-size: 1.2rem; }
.site-footer .wordmark span { color: var(--glow); }
.footer-nav { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 40px; }
.footer-nav a { color: #b9ac99; text-decoration: none; line-height: 2; }
.footer-nav a:hover { color: var(--glow); }
.footer-legal {
  margin-top: 40px; border-top: 1px solid rgba(255,255,255,.09);
  padding-top: 20px; font-size: .85rem; color: #9c8f7d;
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  body { font-size: 16px; }
  .hero { grid-template-columns: 1fr; }
  .hero-media { order: -1; max-width: 480px; margin: 0 auto; }
  .order-grid { grid-template-columns: 1fr; }
  .order-summary { position: static; max-width: 440px; }
  .photo-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .header-row { justify-content: space-between; }
  .header-row .btn-sm { white-space: nowrap; padding: 9px 16px; }
  .wordmark { font-size: 1.12rem; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .privacy-grid { grid-template-columns: 1fr; }
  .delivery-grid { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: 1fr; }
  .steps li { flex-direction: column; gap: 8px; }
  .price-box { flex-direction: column; align-items: stretch; text-align: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-nav { columns: 1; }
}
