/* ============================================================
   SMeasy — shared styles
   ============================================================ */
:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --ink: #1a1a1a;
  --muted: #6b7280;
  --line: #e4e4e7;
  --brand: #5a6bc4;        /* periwinkle, darkened for AA text contrast on white */
  --brand-dark: #454f9c;
  --accent: #b7cc00;       /* lime, darkened for use on light surfaces */
  --lime: #ddff55;         /* true logo lime -- accent-on-dark / highlight only, not text */
  --periwinkle: #8a9aec;   /* true logo periwinkle -- decorative use, not small text */
  --radius: 14px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.05);
  --maxw: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }

/* Layout ------------------------------------------------------ */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }
.muted { color: var(--muted); }

/* Header ------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 84px;
}
/* Wordmark is a single SVG asset (brand/logo.svg) so it scales cleanly and can
   be reused for the favicon, letterhead, etc. Edit that file to change the
   wordmark -- typeface and "Bio" placement both live there, not here. */
/* flex:0 0 auto + max-width:none stop the global `img{max-width:100%}` from
   resolving against a zero-width flex item and collapsing the logo to 0x0. */
/* Height is of the whole lockup incl. the "Bio" line, so the "SMeasy" wordmark
   itself reads at roughly half this. */
.logo { display: inline-flex; align-items: center; flex: 0 0 auto; }
.logo img { height: 64px; width: auto; max-width: none; display: block; }
@media (max-width: 620px){
  .site-header .container { height: 68px; }
  .logo img { height: 50px; }
}
.nav { display: flex; align-items: center; gap: 24px; }
.nav a { color: var(--ink); font-weight: 500; font-size: 15px; }
.cart-link { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.cart-badge {
  display: none; min-width: 20px; height: 20px; padding: 0 6px;
  align-items: center; justify-content: center;
  background: var(--brand); color: #fff; border-radius: 999px;
  font-size: 12px; font-weight: 700;
}

/* Buttons ----------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; cursor: pointer; transition: .15s;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); text-decoration: none; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Hero -------------------------------------------------------- */
.hero { padding: 88px 0 64px; }
.hero h1 { font-size: 46px; line-height: 1.1; margin: 0 0 16px; letter-spacing: -1px; }
.hero p.lead { font-size: 20px; color: var(--muted); max-width: 640px; margin: 0 0 28px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* Cards & grids ---------------------------------------------- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 880px){ .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px){ .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.card-pad { padding: 24px; }

.value-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.value-card h3 { margin: 0 0 8px; font-size: 18px; }
.value-card p { margin: 0; color: var(--muted); font-size: 15px; }

/* Product card ----------------------------------------------- */
.product-card { display: flex; flex-direction: column; }
.product-schem {
  background: linear-gradient(180deg,#f4f4f5,#fff);
  color: var(--ink); padding: 24px; display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--line); min-height: 150px;
}
.product-card .card-pad { display: flex; flex-direction: column; flex: 1; }
.product-cat { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--brand); }
.product-card h3 { margin: 6px 0 8px; font-size: 18px; }
.product-card p { color: var(--muted); font-size: 14px; margin: 0 0 16px; flex: 1; }
.product-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.price { font-size: 20px; font-weight: 800; }
.price small { font-size: 12px; font-weight: 500; color: var(--muted); display: block; }

/* Product detail --------------------------------------------- */
.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 820px){ .detail { grid-template-columns: 1fr; } }
.detail-schem { background: linear-gradient(180deg,#f4f4f5,#fff); border: 1px solid var(--line); border-radius: var(--radius); padding: 48px; display: flex; align-items: center; justify-content: center; min-height: 240px; }
.spec-table { width: 100%; border-collapse: collapse; margin: 16px 0 24px; }
.spec-table th, .spec-table td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.spec-table th { color: var(--muted); font-weight: 600; width: 45%; }
.qty-row { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.qty-row input { width: 72px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 15px; }

/* Cart / checkout -------------------------------------------- */
.cart-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.cart-table th, .cart-table td { padding: 16px; text-align: left; border-bottom: 1px solid var(--line); }
.cart-table th { font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.cart-table td.num, .cart-table th.num { text-align: right; }
.cart-qty { width: 60px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.link-danger { color: #dc2626; cursor: pointer; font-size: 13px; background: none; border: none; }
.summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.summary-row { display: flex; justify-content: space-between; margin: 8px 0; }
.summary-row.total { font-size: 20px; font-weight: 800; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 620px){ .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 600; }
.field input, .field select, .field textarea {
  padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; font-size: 15px; font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--brand); border-color: var(--brand); }

.notice { background: #f4f4f5; border: 1px solid #d4d4d8; color: #1a1a1a; padding: 12px 14px; border-radius: 10px; font-size: 14px; margin: 12px 0; }

.confirm { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; text-align: center; box-shadow: var(--shadow); }
.confirm .check { width: 64px; height: 64px; border-radius: 50%; background: #e4e4e7; color: var(--ink); display: flex; align-items: center; justify-content: center; font-size: 34px; margin: 0 auto 16px; }

/* Category cards (landing) ----------------------------------- */
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 32px; }
@media (max-width: 720px){ .cat-grid { grid-template-columns: 1fr; } }
.cat-card {
  display: flex; flex-direction: column; gap: 14px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
  color: var(--ink); transition: .15s; text-decoration: none;
}
.cat-card:hover { border-color: var(--brand); transform: translateY(-2px); text-decoration: none; box-shadow: 0 6px 28px rgba(0,0,0,.10); }
.cat-card .cat-icon { background: linear-gradient(180deg,#f4f4f5,#fff); border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; align-items: center; justify-content: center; }
.cat-card .cat-icon svg { width: 120px; height: 70px; }
.cat-card h3 { margin: 0; font-size: 19px; line-height: 1.25; }
.cat-card p { margin: 0; color: var(--muted); font-size: 15px; flex: 1; }
.cat-card .cat-go { font-weight: 700; font-size: 14px; color: var(--brand); }
.cat-card:hover .cat-go { text-decoration: underline; }

/* Product list (category page) ------------------------------- */
.product-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); margin-top: 28px; }
.product-row {
  display: grid; grid-template-columns: 230px 280px 1fr; gap: 32px;
  align-items: center; padding: 28px 0; border-bottom: 1px solid var(--line);
}
.product-row .pr-name h3 { margin: 0 0 6px; font-size: 18px; line-height: 1.25; }
.product-row .pr-price { font-weight: 800; font-size: 16px; }
.product-row .pr-price small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.product-row .pr-actions { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; }
.product-row .pr-schem { background: linear-gradient(180deg,#f4f4f5,#fff); border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; align-items: center; justify-content: center; min-height: 110px; }
.product-row .pr-schem svg { width: 100%; height: auto; }
.product-row .pr-intro p { margin: 0 0 14px; color: var(--muted); font-size: 15px; }
.pr-specs { width: 100%; border-collapse: collapse; }
.pr-specs th, .pr-specs td { text-align: left; padding: 5px 0; font-size: 13px; border-bottom: 1px solid var(--line); }
.pr-specs th { color: var(--muted); font-weight: 600; width: 42%; }
@media (max-width: 860px){
  .product-row { grid-template-columns: 1fr; gap: 16px; }
  .product-row .pr-schem { max-width: 320px; }
}

.empty { text-align: center; padding: 64px 0; color: var(--muted); }

/* Breadcrumb / misc ------------------------------------------ */
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.page-title { font-size: 34px; margin: 0 0 8px; letter-spacing: -.5px; }
.section-eyebrow { color: var(--brand); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; font-size: 13px; }

/* Footer ------------------------------------------------------ */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 40px 0; margin-top: 40px; color: var(--muted); font-size: 14px; }
.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; }

/* Pre-launch band --------------------------------------------
   Shown on every page while SITE_STATUS.prelaunch is true (js/catalog.js
   injects it). Deliberately not dismissible and not sticky: it sits at the top
   of every page load so the disclosure is unmissable on arrival. */
.prelaunch-band {
  background: var(--brand-dark);
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  padding: 10px 0;
}
.prelaunch-band .container { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.prelaunch-band strong { color: var(--lime); font-weight: 700; }
.prelaunch-band a { color: #fff; text-decoration: underline; font-weight: 600; white-space: nowrap; }
.prelaunch-band a:hover { color: var(--lime); }

/* Pricing while pre-launch ----------------------------------- */
.price-block { margin: 6px 0 18px; }
.price-block .price-list { font-weight: 800; font-size: 22px; }
.price-block .price-list small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.price-founder {
  margin-top: 8px; display: inline-flex; align-items: baseline; gap: 8px;
  background: #f3f5fd; border: 1px solid #dbe0f6; border-radius: 8px;
  padding: 7px 11px; font-size: 14px;
}
.price-founder b { color: var(--brand-dark); font-size: 16px; }
.avail-note {
  margin: 12px 0 0; font-size: 13px; color: var(--muted);
  border-left: 3px solid var(--line); padding-left: 10px;
}

/* Founding-customer page ------------------------------------- */
.deposit-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow); max-width: 560px;
}
.deposit-amount { font-size: 40px; font-weight: 800; letter-spacing: -1px; line-height: 1.1; }
.deposit-amount small { display: block; font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-top: 4px; }
.terms-list { margin: 0; padding: 0; list-style: none; }
.terms-list li { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: flex-start; }
.terms-list li:last-child { border-bottom: 0; }
.terms-list .t-mark { color: var(--brand); font-weight: 800; flex: none; }
.draft-flag {
  background: #fff8e6; border: 1px solid #ecd9a6; border-radius: 10px;
  padding: 14px 16px; font-size: 14px; color: #6b5828; margin: 24px 0;
}

/* Collaboration invitation ------------------------------------
   Shown in place of a product list when a category deliberately has no
   products (currently DNA Curtains > Custom made products). */
.collab-invite {
  margin-top: 28px; padding: 40px;
  background: linear-gradient(180deg,#f4f5fb,#fff);
  border: 1px solid var(--line); border-radius: var(--radius);
  text-align: center;
}
.collab-invite h2 { margin: 0 0 12px; font-size: 26px; letter-spacing: -.3px; }
.collab-invite p {
  margin: 0 auto 22px; max-width: 520px;
  color: var(--muted); font-size: 17px;
}

/* Category card with no icon --------------------------------
   The grid stretches every card to the tallest one. Normally .cat-card p has
   flex:1 so it absorbs the slack and pins "View products" to the bottom — but
   with no icon there is far more slack, which left a large gap under the text.
   Centre the whole block instead and let the paragraph size to its content. */
.cat-card--noicon { justify-content: center; }
.cat-card--noicon p { flex: 0 1 auto; }
