/* ==========================================================================
   Palette Lab — Base Design System & App Shell
   Agent D: css/base.css
   Visual DNA inspired directly by mycolor.space:
   - Typography: Montserrat only
   - Pills: border-radius 999px, height 50px, soft shadow
   - Palette swatches: pure color square (~112px desktop), hex below (#555), 1s COPIED
   - Mobile (<640px): wide bars (~65% width x 72px) with hex to the right
   - Floating Action Button (FAB): teal 50px circle, fixed top-right, expandable column
   - Light theme only for app chrome
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens
   -------------------------------------------------------------------------- */
:root {
  /* DNA tokens from DESIGN.md */
  --teal: #00c9a7;
  --teal-dark: #00a383;
  --ink: #1b1b1b;
  --text: #555555;
  --muted: #888888;
  --hair: #eeeeee;
  --bg: #ffffff;
  --radius-swatch: 4px;
  --pill: 999px;
  --shadow-pill: 0 6px 18px rgba(0, 0, 0, 0.18);
  --font: 'Montserrat', system-ui, -apple-system, sans-serif;

  /* Backward compatibility tokens for views (explore.css, website.css) */
  --ui-bg: var(--bg);
  --ui-surface: #ffffff;
  --ui-surface-hover: #f9f9f9;
  --ui-surface-active: #f0f0f0;
  --ui-border: var(--hair);
  --ui-border-subtle: var(--hair);
  --ui-border-strong: #dddddd;
  --ui-text: var(--ink);
  --ui-muted: var(--muted);
  --ui-accent: var(--teal);
  --ui-accent-hover: var(--teal-dark);
  --ui-accent-subtle: rgba(0, 201, 167, 0.1);
  --ui-danger: #ef4444;

  --radius: 12px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-full: 999px;
  --gap: 8px;
  --gap-sm: 8px;
  --gap-md: 16px;
  --gap-lg: 24px;

  --font-sans: var(--font);
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);

  --min-touch-target: 44px;
}

/* --------------------------------------------------------------------------
   2. Reset & Document Setup
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  min-width: 360px;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input, select, textarea {
  font-family: var(--font);
  font-size: inherit;
  color: inherit;
}

pre, code {
  font-family: var(--font-mono);
  max-width: 100%;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
}

table {
  max-width: 100%;
}

.table-wrap,
.contrast-table-wrap,
.contrast-table {
  max-width: 100%;
  overflow-x: auto;
}

button {
  cursor: pointer;
  background: none;
  border: none;
  user-select: none;
  touch-action: manipulation;
}

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

/* --------------------------------------------------------------------------
   3. App Wrapper Layout
   -------------------------------------------------------------------------- */
.app-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--bg);
}

/* --------------------------------------------------------------------------
   4. Gradient Hero Section
   -------------------------------------------------------------------------- */
.hero-section {
  position: relative;
  min-height: 520px;
  width: 100%;
  background-color: #845ec2;
  transition: background 0.35s ease;
  display: flex;
  flex-direction: column;
  color: #ffffff;
  padding-bottom: 56px;
}

/* Subtle soft bottom transition between hero and next section */
.hero-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: none; /* the dark fade read as a muddy band against the white page */
  pointer-events: none;
  z-index: 2;
}

/* Top Nav Bar within Hero */
.hero-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 32px;
  gap: 20px;
  z-index: 10;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

/* Live Overlapping Seed Circles Logo */
.brand-circles {
  display: flex;
  align-items: center;
  position: relative;
  height: 28px;
}

.logo-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  margin-right: -8px;
  transition: background-color 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}

.brand-wordmark {
  font-size: 17px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  margin-left: 8px;
  white-space: nowrap;
}

/* Uppercase Letter-Spaced Nav */
.hero-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.hero-nav-link {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.85);
  padding: 6px 2px;
  position: relative;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.hero-nav-link:hover {
  color: #ffffff;
}

.hero-nav-link.active {
  color: #ffffff;
}

.hero-nav-link.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background-color: #ffffff;
  border-radius: 2px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

/* Hero Center Content */
.hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 20px 24px;
  text-align: center;
}

.hero-headline {
  font-size: 44px;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.12);
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-bottom: 12px;
  max-width: 820px;
}

.hero-subline {
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  margin-bottom: 36px;
  letter-spacing: 0.02em;
}

