/* Branded to match theoccasionalstore.co.za: near-black and gold, Inter Tight headings, DM Sans body. */
:root {
  --night: #1d1d1d;
  --night-raised: #262527;
  --night-line: rgba(255, 255, 255, 0.14);
  --white: #ffffff;
  --mist: #f5f5f5;
  --ink: #1d1d1d;
  --muted: #5f5f5f;
  --muted-on-night: rgba(255, 255, 255, 0.72);
  --line: #e2e2e2;
  --gold: #b8873a;
  --gold-hover: #c99a4c;
  --gold-pale: #e2c27c;
  --gold-deep: #8a6220;
  --heading: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --body: "DM Sans", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--night);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
}
main { flex: 1; display: flex; flex-direction: column; }

h1, h2, h3 {
  font-family: var(--heading);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; }

.eyebrow {
  font-family: var(--heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Header */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 28px;
  background: var(--night);
  border-bottom: 1px solid var(--night-line);
}
.brand {
  font-family: var(--heading);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--white);
  text-decoration: none;
}
.store-link {
  font-family: var(--heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-pale);
  text-decoration: none;
  white-space: nowrap;
}
.store-link:hover, .brand:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Designer form, on the dark hero */
.designer, .progress {
  background: var(--night);
  color: var(--white);
  padding: 56px max(24px, calc((100% - 600px) / 2)) 88px;
  flex: 1;
}
.intro .eyebrow { color: var(--gold-pale); }
.intro h1 { font-size: clamp(38px, 7vw, 54px); margin-top: 12px; }
.intro p { margin-top: 16px; color: var(--muted-on-night); font-size: 19px; }

form { margin-top: 36px; display: grid; gap: 22px; }
.field { display: grid; gap: 7px; flex: 1; min-width: 0; }
.field-row { display: flex; gap: 16px; }
.field-small { flex: 0 0 110px; }

label { font-weight: 500; font-size: 15px; }
.optional { font-weight: 400; color: var(--muted-on-night); font-size: 13px; margin-left: 4px; }
.hint { color: var(--muted-on-night); font-size: 14px; }

input, select {
  width: 100%;
  font: inherit;
  color: var(--white);
  background-color: var(--night-raised);
  border: 1px solid var(--night-line);
  border-radius: 12px;
  padding: 12px 14px;
  min-height: 50px;
  color-scheme: dark;
}
select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23e2c27c' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
}
input:hover, select:hover { border-color: rgba(255, 255, 255, 0.3); }
input:focus-visible, select:focus-visible, button:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 2px solid var(--gold-pale);
  outline-offset: 2px;
}
input::placeholder { color: rgba(255, 255, 255, 0.42); }

button {
  font-family: var(--heading);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 6px;
  min-height: 52px;
  padding: 12px 24px;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: var(--night);
}
button:hover { background: var(--gold-hover); border-color: var(--gold-hover); }
button:disabled { opacity: 0.6; cursor: default; }
button.quiet { background: transparent; color: var(--ink); border-color: var(--ink); }
button.quiet:hover { background: var(--mist); }

