:root {
  --bg: #f7efe2;
  --bg-strong: #fffaf1;
  --surface: rgba(255, 250, 241, 0.82);
  --surface-strong: rgba(255, 250, 241, 0.96);
  --surface-tint: rgba(36, 30, 18, 0.06);
  --text: #221c11;
  --text-soft: #5c5040;
  --line: rgba(34, 28, 17, 0.1);
  --accent: #f06c24;
  --accent-deep: #b74a11;
  --accent-soft: rgba(240, 108, 36, 0.12);
  --ink-blue: #0e6d7d;
  --mint: #d5f2e2;
  --danger: #9f2d1b;
  --warning: #9a5f02;
  --success: #0f6b4e;
  --shadow: 0 24px 80px rgba(42, 26, 12, 0.14);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shell: min(1180px, calc(100vw - 32px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(14, 109, 125, 0.12), transparent 32%),
    linear-gradient(180deg, #f9f3e7 0%, #f7efe2 52%, #efe2cf 100%);
  font-family: "Space Grotesk", sans-serif;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.18;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.shell {
  width: var(--shell);
  margin: 0 auto;
}

.background-glow {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  filter: blur(40px);
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
}

.background-glow-a {
  top: -60px;
  right: -80px;
  background: rgba(240, 108, 36, 0.22);
}

.background-glow-b {
  bottom: 12%;
  left: -120px;
  background: rgba(14, 109, 125, 0.18);
}

.background-glow-c {
  bottom: 8%;
  right: -80px;
  background: rgba(213, 242, 226, 0.5);
}

.topbar,
.page-stack,
.footer {
  position: relative;
  z-index: 1;
}

.topbar {
  padding: 22px 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.brand span,
.brand h1 {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
}

.brand small {
  display: block;
  color: var(--text-soft);
}

.topnav,
.topbar-actions,
.hero-actions,
.tag-row,
.meta-row,
.card-actions,
.status-row,
.download-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topnav {
  color: var(--text-soft);
}

.topnav a {
  padding: 10px 14px;
  border-radius: 999px;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.topnav a:hover,
.topnav a:focus-visible {
  background: rgba(255, 255, 255, 0.64);
  color: var(--text);
  transform: translateY(-1px);
}

.button,
.ghost-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  background: var(--accent);
  color: #fff9f4;
  font-weight: 700;
  box-shadow: 0 16px 28px rgba(183, 74, 17, 0.22);
}

.button:hover,
.button:focus-visible,
.ghost-button:hover,
.ghost-button:focus-visible {
  transform: translateY(-2px);
}

.button-secondary,
.ghost-button {
  background: rgba(255, 255, 255, 0.62);
  color: var(--text);
  box-shadow: none;
}

.button-disabled {
  background: rgba(34, 28, 17, 0.12);
  color: rgba(34, 28, 17, 0.5);
  cursor: not-allowed;
  box-shadow: none;
}

.page-stack {
  padding: 24px 0 80px;
  display: grid;
  gap: 26px;
}

.hero-card,
.panel,
.product-card,
.column-panel,
.timeline-card,
.review-card,
.pulse-card {
  background: var(--surface);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow);
}

.hero-card,
.panel,
.column-panel {
  border-radius: var(--radius-xl);
}

.hero-card {
  padding: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.9fr);
  gap: 24px;
}

.hero-compact {
  align-items: start;
}

.hero-copy h1,
.section-heading h2,
.product-header h3,
.timeline-card h3,
.review-card strong,
.profile-panel h2 {
  font-family: "Fraunces", serif;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(2.8rem, 6vw, 4.9rem);
  line-height: 0.94;
  letter-spacing: -0.04em;
}

.hero-text,
.section-copy,
.product-description,
.timeline-card p,
.review-card p,
.note,
.empty-state,
.download-copy small,
.timeline-card small {
  color: var(--text-soft);
  line-height: 1.6;
}

.hero-text {
  max-width: 60ch;
  margin: 18px 0 0;
  font-size: 1.05rem;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-deep);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.hero-aside,
.dashboard-side,
.timeline-list,
.review-list {
  display: grid;
  gap: 16px;
}

.aside-panel,
.stat-card,
.mini-panel,
.auth-panel {
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.aside-panel,
.stat-card,
.mini-panel {
  padding: 18px;
}

.step-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text-soft);
  display: grid;
  gap: 10px;
}

.stats-grid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.stat-label {
  display: block;
  color: var(--text-soft);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.stat-value {
  display: block;
  margin-top: 10px;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
}

.section {
  display: grid;
  gap: 18px;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 360px);
  gap: 24px;
  align-items: end;
}

.section-heading.tight {
  grid-template-columns: 1fr;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.9rem, 3.4vw, 3rem);
}

.product-grid,
.dashboard-main {
  display: grid;
  gap: 18px;
}

.product-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
}