/* Hero Light BG Adaptive Overrides */
.hero-section.hero-light-bg .brand-wordmark,
.hero-section.hero-light-bg .hero-nav-link,
.hero-section.hero-light-bg .hero-headline,
.hero-section.hero-light-bg .hero-subline {
  color: #1b1b1b;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.hero-section.hero-light-bg .hero-nav-link.active::after {
  background-color: #1b1b1b;
}

.hero-section.hero-light-bg .logo-circle {
  border-color: #1b1b1b;
}

/* --------------------------------------------------------------------------
   5. Seed Pills & Action Pills in Hero
   -------------------------------------------------------------------------- */
.hero-seeds-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  max-width: 100%;
}

/* Seed Pill */
.seed-pill {
  height: 50px;
  min-width: 170px;
  max-width: 200px;
  border-radius: var(--pill);
  box-shadow: var(--shadow-pill);
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  position: relative;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  user-select: none;
}

.seed-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

.seed-pill::after {
  content: '✎';
  position: absolute;
  right: 44px;
  top: 50%;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .24);
  color: currentColor;
  font-size: 11px;
  opacity: 0;
  transform: translateY(-50%) scale(.8);
  transition: opacity .15s ease, transform .15s ease;
  pointer-events: none;
}

.seed-pill:hover::after,
.seed-pill:focus-visible::after {
  opacity: .9;
  transform: translateY(-50%) scale(1);
}

.seed-pill:active {
  transform: translateY(0);
}

.seed-pill.is-locked {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 1px;
}

/* Icon Buttons on Pill (Lock & Remove) */
.pill-icon-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}

.pill-icon-btn svg {
  display: block;
  pointer-events: none;
}

.pill-icon-btn:hover {
  transform: scale(1.15);
}

/* Visually obvious locked state: solid white circle with dark icon */
.pill-icon-btn.is-locked-btn {
  background-color: #ffffff !important;
  color: #1b1b1b !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
}

.pill-icon-btn.remove-btn:hover {
  background-color: rgba(239, 68, 68, 0.8) !important;
  color: #ffffff !important;
}

.pill-icon-spacer {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  pointer-events: none;
}

.hero-btn-text-full {
  display: inline;
}

.hero-btn-text-short {
  display: none;
}

/* Text inside a seed pill; the full custom picker owns editing. */
.seed-pill-hex {
  width: 82px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* Action Pills Row (+ ADD, SHUFFLE, FROM LOGO) */
.hero-actions-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-pill-btn {
  height: 50px;
  border-radius: var(--pill);
  padding: 0 24px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-pill);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
  cursor: pointer;
  white-space: nowrap;
}

.hero-pill-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

.hero-pill-btn:active {
  transform: translateY(0);
}

.hero-pill-btn svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Ghost Pill (+ ADD COLOR) */
.hero-pill-ghost {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.95);
  color: #ffffff;
}

.hero-pill-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.hero-section.hero-light-bg .hero-pill-ghost {
  border-color: #1b1b1b;
  color: #1b1b1b;
}

.hero-section.hero-light-bg .hero-pill-ghost:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Solid Teal Action Pills (SHUFFLE, FROM LOGO) */
.hero-pill-teal {
  background-color: var(--teal);
  color: #ffffff;
  border: none;
}

.hero-pill-teal:hover {
  background-color: var(--teal-dark);
}

/* --------------------------------------------------------------------------
   6. Results Area (App Main)
   -------------------------------------------------------------------------- */
.app-main {
  flex: 1;
  background-color: var(--bg);
  width: 100%;
}

.tab-panel {
  display: block;
  width: 100%;
}

.tab-panel[hidden] {
  display: none !important;
}

/* Section divider hairline */
.section-hairline {
  height: 1px;
  background-color: var(--hair);
  max-width: 920px;
  margin: 48px auto;
  border: none;
}

/* --------------------------------------------------------------------------
   7. Swatch Component Styling (.swatch-unit)
   -------------------------------------------------------------------------- */
.swatch-unit {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  user-select: none;
  font-family: var(--font);
  transition: transform 0.18s ease;
  position: relative;
}

