/* reta4less — Oura × Aesop × Apple × Airbnb */
:root {
  --primary: #002f87;
  --accent: #00a3e0;
  --bg: #ffffff;
  --bg-soft: #f7f7f7;
  --ink: #222222;
  --muted: #6a6a6a;
  --line: #ebebeb;
  --danger: #c62828;
  --success: #1b7a4e;
  --warn: #c47a00;
  --radius: 12px;
  --radius-lg: 24px;
  --header-h: 72px;
  --max: 1200px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --shadow-soft: 0 6px 20px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-lift: 0 16px 40px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.05);
  --uhc-navy: var(--primary);
  --uhc-blue: var(--primary);
  --uhc-sky: var(--accent);
  --uhc-soft: #e8f3fb;
  --bg0: var(--bg);
  --bg1: var(--bg-soft);
  --bg2: #eeeeee;
  --accent-dim: #002266;
  --accent-soft: var(--uhc-soft);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}
a:hover {
  color: var(--accent);
}

.wrap {
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

/* Inner-page sticky header */
.site-top {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.site-top-inner {
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 1rem 0 0.85rem;
  position: relative;
}

.site-top .logo,
.logo {
  justify-self: center;
  grid-column: 1 / -1;
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  letter-spacing: -0.04em;
  color: var(--primary);
  text-decoration: none;
}
.logo:hover {
  color: var(--primary);
  text-decoration: none;
}
.logo span {
  color: var(--ink);
}

.site-top .main-nav,
.main-nav {
  grid-column: 1 / -1;
  justify-self: center;
  display: flex;
  gap: 1.75rem;
  align-items: center;
}

.main-nav a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 1.5px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
  text-decoration: none;
}

.site-top .cart-link {
  position: absolute;
  top: 1rem;
  right: 0;
}

.header-spacer {
  display: none;
}

/* Homepage brand header */
.page-home {
  background:
    radial-gradient(900px 480px at 50% -10%, rgba(0, 47, 135, 0.05), transparent 55%),
    linear-gradient(180deg, #fafafa 0%, #ffffff 42%, #ffffff 100%);
}

.brand-header {
  position: relative;
  padding: 2.25rem 1.5rem 1.35rem;
  text-align: center;
  animation: fadeIn 0.5s ease both;
}

.brand-logo {
  display: inline-block;
  font-size: clamp(2.4rem, 6vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--primary);
  text-decoration: none;
  margin: 0.35rem 0 1.15rem;
  transition: opacity 0.2s ease;
}
.brand-logo:hover {
  color: var(--primary);
  opacity: 0.85;
  text-decoration: none;
}
.brand-logo span {
  color: var(--ink);
}

.brand-nav {
  display: flex;
  justify-content: center;
  gap: clamp(1.5rem, 4vw, 2.75rem);
  flex-wrap: wrap;
}

.brand-nav a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 1.5px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.brand-nav a:hover,
.brand-nav a.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
  text-decoration: none;
}

.cart-link {
  position: absolute;
  top: 1.5rem;
  right: max(1.25rem, calc((100% - var(--max)) / 2 + 0.25rem));
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.cart-link:hover {
  color: var(--ink);
  background: #fff;
  border-color: #d0d0d0;
  text-decoration: none;
  transform: scale(1.02);
}

.cart-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.cart-count[hidden] {
  display: none !important;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.product-stage {
  padding: 1rem 1.5rem 4.5rem;
  animation: fadeIn 0.55s ease 0.06s both;
}

.product-stage-inner {
  width: min(var(--max), 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.product-visual {
  background: linear-gradient(165deg, #f3f5f7 0%, #ffffff 48%, #eef1f4 100%);
  border-radius: 28px;
  aspect-ratio: 1 / 1.02;
  min-height: min(68vh, 680px);
  display: grid;
  place-items: center;
  padding: clamp(1.75rem, 4vw, 3.25rem);
  box-shadow: var(--shadow-soft);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  overflow: hidden;
}
.product-visual:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}
.product-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 22px 36px rgba(0, 0, 0, 0.14));
}

.product-detail {
  max-width: 30rem;
}

.product-kicker {
  margin: 0 0 0.65rem;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.product-detail h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.08;
  color: var(--ink);
}

.product-desc {
  margin: 0 0 1.25rem;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--muted);
}

.product-points {
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
}
.product-points li {
  position: relative;
  padding: 0.35rem 0 0.35rem 1.15rem;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 500;
}
.product-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.product-social {
  margin: 0 0 1.5rem;
  padding: 0.9rem 1rem;
  background: var(--bg-soft);
  border-radius: 14px;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.45;
}

.proof-stack {
  display: grid;
  gap: 0.65rem;
  margin: 0 0 1.75rem;
}

.proof-line {
  margin: 0;
  padding: 0.95rem 1.1rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.proof-line--accent {
  background: rgba(0, 47, 135, 0.06);
  border-color: rgba(0, 47, 135, 0.18);
  color: var(--primary);
  font-size: 1.12rem;
  font-weight: 700;
}

.proof-line--strong {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  box-shadow: 0 8px 22px rgba(0, 47, 135, 0.28);
}

.product-price {
  margin: 0 0 1.35rem;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.product-buy .qty-label {
  display: block;
  margin: 0 0 0.5rem;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.buy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
}

.qty-stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
  height: 54px;
}

.qty-btn {
  width: 48px;
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 500;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}
.qty-btn:hover {
  background: var(--bg-soft);
}

.qty-input {
  width: 3.25rem;
  margin: 0;
  border: none;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-radius: 0;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.qty-input:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(0, 47, 135, 0.2);
}

.btn-buy,
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0 2rem;
  min-height: 54px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 47, 135, 0.22);
}
.btn-buy:hover,
.btn-primary:hover {
  background: #002266;
  color: #fff;
  text-decoration: none;
  transform: scale(1.02);
}
.btn-buy:active,
.btn-primary:active {
  transform: scale(0.99);
}

.hero-feedback {
  margin-top: 1rem;
  min-height: 1.35em;
  font-size: 0.95rem;
}
.hero-feedback.ok { color: var(--success); }
.hero-feedback.err { color: var(--danger); }

/* —— Shared page chrome —— */
.page-hero {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  padding: 2.5rem 0 2rem;
  margin-bottom: 2rem;
}

.page-hero h1 {
  margin: 0 0 0.5rem;
  color: var(--ink);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 650;
  letter-spacing: -0.02em;
}

.page-hero p {
  margin: 0;
  color: var(--muted);
  max-width: 36rem;
}

.prose {
  max-width: 42rem;
}
.prose h2 {
  color: var(--primary);
  font-size: 1.25rem;
  font-weight: 650;
  margin: 2rem 0 0.75rem;
}
.prose p {
  color: var(--ink);
  margin: 0 0 1rem;
  text-align: left;
}

.aff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.aff-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  padding: 1.5rem;
}