.product-media {
  position: relative;
  min-height: 240px;
  background:
    linear-gradient(135deg, rgba(14, 109, 125, 0.18), rgba(240, 108, 36, 0.12)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0.3));
}

.product-media.compact {
  min-height: 180px;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-placeholder,
.avatar-fallback {
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: grid;
  place-items: center;
  color: var(--accent-deep);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  background:
    radial-gradient(circle at top, rgba(240, 108, 36, 0.24), transparent 52%),
    rgba(255, 255, 255, 0.35);
}

.product-body {
  padding: 24px;
  display: grid;
  gap: 18px;
}

.product-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.product-header h3 {
  margin: 0;
  font-size: 1.75rem;
}

.price-tag,
.pill,
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.82rem;
}

.price-tag {
  padding: 9px 12px;
  background: rgba(14, 109, 125, 0.1);
  color: var(--ink-blue);
  font-weight: 700;
  white-space: nowrap;
}

.tag-row {
  flex-wrap: wrap;
}

.tag,
.pill {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--text);
  border: 1px solid var(--line);
}

.pill-muted {
  background: rgba(34, 28, 17, 0.06);
}

.meta-row {
  justify-content: space-between;
  color: var(--text-soft);
  font-size: 0.92rem;
  flex-wrap: wrap;
}

.rating {
  color: var(--accent-deep);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.update-chip,
.download-copy {
  display: grid;
  gap: 4px;
}

.update-chip {
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
}

.card-actions {
  justify-content: space-between;
  flex-wrap: wrap;
}

.split-section,
.dashboard-grid,
.subgrid {
  display: grid;
  gap: 18px;
}

.split-section {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.column-panel {
  padding: 24px;
}

.timeline-card,
.review-card,
.pulse-card {
  border-radius: var(--radius-lg);
  padding: 18px;
}

.timeline-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.timeline-product {
  color: var(--accent-deep);
  font-weight: 700;
}

.review-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.footer {
  padding: 0 0 28px;
  color: var(--text-soft);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.status-banner {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
}

.status-banner[data-tone="warning"] {
  background: rgba(154, 95, 2, 0.08);
  color: var(--warning);
  border-color: rgba(154, 95, 2, 0.16);
}

.status-banner[data-tone="danger"] {
  background: rgba(159, 45, 27, 0.08);
  color: var(--danger);
  border-color: rgba(159, 45, 27, 0.18);
}

.status-banner[data-tone="success"] {
  background: rgba(15, 107, 78, 0.08);
  color: var(--success);
  border-color: rgba(15, 107, 78, 0.18);
}

.dashboard-stack {
  display: grid;
  gap: 18px;
}

.profile-panel,
.warning-panel,
.auth-panel {
  padding: 24px;
}

.profile-badge {
  display: flex;
  align-items: center;
  gap: 18px;
}

.profile-avatar,
.avatar-fallback {
  width: 78px;
  height: 78px;
  min-height: 78px;
  border-radius: 22px;
}

.status-row {
  margin-top: 18px;
  flex-wrap: wrap;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.8fr);
  align-items: start;
}

.owned-product-card .subgrid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mini-panel {
  padding: 18px;
  display: grid;
  gap: 14px;
}

.mini-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.mini-list li {
  display: grid;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px dashed rgba(34, 28, 17, 0.14);
}

.mini-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.review-form,
.admin-form {
  display: grid;
  gap: 14px;
}

.review-form label,
.admin-form label {
  display: grid;
  gap: 8px;
  color: var(--text-soft);
}

input,
textarea,
select {
  width: 100%;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid rgba(34, 28, 17, 0.14);
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(240, 108, 36, 0.45);
  box-shadow: 0 0 0 4px rgba(240, 108, 36, 0.12);
}

textarea {
  resize: vertical;
}

.download-row {
  align-items: start;
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(14, 109, 125, 0.06);
  border: 1px solid rgba(14, 109, 125, 0.1);
}

.download-copy strong {
  color: var(--ink-blue);
}

.empty-state {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.62);
  border: 1px dashed rgba(34, 28, 17, 0.14);
}

.empty-state.compact {
  padding: 16px;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 420ms ease, transform 420ms ease;
}

body.is-ready .reveal {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .hero-card,
  .section-heading,
  .split-section,
  .dashboard-grid,
  .owned-product-card .subgrid,
  .product-grid,
  .review-list {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-wrap: wrap;
  }

  .topnav,
  .topbar-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }
}

@media (max-width: 720px) {
  .hero-card,
  .panel,
  .column-panel {
    padding: 22px;
  }

  .hero-copy h1 {
    font-size: clamp(2.4rem, 14vw, 3.4rem);
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .button,
  .button-secondary,
  .ghost-button {
    width: 100%;
  }

  .hero-actions,
  .card-actions,
  .download-row,
  .topbar-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .product-header,
  .timeline-topline,
  .profile-badge {
    flex-direction: column;
    align-items: start;
  }

  .footer {
    padding-bottom: 32px;
  }
}