/* Pure color square */
.swatch-color {
  width: 112px;
  height: 112px;
  border-radius: var(--radius-swatch); /* 4px */
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.swatch-unit:hover .swatch-color {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14), inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.swatch-unit:active .swatch-color {
  transform: translateY(-1px);
}

/* Swatch Sizes Desktop */
.swatch-size-lg .swatch-color {
  width: 112px;
  height: 112px;
}

.swatch-size-md .swatch-color {
  width: 112px;
  height: 112px;
}

.swatch-size-sm .swatch-color {
  width: 76px;
  height: 76px;
}

/* Swatch Meta (Below Color Square on Desktop) */
.swatch-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 8px;
  text-align: center;
  width: 100%;
}

/* Optional Label Above Hex (e.g. role name "BACKGROUND" or step number "50") */
.swatch-label-top {
  font-family: var(--font);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-bottom: 2px;
  line-height: 1.2;
}

/* Hex Code Label */
.swatch-hex {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text); /* #555 */
  transition: color 0.15s ease, font-weight 0.15s ease;
  line-height: 1.2;
  white-space: nowrap;
}

.swatch-hex.is-copied {
  color: var(--teal);
  font-weight: 700;
}

/* Seed Indicator Dot */
.swatch-seed-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #bbbbbb;
  margin-top: 4px;
}

/* Backward compatibility for previous .swatch-card */
.swatch-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  user-select: none;
  font-family: var(--font);
  border-radius: var(--radius-swatch);
}

/* --------------------------------------------------------------------------
   8. Floating Action Button (FAB) & Drawer
   -------------------------------------------------------------------------- */
.floating-fab-container {
  display: none;
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.85);
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-fab-container.is-visible {
  display: block;
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

/* 50px Teal Circle Button */
.fab-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--teal);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.fab-btn:hover {
  background-color: var(--teal-dark);
  transform: scale(1.06);
}

.fab-btn:active {
  transform: scale(0.96);
}

.fab-icon-close {
  display: none;
  font-size: 18px;
  font-weight: 700;
}

.floating-fab-container.is-open .fab-icon-open {
  display: none;
}

.floating-fab-container.is-open .fab-icon-close {
  display: block;
}

/* Expandable Drawer / Column of Seed Pills */
.fab-panel {
  position: absolute;
  top: 60px;
  right: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  border: 1px solid var(--hair);
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 210px;
  align-items: center;
  animation: fabPanelIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.fab-panel[hidden] {
  display: none !important;
}

@keyframes fabPanelIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.fab-panel-seeds {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.fab-panel-seeds .seed-pill {
  width: 100%;
  min-width: 0;
  height: 44px;
}

.fab-panel-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
}

.fab-pill-action {
  height: 40px;
  border-radius: var(--pill);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hair);
  background-color: #f7f7f7;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s ease;
}

.fab-pill-action:hover {
  background-color: #eeeeee;
}

.fab-pill-action.btn-teal {
  background-color: var(--teal);
  color: #ffffff;
  border-color: var(--teal);
}

.fab-pill-action.btn-teal:hover {
  background-color: var(--teal-dark);
}

/* --------------------------------------------------------------------------
   9. Logo Extraction Modal
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background-color: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.15s ease-out;
}

.modal-backdrop[hidden] {
  display: none !important;
}

.modal-card {
  background-color: #ffffff;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  width: 100%;
  max-width: 520px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 32px;
  animation: slideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink);
}

.modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 16px;
  transition: all 0.15s ease;
}

.modal-close-btn:hover {
  background-color: #f2f2f2;
  color: var(--ink);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dropzone {
  border: 2px dashed #cccccc;
  border-radius: 16px;
  padding: 44px 20px;
  text-align: center;
  background-color: #fafafa;
  cursor: pointer;
  transition: all 0.18s ease;
}

.dropzone:hover, .dropzone.is-dragover {
  border-color: var(--teal);
  background-color: rgba(0, 201, 167, 0.05);
}

.dropzone-icon {
  font-size: 28px;
  margin-bottom: 10px;
  color: var(--muted);
}

.dropzone-text {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink);
  margin-bottom: 6px;
}

.dropzone-sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.extraction-preview-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.extracted-circles-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 0;
}

.extracted-circle-item {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.extracted-circle-item:hover {
  transform: scale(1.12);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

/* --------------------------------------------------------------------------
   10. Toast Notification (.toast-container & .toast-pill)
   -------------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  background-color: var(--ink);
  color: #ffffff;
  border-radius: var(--pill);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  animation: toastSlideIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: auto;
}

.toast-pill.toast-leaving {
  animation: toastSlideOut 0.2s ease-in forwards;
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastSlideOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(8px) scale(0.96); }
}

/* --------------------------------------------------------------------------
   11. Footer
   -------------------------------------------------------------------------- */
