/* Rising Sun Collaborative — site stylesheet.
   Dawn palette carried over from the coming soon page: night header, cream page,
   ember calls to action, gold accents. System fonts only; no external requests. */

:root {
  --night: #0f1630;
  --deep: #16224a;
  --violet: #472a5c;
  --ember: #b0492f;
  --ember-dark: #933a24;
  --amber: #d9793d;
  --gold: #f7c76a;
  --gold-ink: #8a5f10;
  --cream: #fbf5ea;
  --paper: #fffdf9;
  --ink: #1b1f33;
  --muted: #5d6178;
  --line: #e9dfcc;
  --line-strong: #d6c7a6;
  --ok: #2f7d4f;
  --warn: #9a5b00;
  --bad: #a8322f;
  --shadow: 0 1px 2px rgba(27, 31, 51, 0.06), 0 6px 18px rgba(27, 31, 51, 0.06);
  --radius: 10px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --container: 72rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
}
main { flex: 1 0 auto; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ember-dark); text-underline-offset: 0.15em; }
a:hover { color: var(--ember); }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.75rem); }
h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--gold-ink); outline-offset: 3px; border-radius: 3px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding-inline: 1.25rem; }
.section { padding-block: clamp(2rem, 5vw, 3.5rem); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.section-head h2 { margin: 0; }
.eyebrow { margin: 0 0 0.75rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold-ink); }

/* skip link, preview banner, header */
.skip { position: absolute; left: 1rem; top: -3rem; padding: 0.5rem 0.9rem; background: var(--gold); color: var(--night); border-radius: 6px; z-index: 50; }
.skip:focus { top: 1rem; }
.preview-banner { background: var(--gold); color: var(--night); font-size: 0.85rem; text-align: center; padding: 0.35rem 1rem; }