.aff-card h2 {
  margin: 0 0 0.5rem;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 650;
}

.aff-card p {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 1rem;
}

label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
}

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

input,
textarea,
select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 0.7rem 0.85rem;
  margin-bottom: 1rem;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(0, 163, 224, 0.25);
  border-color: var(--accent);
}

button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 0.75rem 1.25rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

button:hover,
.btn:hover {
  background: #002266;
  text-decoration: none;
  color: #fff;
  transform: scale(1.02);
}

button.secondary,
.btn.secondary {
  background: var(--bg);
  color: var(--primary);
  border: 1px solid var(--line);
}
button.secondary:hover,
.btn.secondary:hover {
  background: var(--bg-soft);
  color: var(--primary);
}

button.danger {
  background: var(--danger);
  color: #fff;
}

.err {
  color: var(--danger);
  font-size: 0.9rem;
  margin: 0 0 1rem;
  min-height: 1.2em;
}

.ok {
  color: var(--success);
  font-size: 0.9rem;
  margin: 0 0 1rem;
}

.notice {
  border-left: 3px solid var(--accent);
  padding: 0.85rem 1rem;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.95rem;
  margin: 1.25rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.shipping-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  background: var(--bg-soft);
  margin-bottom: 1.5rem;
}

.shipping-card h2 {
  font-size: 1rem;
  margin: 0 0 0.35rem;
  color: var(--ink);
}