.app-footer {
  width: 100%;
  background-color: var(--bg);
  border-top: 1px solid var(--hair);
  padding: 48px 20px;
  text-align: center;
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.footer-brand {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.footer-text {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #aaaaaa;
}

/* --------------------------------------------------------------------------
   12. Responsive Breakpoints (Phone <640px)
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .hero-section {
    min-height: auto;
    padding-bottom: 24px;
  }

  .hero-nav-bar {
    padding: 12px 14px;
    gap: 8px;
    justify-content: space-between;
  }

  .hero-brand {
    gap: 6px;
    flex-shrink: 1;
    min-width: 0;
  }

  .brand-wordmark {
    font-size: 11px;
    letter-spacing: 0.05em;
    margin-left: 4px;
    white-space: nowrap;
  }

  .logo-circle {
    width: 17px;
    height: 17px;
    margin-right: -6px;
  }

  .hero-nav {
    gap: 8px;
    flex-shrink: 0;
  }

  .hero-nav-link {
    font-size: 10px;
    letter-spacing: 0.08em;
    padding: 4px 1px;
    white-space: nowrap;
  }

  .floating-fab-container {
    top: 16px;
    right: 16px;
  }

  .fab-panel {
    right: 0;
    max-width: calc(100vw - 32px);
    width: 200px;
  }

  .hero-content {
    padding: 16px 14px 18px;
  }

  .hero-headline {
    font-size: 26px;
    margin-bottom: 6px;
    line-height: 1.2;
  }

  .hero-subline {
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.3;
  }

  /* Compact seed pills: ~2 per row (~44px tall, 1 seed = centered single) */
  .hero-seeds-wrap {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 360px;
    margin: 0 auto 14px auto;
  }

  .seed-pill {
    height: 44px;
    width: calc(50% - 6px);
    max-width: 164px;
    min-width: 140px;
    padding: 0 8px;
    box-sizing: border-box;
  }

  .hero-seeds-wrap .seed-pill:only-child {
    width: 180px;
    max-width: 200px;
  }

  .seed-pill-hex {
    width: 72px;
    font-size: 12px;
    letter-spacing: 0.08em;
  }

  .pill-icon-btn,
  .pill-icon-spacer {
    width: 22px;
    height: 22px;
  }

  .pill-icon-btn svg {
    width: 13px;
    height: 13px;
  }

  /* Action pills: ONE row of three compact pills (ADD / SHUFFLE / FROM LOGO) */
  .hero-actions-wrap {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
  }

  .hero-pill-btn {
    height: 42px;
    width: auto;
    flex: 1 1 0;
    min-width: 0;
    max-width: 130px;
    padding: 0 10px;
    font-size: 10.5px;
    letter-spacing: 0.08em;
    gap: 5px;
    white-space: nowrap;
  }

  .hero-pill-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
  }

  .hero-btn-text-full {
    display: none;
  }

  .hero-btn-text-short {
    display: inline;
  }

  /* Phone Swatches: wide bars (~65% width x 72px) with hex to the right */
  .swatch-unit {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    margin-bottom: 5px;
  }

  .swatch-color,
  .swatch-size-lg .swatch-color,
  .swatch-size-md .swatch-color,
  .swatch-size-sm .swatch-color {
    width: 65%;
    height: 72px;
    border-radius: var(--radius-swatch);
  }

  .swatch-meta {
    flex: 1;
    margin-top: 0;
    padding-left: 14px;
    align-items: flex-start;
    text-align: left;
  }

  .swatch-hex {
    font-size: 13px;
    white-space: nowrap;
  }

  .swatch-seed-dot {
    margin-top: 4px;
    margin-left: 0;
  }

  /* Stack swatch grids vertically on mobile */
  .explore-card-swatches,
  .swatches-row,
  .swatch-row {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }
}

@media (max-width: 380px) {
  .brand-wordmark {
    display: none;
  }
}