.site-header { background: var(--night); color: #fdf1de; border-bottom: 1px solid rgba(247, 199, 106, 0.35); }
.header-row { display: flex; align-items: center; gap: 1rem 1.5rem; flex-wrap: wrap; padding-block: 0.85rem; }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; color: #fdf1de; text-decoration: none; margin-right: auto; }
.brand-mark { width: 2rem; height: 2rem; flex: none; }
.brand-name { font-family: var(--serif); font-size: 1.2rem; letter-spacing: 0.01em; }
.site-nav, .header-tools { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.site-nav a, .header-tools a { color: #fdf1de; text-decoration: none; padding: 0.4rem 0.7rem; border-radius: 6px; }
.site-nav a:hover, .header-tools a:hover { color: var(--gold); background: rgba(255, 255, 255, 0.06); }
.site-nav a[aria-current="page"] { color: var(--gold); }
.cart-count { display: inline-block; min-width: 1.5em; padding: 0 0.4em; margin-left: 0.25em; text-align: center; font-size: 0.78rem; font-weight: 600; line-height: 1.5em; border-radius: 999px; background: var(--gold); color: var(--night); }
@media (max-width: 40rem) {
  .brand-name { font-size: 1.05rem; }
  .header-row { gap: 0.5rem 0.75rem; }
}

/* hero: the dawn from the coming soon page, compressed */
.hero { position: relative; overflow: hidden; color: #fdf1de; text-align: center; background: var(--night);
  background-image: linear-gradient(to bottom, var(--night) 0%, var(--deep) 35%, var(--violet) 62%, var(--ember) 84%, var(--amber) 100%); }
.hero .container { position: relative; z-index: 1; padding-block: clamp(3rem, 9vw, 6rem) clamp(4.5rem, 12vw, 8rem); }
.hero h1 { color: #fdf1de; max-width: 40rem; margin-inline: auto; }
.hero .lede { max-width: 34rem; margin: 1rem auto 1.75rem; font-size: clamp(1rem, 2.2vw, 1.15rem); color: rgba(253, 241, 222, 0.85); }
.hero .eyebrow { color: var(--gold); }
.hero-sun { position: absolute; left: 50%; bottom: -28vmin; width: 48vmin; height: 48vmin; margin-left: -24vmin; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 50% 42%, #fff6e2 0%, var(--gold) 45%, #e79a4b 78%, rgba(231, 154, 75, 0) 100%);
  box-shadow: 0 0 12vmin 5vmin rgba(247, 199, 106, 0.32); animation: rise 2.2s cubic-bezier(0.16, 0.84, 0.32, 1) both; }
@keyframes rise { from { transform: translateY(18vmin); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .hero-sun { animation: none; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.65rem 1.2rem; border-radius: 8px; border: 1px solid transparent; font: inherit; font-weight: 600; line-height: 1.2; cursor: pointer; text-decoration: none; transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--ember); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--ember-dark); color: #fff; }
.btn-gold { background: var(--gold); color: var(--night); }
.btn-gold:hover:not(:disabled) { background: #fbd98f; color: var(--night); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover:not(:disabled) { border-color: var(--gold-ink); color: var(--ink); background: rgba(247, 199, 106, 0.12); }
.btn-link { background: none; border: 0; padding: 0; color: var(--ember-dark); font: inherit; text-decoration: underline; cursor: pointer; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.9rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }

/* cards and product grid */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-body { padding: 1.25rem; }
.grid-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); gap: 1.25rem; }
.product-card { display: flex; flex-direction: column; overflow: hidden; text-decoration: none; color: inherit; }
.product-card:hover { border-color: var(--line-strong); }
.product-media { aspect-ratio: 1 / 1; background: linear-gradient(160deg, #f3e9d4, #e8dcc2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-media .placeholder { width: 38%; opacity: 0.55; }
.product-body { padding: 0.9rem 1rem 1rem; display: flex; flex-direction: column; gap: 0.3rem; flex: 1; }
.product-title { font-family: var(--serif); font-size: 1.1rem; margin: 0; color: var(--ink); }
.product-price { margin-top: auto; display: flex; align-items: baseline; gap: 0.5rem; font-weight: 600; }
.compare-at { color: var(--muted); font-weight: 400; text-decoration: line-through; }
.badge { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 999px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.badge-sale { background: var(--ember); color: #fff; }
.badge-out { background: #ebe4d6; color: var(--muted); }
.badge-ok { background: #e2f1e7; color: var(--ok); }

/* toolbar on the shop page */
.toolbar { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.25rem; }
.toolbar input[type="search"] { flex: 1 1 14rem; }
.toolbar select { flex: 0 1 auto; }

/* forms */
.field { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 1rem; }
.field label, .legend { font-weight: 600; font-size: 0.92rem; }
.field .hint { font-size: 0.85rem; color: var(--muted); }
input, select, textarea { font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: 8px; padding: 0.6rem 0.75rem; width: 100%; }
input[type="checkbox"], input[type="radio"] { width: auto; margin: 0; accent-color: var(--ember); }
input[type="number"] { width: 6rem; }
textarea { min-height: 6rem; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold-ink); outline-offset: 1px; border-color: var(--gold-ink); }
.check { display: flex; align-items: flex-start; gap: 0.6rem; font-weight: 400; }
.check input { margin-top: 0.3rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 0 1rem; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 0 0 1.25rem; }
legend { padding-inline: 0.4rem; font-weight: 600; }
.radio-list { display: flex; flex-direction: column; gap: 0.6rem; }
.radio-list label { display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.7rem 0.85rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.radio-list label:has(input:checked) { border-color: var(--ember); box-shadow: 0 0 0 1px var(--ember); }
.radio-list input { margin-top: 0.3rem; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; overflow: hidden; }
.qty button { font: inherit; width: 2.2rem; height: 2.4rem; border: 0; background: transparent; cursor: pointer; color: var(--ink); }
.qty button:hover { background: rgba(247, 199, 106, 0.2); }
.qty input { width: 3.2rem; text-align: center; border: 0; border-inline: 1px solid var(--line); border-radius: 0; padding: 0.4rem 0.2rem; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.field-error { margin: 0.25rem 0 0; font-size: 0.88rem; font-weight: 600; color: var(--bad); }
[aria-invalid="true"] { border-color: var(--bad); box-shadow: 0 0 0 1px var(--bad); }
#payment-methods + .field-error { margin-top: 0.5rem; }

/* notices and toasts */
.notice { padding: 0.85rem 1rem; border: 1px solid var(--line-strong); border-left-width: 4px; border-radius: 8px; background: #fff; margin: 0 0 1rem; }
.notice-info { border-left-color: var(--gold-ink); }
.notice-success { border-left-color: var(--ok); }
.notice-warn { border-left-color: var(--warn); }
.notice-error { border-left-color: var(--bad); }
.notice p:last-child { margin-bottom: 0; }
.toasts { position: fixed; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 0.5rem; z-index: 60; max-width: min(24rem, calc(100vw - 2rem)); }
.toast { padding: 0.75rem 1rem; border-radius: 8px; background: var(--night); color: #fdf1de; box-shadow: var(--shadow); border-left: 4px solid var(--gold); animation: toast-in 0.2s ease-out; }
.toast-error { border-left-color: #f08b86; }
.toast-success { border-left-color: #7fd39a; }
@keyframes toast-in { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }

/* gate: sign in to browse */
.gate { max-width: 34rem; margin: 2rem auto; text-align: center; }
.gate .card-body { padding: 2rem 1.5rem; }
.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); }

/* product detail */
.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
@media (max-width: 48rem) { .product { grid-template-columns: 1fr; } }
.gallery-main { aspect-ratio: 1 / 1; border-radius: var(--radius); overflow: hidden; background: #f3e9d4; border: 1px solid var(--line); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 0.5rem; margin-top: 0.6rem; flex-wrap: wrap; }
.gallery-thumbs button { width: 4rem; height: 4rem; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: #f3e9d4; cursor: pointer; }
.gallery-thumbs button[aria-pressed="true"] { border-color: var(--gold-ink); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.product-detail h1 { margin-bottom: 0.4rem; }
.product-detail .price { font-size: 1.5rem; font-weight: 600; display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: 1rem; }
.product-detail .description { white-space: pre-line; margin: 1.25rem 0; }
.buy-row { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; margin: 1rem 0; }

/* cart and totals */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 0.75rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.table .num { text-align: right; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
.cart-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr); gap: 2rem; align-items: start; }
@media (max-width: 52rem) { .cart-layout { grid-template-columns: 1fr; } }
.totals { list-style: none; margin: 0; padding: 0; }
.totals li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.4rem 0; border-bottom: 1px solid var(--line); }
.totals li.grand { border-bottom: 0; border-top: 2px solid var(--line-strong); margin-top: 0.4rem; padding-top: 0.7rem; font-weight: 700; font-size: 1.1rem; }
.line-title { font-weight: 600; }
.line-meta { font-size: 0.85rem; color: var(--muted); }

/* checkout steps */
.steps { display: flex; gap: 0.5rem; list-style: none; margin: 0 0 1.5rem; padding: 0; font-size: 0.85rem; flex-wrap: wrap; }
.steps li { padding: 0.3rem 0.75rem; border-radius: 999px; background: #efe6d3; color: var(--muted); }
.steps li[aria-current="step"] { background: var(--night); color: var(--gold); }
.review-block { margin-bottom: 1.25rem; }
.review-block h3 { margin-bottom: 0.3rem; }
.review-block p { margin: 0; white-space: pre-line; }

/* account */
.tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--line-strong); margin-bottom: 1.5rem; flex-wrap: wrap; }
.tabs button { font: inherit; font-weight: 600; padding: 0.6rem 1rem; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--muted); cursor: pointer; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ember); }
.auth-card { max-width: 28rem; margin: 0 auto; }
.account-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 2rem; align-items: start; }
@media (max-width: 52rem) { .account-grid { grid-template-columns: 1fr; } }
.order { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); margin-bottom: 1rem; }
.order summary { cursor: pointer; padding: 0.9rem 1.1rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-weight: 600; }
.order summary .muted { font-weight: 400; }
.order .order-body { padding: 0 1.1rem 1rem; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1rem; margin: 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; }

/* footer */
.site-footer { margin-top: 3rem; background: var(--night); color: rgba(253, 241, 222, 0.8); font-size: 0.9rem; }
.footer-row { display: flex; gap: 1.5rem 3rem; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; padding-block: 2rem; }
.footer-brand { font-family: var(--serif); font-size: 1.1rem; color: #fdf1de; margin: 0 0 0.25rem; }
.site-footer a { color: #fdf1de; }
.site-footer a:hover { color: var(--gold); }
.site-footer nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.copyright { width: 100%; margin: 0; }

/* content pages */
.prose { max-width: 44rem; }
.prose h2 { margin-top: 2rem; }
.prose ul { padding-left: 1.2rem; }

/* loading skeleton */
.skeleton { background: linear-gradient(90deg, #efe6d3 25%, #f7f0e1 50%, #efe6d3 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: 6px; min-height: 1em; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } .toast { animation: none; } }
