:root {
  --bg: #faf9f6;
  --bg-alt: #f2f0ea;
  --surface: #ffffff;
  --text: #111827;
  --text-muted: #4b5563;
  --border: #e2e0d8;
  --accent: #1d4ed8;
  --accent-hover: #1e40af;
  --accent-soft: #dbeafe;
  --danger: #dc2626;
  --shadow: 0 8px 30px rgba(17, 24, 39, 0.06);
  --radius: 14px;
}

[data-theme="dark"] {
  --bg: #0c0e12;
  --bg-alt: #13161d;
  --surface: #181c25;
  --text: #f3f4f6;
  --text-muted: #9ca3af;
  --border: #272d3b;
  --accent: #60a5fa;
  --accent-hover: #3b82f6;
  --accent-soft: rgba(96, 165, 250, 0.14);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .brand-text {
  font-family: "Space Grotesk", "Inter", sans-serif;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

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

.container {
  width: min(1140px, 92%);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.15rem;
  color: var(--text);
}

.brand-mark {
  display: inline-flex;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.auth-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  height: 38px;
  padding: 0 0.85rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
  white-space: nowrap;
}

.auth-btn.signed-in {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: transparent;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1.15rem;
  background: var(--bg-alt);
  padding: 0.3rem;
  border-radius: 10px;
}

.auth-tab {
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 0.55rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.auth-tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.auth-note {
  margin: 0.9rem 0 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

.dash-profile {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.dash-profile p {
  margin: 0.2rem 0;
}

.dash-order-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.7rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.88rem;
}

.status-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
}

.currency-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  height: 38px;
  padding: 0 0.7rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.text-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.86rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-link:hover {
  color: var(--accent);
}

.icon-btn, .menu-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
}

.menu-btn {
  display: none;
}

.cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.cart-badge {
  background: var(--accent);
  color: #ffffff;
  font-size: 0.78rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.72rem 1.25rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.93rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
  padding: 0.55rem 0.95rem;
  font-size: 0.87rem;
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-full {
  width: 100%;
}

/* Hero */
.hero {
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.1rem, 4.3vw, 3.35rem);
  margin: 0 0 1rem 0;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 56ch;
  margin: 0 0 1.6rem 0;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.hero-metrics {
  display: flex;
  gap: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.hero-metrics strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.25rem;
}

.hero-metrics span {
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* Hero Visual Cards */
.hero-visual {
  display: grid;
  gap: 1rem;
}

.studio-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.3rem;
  box-shadow: var(--shadow);
}

.studio-card h3 {
  margin: 0.5rem 0 0.75rem 0;
  font-size: 1.05rem;
}

.pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.mini-bars {
  display: grid;
  gap: 0.4rem;
}

.mini-bars span {
  height: 8px;
  border-radius: 99px;
  background: var(--border);
}

.mini-bars span:nth-child(1) { width: 85%; background: var(--accent); }
.mini-bars span:nth-child(2) { width: 65%; }
.mini-bars span:nth-child(3) { width: 45%; }

.wireframe-svg {
  width: 100%;
  height: 58px;
  color: var(--text);
}

.swatch-row {
  display: flex;
  gap: 0.55rem;
}

.swatch-row span {
  width: 34px;
  height: 22px;
  border-radius: 6px;
}

/* Sections */
.section {
  padding: clamp(3rem, 6vw, 4.75rem) 0;
}

.section-alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.2rem;
}

.section-kicker {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.section-desc {
  max-width: 44ch;
  color: var(--text-muted);
  margin: 0;
  font-size: 0.95rem;
}

/* Grids & Cards */
.cards-grid {
  display: grid;
  gap: 1.35rem;
}

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

.service-card, .product-card, .work-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.service-num {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.service-card h3 {
  margin: 0 0 0.6rem 0;
  font-size: 1.2rem;
}

.service-card > p {
  color: var(--text-muted);
  font-size: 0.93rem;
  margin: 0 0 1rem 0;
}

.feature-list {
  margin: 0 0 1.4rem 0;
  padding-left: 1.15rem;
  color: var(--text);
  font-size: 0.9rem;
  flex-grow: 1;
}

.feature-list li {
  margin-bottom: 0.4rem;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.price-tag span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.price-tag strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
}

/* Store Filters & Product Cards */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.filter-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.filter-btn.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.product-card {
  padding: 0;
  overflow: hidden;
}

.product-preview {
  height: 150px;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #ffffff;
}

.product-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.product-body h3 {
  margin: 0 0 0.45rem 0;
  font-size: 1.08rem;
}

.product-body p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0 0 1.1rem 0;
  flex-grow: 1;
}

/* Work Cards */
.work-card {
  padding: 0;
  overflow: hidden;
}

.work-thumb {
  height: 170px;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #ffffff;
}

.thumb-ui { background: linear-gradient(135deg, #1e3a8a, #3b82f6); }
.thumb-product { background: linear-gradient(135deg, #1f2937, #4b5563); }
.thumb-apparel { background: linear-gradient(135deg, #9f1239, #e11d48); }

.work-tag {
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.18);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.work-graphic {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.work-body {
  padding: 1.25rem;
}

.work-body h3 {
  margin: 0 0 0.45rem 0;
  font-size: 1.08rem;
}

.work-body p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Process */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}

.process-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
}

.process-step span {
  display: inline-block;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  color: var(--accent);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.process-step h3 {
  margin: 0 0 0.4rem 0;
  font-size: 1.02rem;
}

.process-step p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Order Section */
.order-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2.2rem;
  align-items: start;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: grid;
  gap: 0.9rem;
  margin-top: 1.25rem;
}

.contact-card p {
  margin: 0.15rem 0 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.recent-orders {
  margin-top: 1.25rem;
  padding: 1rem 1.2rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.88rem;
}

.recent-orders h4 {
  margin: 0 0 0.5rem 0;
}

.recent-orders ul {
  margin: 0;
  padding-left: 1.1rem;
}

.order-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.93rem;
}

.form-error {
  color: var(--danger);
  font-size: 0.88rem;
  font-weight: 500;
  margin: 0 0 0.85rem 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-inner p {
  margin: 0.2rem 0 0 0;
}

/* Native Dialog Modals */
.modal-dialog {
  width: min(540px, 92vw);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 0;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.modal-dialog::backdrop {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.35rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  margin: 0;
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.modal-body {
  padding: 1.25rem 1.35rem;
  max-height: 60vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 1rem 1.35rem;
  border-top: 1px solid var(--border);
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-qty {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  margin-bottom: 0.9rem;
}

.modal-actions {
  display: flex;
  gap: 0.65rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.modal-actions.full-row {
  justify-content: stretch;
}

.modal-actions.full-row > * {
  flex: 1 1 auto;
}

.receipt-box {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  font-size: 0.9rem;
}

.receipt-box p {
  margin: 0.35rem 0;
}

/* Responsive */
body {
  overflow-x: hidden;
}

@media (max-width: 920px) {
  .hero-grid, .three-col, .process-grid, .order-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .menu-btn {
    display: inline-flex;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem 1.5rem;
    align-items: flex-start;
    gap: 0.9rem;
    box-shadow: var(--shadow);
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links a {
    width: 100%;
    padding: 0.35rem 0;
  }
}

@media (max-width: 560px) {
  .nav-inner {
    gap: 0.45rem;
    min-height: 62px;
  }
  .brand {
    font-size: 0.98rem;
    gap: 0.45rem;
  }
  .brand-mark svg {
    width: 24px;
    height: 24px;
  }
  .nav-actions {
    gap: 0.35rem;
  }
  .auth-btn {
    padding: 0 0.55rem;
    font-size: 0.78rem;
    height: 36px;
  }
  .cart-btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    height: 36px;
  }
  .icon-btn, .menu-btn {
    width: 36px;
    height: 36px;
  }
  .hero-ctas {
    flex-direction: column;
  }
  .hero-ctas .btn {
    width: 100%;
    min-height: 46px;
  }
  .hero-metrics {
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
  }
  .service-card, .order-form {
    padding: 1.2rem;
  }
  .card-footer {
    flex-wrap: wrap;
  }
  .field input, .field select, .field textarea {
    font-size: 16px; /* Prevents iOS Safari zoom on focus */
  }
  .modal-dialog {
    width: 95vw;
  }
  .modal-actions.full-row {
    flex-direction: column;
  }
}