.shipping-card .hint {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 1rem;
}

.addr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.addr-grid .addr-full {
  grid-column: 1 / -1;
}

.addr-grid label {
  margin-bottom: 0.3rem;
}

.addr-grid input {
  margin-bottom: 0;
}

.verify-panel {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(0, 47, 135, 0.2);
}

.verify-label {
  margin: 0 0 0.65rem;
  font-weight: 700;
  color: var(--primary);
  font-size: 0.95rem;
}

.verify-address {
  margin: 0 0 0.85rem;
  padding: 0.85rem 1rem;
  background: var(--bg-soft);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.45;
  white-space: pre-wrap;
  color: var(--ink);
}

.verify-confirm {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

.verify-confirm input {
  width: auto;
  margin: 0;
}

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

.pay-box {
  border: 1px solid var(--line);
  background: var(--bg-soft);
  border-radius: 8px;
  padding: 1.5rem;
  display: grid;
  gap: 1rem;
  justify-items: start;
}

.pay-box img {
  background: #fff;
  padding: 0.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.mono {
  font-family: var(--mono);
  word-break: break-all;
  font-size: 0.85rem;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--bg-soft);
}

.badge.paid,
.badge.shipped {
  color: var(--primary);
  border-color: #b3d4f0;
  background: var(--uhc-soft);
}

.badge.pending {
  color: var(--warn);
  border-color: #fde68a;
  background: #fffbeb;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.table th,
.table td {
  text-align: left;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--line);
}

.table th {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer .wrap {
  padding-top: 0;
  padding-bottom: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
}

.gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: var(--bg-soft);
}

.gate[hidden],
#app-view[hidden],
#create-affiliate-panel[hidden] {
  display: none !important;
}

.gate-panel {
  width: min(420px, 100%);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 8px 28px rgba(0, 47, 135, 0.06);
}

.gate-panel .brand,
.gate-panel .logo {
  display: block;
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
}

.gate-panel p {
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.lede {
  color: var(--muted);
  margin: 0 0 1rem;
}

.price {
  font-family: var(--mono);
  color: var(--ink);
  font-weight: 600;
}

.ship-promo {
  margin: 0.35rem 0 1rem;
  color: var(--primary);
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.ship-promo strong {
  font-weight: 800;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.qty {
  width: 4.5rem;
  margin: 0;
}

/* Admin leftovers */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.stat {
  border: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
}

.stat .k {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat .v {
  font-family: var(--mono);
  font-size: 1.15rem;
  margin-top: 0.25rem;
}


@media (max-width: 960px) {
  .brand-header {
    padding: 1.5rem 1rem 1rem;
  }
  .cart-link {
    top: 1rem;
    right: 1rem;
    font-size: 13px;
    padding: 0.45rem 0.75rem;
  }
  .product-stage {
    padding: 0.5rem 1rem 3rem;
  }
  .product-stage-inner {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
  .product-visual {
    min-height: min(52vh, 420px);
    border-radius: 22px;
    padding: 1.5rem;
  }
  .product-detail {
    max-width: none;
  }
  .buy-row {
    flex-direction: column;
    align-items: stretch;
  }
  .qty-stepper,
  .btn-buy,
  .btn-primary {
    width: 100%;
  }
  .qty-input {
    flex: 1;
  }
  .site-top-inner {
    padding-top: 3rem;
  }
  .site-top .cart-link {
    top: 0.85rem;
    right: 0;
  }
}