.form-error { color: #ffb4a8; font-weight: 500; font-size: 15px; }
.mode-note { color: var(--muted-on-night); font-size: 13px; }

/* Progress */
.progress { text-align: center; padding-top: 96px; }
.progress h2 { font-size: 30px; margin-top: 24px; }
.progress p { color: var(--muted-on-night); margin-top: 10px; }
.spinner {
  width: 40px; height: 40px; margin: 0 auto;
  border: 3px solid var(--night-line); border-top-color: var(--gold-pale);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

/* Finished kit, on white like the store's content sections */
.kit {
  background: var(--white);
  padding: 40px max(24px, calc((100% - 900px) / 2)) 96px;
  flex: 1;
}
.kit-actions { display: flex; gap: 10px; justify-content: flex-end; margin-bottom: 24px; }
.kit-actions button { min-height: 44px; padding: 8px 18px; font-size: 13px; }

.sample-banner {
  background: #fbf4e6;
  border: 1px solid #ecd9b0;
  color: #6b4a14;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  margin-bottom: 24px;
}

.cover { margin: 0 0 32px; }
.cover img { width: 100%; display: block; border-radius: 14px; }

.kit-type { color: var(--gold-deep); }
.kit h1 { font-size: clamp(36px, 7vw, 58px); margin-top: 10px; overflow-wrap: anywhere; }
.tagline { font-size: 20px; color: var(--muted); margin-top: 12px; max-width: 60ch; }

.facts {
  display: flex; flex-wrap: wrap; gap: 10px 32px;
  margin: 28px 0 0; padding: 16px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.facts div { display: grid; gap: 2px; }
.facts dt {
  font-family: var(--heading); font-size: 11px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gold-deep);
}
.facts dd { margin: 0; font-weight: 500; }

.kit section { margin-top: 52px; }
.kit h2 { font-size: 30px; margin-bottom: 18px; }
.prose { white-space: pre-wrap; max-width: 68ch; }
.synopsis { font-size: 18px; }

.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.card {
  background: var(--mist); border-radius: 14px; padding: 20px;
  break-inside: avoid;
}
.card h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.015em; }
.card .sub { color: var(--gold-deep); font-size: 14px; font-weight: 500; margin-top: 4px; }
.card p { margin-top: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.secret { border-top: 1px solid #dcdcdc; padding-top: 10px; font-size: 15px; }
.secret b {
  display: block; font-family: var(--heading); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
}

.components { display: grid; gap: 14px; }
.tag {
  display: inline-block; font-family: var(--heading); font-size: 11px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--white); background: var(--night);
  border-radius: 99px; padding: 3px 11px; margin-bottom: 10px;
}

.gallery { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); align-items: start; }
.gallery figure { margin: 0; }
.gallery img, .image-wait { width: 100%; display: block; border-radius: 14px; background: var(--mist); }
.image-wait {
  aspect-ratio: 4 / 3; display: grid; place-items: center; color: var(--muted); font-size: 14px; text-align: center; padding: 12px;
}
figcaption { color: var(--muted); font-size: 14px; margin-top: 8px; }

.steps { margin: 0; padding-left: 22px; display: grid; gap: 14px; max-width: 68ch; }
.steps li::marker { font-family: var(--heading); font-weight: 800; color: var(--gold-deep); }
.steps b { display: block; font-family: var(--heading); font-weight: 700; }

.list { margin: 0; padding-left: 20px; columns: 2; column-gap: 32px; }
.list li::marker { color: var(--gold); }

details.solution { background: var(--night); color: var(--white); border-radius: 14px; padding: 4px 20px; }
details.solution summary {
  cursor: pointer; padding: 14px 0; color: var(--gold-pale);
  font-family: var(--heading); font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
}
details.solution .prose { padding-bottom: 18px; color: rgba(255, 255, 255, 0.9); }

/* Request form extras */
.form-heading {
  font-size: 22px; letter-spacing: -0.02em;
  padding-top: 22px; margin-top: 6px; border-top: 1px solid var(--night-line);
}
form > .form-heading:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.eyebrow.gold { color: var(--gold-pale); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}

.upload { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
.upload-button {
  display: inline-flex; align-items: center; min-height: 46px; padding: 10px 18px; cursor: pointer;
  border: 1px dashed rgba(255, 255, 255, 0.4); border-radius: 12px;
  font-family: var(--heading); font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold-pale);
}
.upload-button:hover { border-color: var(--gold-pale); background: var(--night-raised); }
input:focus-visible + .upload-button { outline: 2px solid var(--gold-pale); outline-offset: 2px; }
.upload-button.is-disabled { opacity: 0.45; cursor: default; }

.thumbs { list-style: none; margin: 4px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.thumbs li { position: relative; width: 84px; height: 84px; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; display: block; }
.thumb-remove {
  position: absolute; top: -8px; right: -8px; width: 28px; height: 28px; min-height: 0; padding: 0;
  border-radius: 50%; border: 1px solid var(--night-line); background: var(--night); color: var(--white);
  font-size: 18px; line-height: 1; letter-spacing: 0; display: grid; place-items: center;
}
.thumb-remove:hover { background: #3a393b; border-color: var(--white); }

.sent-actions { margin-top: 28px; }

/* Sample preview and payment */
.locked-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-width: 68ch; }
.locked-list li {
  display: flex; align-items: center; gap: 12px; background: var(--mist); border-radius: 12px; padding: 12px 16px;
}
.locked-list .tag { margin: 0; flex: none; }
.locked-note { margin-top: 16px; color: var(--muted); max-width: 68ch; }

.pay {
  background: var(--night); color: var(--white); border-radius: 18px;
  padding: 36px clamp(20px, 5vw, 40px); scroll-margin-top: 20px;
}
.kit section.pay { margin-top: 56px; }
.pay h2 { font-size: 34px; margin: 10px 0 24px; }
.pay-options { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.pay-option {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--night-raised); border: 1px solid var(--night-line); border-radius: 14px; padding: 22px;
}
.pay-option.is-chosen { border-color: var(--gold-pale); }
.pay-option h3 { font-size: 20px; font-weight: 700; }
.price { font-family: var(--heading); font-size: 44px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; color: var(--gold-pale); }
.pay-blurb { color: var(--muted-on-night); flex: 1; margin-bottom: 14px; }
.pay-note { margin-top: 20px; padding: 14px 16px; border-radius: 12px; background: var(--night-raised); border: 1px solid var(--gold-pale); }
.pay-note.is-error { border-color: #ffb4a8; color: #ffb4a8; }
.pay-ref { margin-top: 18px; color: var(--muted-on-night); font-size: 14px; }

.paid-banner {
  background: #eaf5ea; border: 1px solid #bcdcbc; color: #1e4d24;
  border-radius: 12px; padding: 12px 16px; margin-bottom: 24px;
}

/* Team inbox */
.brand-tag {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--night); background: var(--gold-pale);
  border-radius: 99px; padding: 2px 9px; margin-left: 8px; vertical-align: middle;
}
.link-button {
  background: none; border: 0; min-height: 0; padding: 6px 0; color: var(--gold-pale); font-size: 12px; letter-spacing: 0.16em;
}
.link-button:hover { background: none; text-decoration: underline; text-underline-offset: 4px; }

.admin h1 { font-size: clamp(30px, 5vw, 44px); margin-bottom: 24px; }
.admin a { color: var(--ink); text-underline-offset: 3px; }
.admin .back { font-weight: 500; }
.admin > p:first-child { margin-bottom: 24px; }
.empty { color: var(--muted); }
.hint-dark { color: var(--muted); font-size: 14px; }
.form-error.dark { color: #a3271b; margin-top: 10px; }

.table-wrap { overflow-x: auto; }
.requests { width: 100%; border-collapse: collapse; font-size: 15px; }
.requests th {
  text-align: left; font-family: var(--heading); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold-deep); padding: 10px 12px; border-bottom: 1px solid var(--ink); white-space: nowrap;
}
.requests td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.requests td:first-child { white-space: nowrap; color: var(--muted); }
.requests a { font-weight: 700; }
.ref { display: block; color: var(--muted); font-size: 13px; }

.status {
  display: inline-block; border-radius: 99px; padding: 2px 11px; font-size: 13px; font-weight: 500; white-space: nowrap;
  background: var(--mist); color: var(--ink);
}
.status-ready { background: #e3f1e3; color: #1e4d24; }
.status-writing, .status-illustrating { background: #fbf0d9; color: #6b4a14; }
.status-error { background: #fbe4e0; color: #8c2318; }

.admin-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 14px; }
.admin-actions button, .button-link { min-height: 44px; padding: 8px 18px; font-size: 13px; }
.button-link {
  display: inline-flex; align-items: center; border: 1px solid var(--ink); border-radius: 6px; text-decoration: none;
  font-family: var(--heading); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
}
.button-link:hover { background: var(--mist); }
.admin-kit { border: 1px solid var(--line); border-radius: 18px; padding: clamp(16px, 4vw, 32px); }
.admin-kit h1 { margin-bottom: 0; }

/* Footer */
.footer {
  background: var(--night);
  color: var(--muted-on-night);
  border-top: 1px solid var(--night-line);
  padding: 20px 28px;
  font-size: 14px;
  text-align: center;
}
.footer a { color: var(--gold-pale); }

@media (max-width: 560px) {
  .masthead { padding: 16px 18px; }
  .store-link { display: none; }
  .brand { font-size: 19px; }
  .designer, .progress { padding: 40px 18px 64px; }
  .kit { padding: 28px 18px 72px; }
  .field-row { flex-direction: column; }
  .field-small { flex: none; }
  .list { columns: 1; }
}

@media print {
  body { background: #fff; font-size: 12pt; display: block; }
  .no-print { display: none !important; }
  .kit { padding: 0; }
  .card { border: 1px solid #ccc; background: #fff; }
  .tag { color: #000; background: none; border: 1px solid #000; }
  details.solution { background: #fff; color: #000; border: 1px solid #ccc; break-before: page; }
  details.solution summary, details.solution .prose { color: #000; }
}
