/* ==========================================================================
   Space2Standard — Design Tokens
   Brand palette (Walnut / Gold / Cream) expressed with Apple's structural
   discipline: full-bleed alternating tiles, one accent color, restrained
   shadow, generous whitespace, pill CTAs.
   ========================================================================== */

:root {
  /* Brand surfaces — sampled directly from the Space2Standard logo (deep
     navy wordmark, wood-grain armchair half, brushed-steel armchair half) */
  --walnut: #041c2c;         /* deep brand navy — dark tile bg (kept var name for drop-in compat) */
  --walnut-dark: #02141e;
  --walnut-tile-2: #0a2234;  /* micro-step used when two dark tiles sit adjacent */
  --cream: #f4f5f7;          /* cool near-white, steel-tinted (not warm cream) */
  --cream-pearl: #f9fafb;
  --white: #ffffff;

  /* Accent — the wood-grain gold/tan from the logo's left (wood) half */
  --gold: #c9a46a;
  --gold-bright: #d9bc84;
  --gold-dim: #a8824c;

  /* Secondary accent — the brushed-steel gray from the logo's right half */
  --steel: #7a8694;
  --steel-light: #b0b6c0;
  --steel-dark: #4a5460;

  /* Ink / text */
  --ink: #0c1620;
  --ink-on-dark: #f4f5f7;
  --ink-muted: #566270;
  --ink-muted-on-dark: #a4adb8;

  /* Hairlines */
  --hairline: rgba(4, 28, 44, 0.12);
  --hairline-on-dark: rgba(244, 245, 247, 0.12);

  /* Elevation — the one product shadow, nothing else */
  --product-shadow: 3px 5px 30px rgba(0, 0, 0, 0.28);

  /* Shape */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 9999px;

  /* Spacing scale */
  --space-xxs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 17px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-xxl: 48px;
  --space-section: 80px;

  /* Type */
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  --nav-height: 56px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.2px;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--gold-dim);
  text-decoration: none;
  transition: opacity 0.15s ease;
}

a:hover {
  opacity: 0.75;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0 0 var(--space-sm);
  color: inherit;
}

h1 { font-size: clamp(36px, 5vw, 56px); line-height: 1.07; letter-spacing: -0.5px; }
h2 { font-size: clamp(28px, 3.5vw, 40px); line-height: 1.1; }
h3 { font-size: 24px; line-height: 1.2; }
h4 { font-size: 19px; line-height: 1.3; }

p { margin: 0 0 var(--space-md); }

button, input, textarea, select {
  font-family: var(--font-body);
  font-size: 16px;
}

button {
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, opacity 0.15s ease;
}

button:active {
  transform: scale(0.96);
}

/* ---- Layout ---------------------------------------------------------- */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container-narrow {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Full-bleed alternating section tiles — the color change IS the divider */
.tile {
  padding: var(--space-section) 0;
}

.tile-light {
  background: var(--white);
  color: var(--ink);
}

.tile-parchment {
  background: var(--cream);
  color: var(--ink);
}

.tile-dark {
  background: var(--walnut);
  color: var(--ink-on-dark);
}

.tile-dark-2 {
  background: var(--walnut-tile-2);
  color: var(--ink-on-dark);
}

.tile-dark a:not(.btn), .tile-dark-2 a:not(.btn) { color: var(--gold-bright); }

.section-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: var(--space-sm);
  display: block;
}

.tile-dark .section-label, .tile-dark-2 .section-label { color: var(--gold-bright); }

.hairline {
  border: 1px solid var(--hairline);
}

.tile-dark .hairline, .tile-dark-2 .hairline { border-color: var(--hairline-on-dark); }

/* ---- Buttons ----------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  border-radius: var(--radius-pill);
  padding: 11px 24px;
  font-size: 16px;
  font-weight: 500;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gold);
  color: var(--walnut-dark);
}

.btn-primary:hover {
  background: var(--gold-bright);
  opacity: 1;
}

.btn-outline {
  background: transparent;
  color: var(--gold-dim);
  border: 1px solid var(--gold-dim);
}

.tile-dark .btn-outline, .tile-dark-2 .btn-outline {
  color: var(--gold-bright);
  border-color: var(--gold-bright);
}

.btn-outline:hover {
  background: var(--gold);
  color: var(--walnut-dark);
  border-color: var(--gold);
  opacity: 1;
}

.btn-dark {
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 14px;
}

.btn-lg {
  padding: 14px 30px;
  font-size: 18px;
  font-weight: 400;
}

.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- Forms --------------------------------------------------------------- */

.field {
  margin-bottom: var(--space-lg);
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: var(--space-xs);
}

.tile-dark .field label, .tile-dark-2 .field label { color: var(--ink-muted-on-dark); }

.input, textarea.input, select.input {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
  background: var(--white);
  color: var(--ink);
  outline: none;
}

.input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.2);
}

.tile-dark .input, .tile-dark-2 .input {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--hairline-on-dark);
  color: var(--ink-on-dark);
}

/* ---- Cards ----------------------------------------------------------------- */

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--hairline);
  padding: var(--space-lg);
}

.product-shadow {
  box-shadow: var(--product-shadow);
}

/* ---- Utility --------------------------------------------------------------- */

.text-muted { color: var(--ink-muted); }
.tile-dark .text-muted, .tile-dark-2 .text-muted { color: var(--ink-muted-on-dark); }
.text-gold { color: var(--gold-dim); }
.tile-dark .text-gold, .tile-dark-2 .text-gold { color: var(--gold-bright); }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.grid { display: grid; gap: var(--space-lg); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.badge-gold { background: rgba(201, 168, 76, 0.15); color: var(--gold-dim); }

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .tile { padding: var(--space-xxl) 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
