@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,300&display=swap');

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

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

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

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

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

/* ─── Variables — Light mode (default) ───────────── */
:root {
  --color-bg: #F9F6F1;
  --color-text: #1a1a1a;
  --color-accent: #B8935A;
  --text-muted: #4A4845;       /* paragraph text, descriptions, body copy */
  --text-subtle: #6B6560;      /* placeholders, captions, footer text */
  --color-line: rgba(0, 0, 0, 0.08);
  --color-input-bg: #EDEAE4;
  --color-text-muted: rgba(26, 26, 26, 0.85);
  --color-text-soft: rgba(26, 26, 26, 0.55);
  --color-card-bg: rgba(0, 0, 0, 0.025);
  --color-focus-border: rgba(0, 0, 0, 0.25);

  --font-display: 'DM Sans', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

/* ─── Variables — Dark mode ──────────────────────── */
html.dark-mode {
  --color-bg: #0F0F0F;
  --color-text: #F5F0EB;
  --color-accent: #B8935A;
  --text-muted: #A8A098;       /* paragraph text, descriptions, body copy */
  --text-subtle: #8A8278;      /* placeholders, captions, footer text */
  --color-line: rgba(245, 240, 235, 0.12);
  --color-input-bg: #1a1a1a;
  --color-text-muted: rgba(245, 240, 235, 0.85);
  --color-text-soft: rgba(245, 240, 235, 0.6);
  --color-card-bg: rgba(245, 240, 235, 0.03);
  --color-focus-border: rgba(245, 240, 235, 0.3);
}

/* Base */
body {
  overflow-x: hidden;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Typography defaults */
h1 {
  font-family: 'DM Sans', sans-serif !important;
  font-weight: 700;
}

h2 {
  font-family: 'DM Sans', sans-serif !important;
  font-weight: 600;
}

h3 {
  font-family: 'DM Sans', sans-serif !important;
  font-weight: 600;
}

p, a, li, label, input, button, select, textarea {
  font-family: 'DM Sans', sans-serif;
}

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

/* Wrapper */
.wrapper {
  width: 100%;
  max-width: 650px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Store page — wider layout */
.store-page main .wrapper,
.store-page nav .wrapper {
  max-width: 1100px;
}

/* Navigation */
nav {
  padding: 32px 0;
}

nav .wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-family: var(--font-display) !important;
  font-size: 18px;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
}

.nav-brand:hover {
  color: var(--color-accent);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  color: var(--color-text-muted);
  letter-spacing: 0.03em;
  position: relative;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-accent);
  font-weight: 800;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

/* Theme Toggle — pill */
.theme-toggle {
  position: relative;
  width: 52px;
  height: 28px;
  border-radius: 14px;
  background-color: #1a1a1a;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  overflow: hidden;
  transition: background-color 0.3s ease, opacity 0.2s ease;
}

.theme-toggle:hover {
  opacity: 0.85;
}

html.dark-mode .theme-toggle {
  background-color: #F9F6F1;
}

.toggle-knob {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: #F9F6F1;
  top: 3px;
  left: 27px;
  z-index: 2;
  transition: left 0.3s ease, background-color 0.3s ease;
}

html.dark-mode .toggle-knob {
  left: 3px;
  background-color: #0F0F0F;
}

.toggle-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  z-index: 1;
  pointer-events: none;
  stroke-width: 2;
}

.icon-sun {
  left: 7px;
  color: rgba(249, 246, 241, 0.55);
}

.icon-moon {
  right: 7px;
  color: rgba(15, 15, 15, 0.45);
}

/* Accent Line (homepage only) */
.accent-line {
  width: 100%;
  height: 1px;
  background-color: var(--color-accent);
  margin-bottom: 40px;
  opacity: 0.25;
}

/* Main */
main {
  flex: 1;
  padding: 0 0 48px;
}

/* Footer */
footer {
  padding: 24px 0;
  border-top: 1px solid var(--color-line);
}

footer .wrapper {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  color: var(--text-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
}

footer a {
  color: var(--color-accent);
}

footer a:hover {
  text-decoration: underline;
}

/* Sections */
.section {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--color-line);
}

.my-products-section {
  margin-top: 15px;
  padding-top: 15px;
}

.my-products-section .shop-img {
  padding: 0;
  margin: 0;
  height: auto;
}

.daily-tools-section {
  padding-top: 25px;
  margin-top: 35px;
}

.section-label {
  display: block;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 4px;
}

/* Hero */
.hero {
  display: flex;
  flex-direction: column;
}

.hero-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 8px;
}

.hero-name {
  font-family: 'DM Sans', sans-serif !important;
  font-size: clamp(36px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--color-text);
  padding-bottom: 5px;
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-subtle);
  padding-bottom: 2em;
  opacity: 0.85;
}

.hero-bio {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.8;
  color: var(--text-muted);
}

/* Project Card */
.project-card {
  padding: 24px;
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-line);
}

.project-card-top {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 12px;
}

.project-name {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  color: var(--color-text);
}

.project-badge {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.project-desc {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--text-muted);
}

/* CTA Button */
.btn-cta {
  display: inline-block;
  background-color: #1a1a1a;
  color: #F9F6F1;
  border: none;
  padding: 10px 24px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.btn-cta:hover {
  background-color: #2a2a2a;
}

html.dark-mode .btn-cta {
  background-color: #F5F0EB;
  color: #0F0F0F;
}

html.dark-mode .btn-cta:hover {
  background-color: #E8E3DE;
}

/* Section display headings */
.agency-name {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text);
  margin-bottom: 4px;
}

/* Newsletter */
.newsletter-desc {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 14px;
}

/* Beehiiv embed wrapper */
.newsletter-embed {
  margin-bottom: 4px;
}

/* ── Beehiiv iframe embed ── */
.newsletter-embed iframe,
[data-beehiiv-form-id] iframe,
#beehiiv-embed iframe {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  border: none !important;
  display: block;
}

iframe[src*="beehiiv"] {
  height: auto !important;
  min-height: 0 !important;
  max-height: 80px !important;
}

.newsletter-embed,
[data-beehiiv-form-id],
#beehiiv-embed {
  overflow: visible !important;
  width: 100%;
}

/* ── Option B: script / form HTML embed ──
   These overrides target Beehiiv's injected form elements
   so they match the site design regardless of their default styles. */
.newsletter-embed form {
  display: flex;
  gap: 0;
  margin: 0;
}

.newsletter-embed input[type="email"] {
  flex: 1;
  background-color: var(--color-input-bg) !important;
  border: 1px solid var(--color-line) !important;
  border-right: none !important;
  border-radius: 0 !important;
  color: var(--color-text) !important;
  font-family: var(--font-body) !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  padding: 11px 16px !important;
  outline: none !important;
  box-shadow: none !important;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.2s ease;
}

.newsletter-embed input[type="email"]::placeholder {
  color: var(--text-subtle) !important;
}

.newsletter-embed input[type="email"]:focus {
  border-color: var(--color-focus-border) !important;
}

.newsletter-embed button[type="submit"],
.newsletter-embed input[type="submit"] {
  flex-shrink: 0;
  background-color: #1a1a1a !important;
  color: #F9F6F1 !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 10px 24px !important;
  font-family: var(--font-body) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  letter-spacing: 0.05em !important;
  cursor: pointer !important;
  box-shadow: none !important;
  transition: background-color 0.2s ease;
}

.newsletter-embed button[type="submit"]:hover,
.newsletter-embed input[type="submit"]:hover {
  background-color: #2a2a2a !important;
}

html.dark-mode .newsletter-embed button[type="submit"],
html.dark-mode .newsletter-embed input[type="submit"] {
  background-color: #F5F0EB !important;
  color: #0F0F0F !important;
}

html.dark-mode .newsletter-embed button[type="submit"]:hover,
html.dark-mode .newsletter-embed input[type="submit"]:hover {
  background-color: #E8E3DE !important;
}

html.dark-mode .newsletter-embed input[type="email"] {
  background-color: var(--color-input-bg) !important;
  color: var(--color-text) !important;
}

/* Any labels or helper text Beehiiv injects */
.newsletter-embed label,
.newsletter-embed p,
.newsletter-embed span {
  font-family: var(--font-body) !important;
  color: var(--text-muted) !important;
}

.newsletter-note {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  color: var(--text-subtle);
  font-style: italic;
  margin-top: -28px;
}

/* Building Section */
.building-desc {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.building-items {
  display: flex;
  flex-direction: column;
}

.building-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-line);
}

.building-item:first-child {
  border-top: 1px solid var(--color-line);
}

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

.building-item-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.building-item-name {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
}

.building-item-name span {
  font-weight: 800;
  font-size: 16px
}

.building-item-desc {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.6;
}

.building-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.building-item-price {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.building-item-status {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.building-item-link {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  color: var(--color-accent);
  letter-spacing: 0.03em;
  transition: opacity 0.2s ease;
}

.building-item-link:hover {
  opacity: 0.7;
}

/* Services */
.services-heading {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text);
  margin-bottom: 4px;
}

.services-desc {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.services-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 28px;
}

.service-name {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}

.service-desc {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--text-muted);
}

/* Connect */
.connect-desc {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 4px;
}

.social-links {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.social-links a {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: color 0.2s ease;
}

.social-links a:hover {
  color: var(--color-accent);
}

.social-arrow {
  color: var(--color-accent);
  font-size: 13px;
}

.social-handle {
  color: var(--text-subtle);
  font-size: 13px;
}

.social-links a:hover .social-handle {
  color: var(--color-accent);
}

.shop-card-owned {
  border: 1px solid rgba(184, 147, 90, 0.3);
}

/* Store Hero */
.store-hero {
  padding-bottom: 8px;
}

.store-heading {
  font-family: 'DM Sans', sans-serif !important;
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--color-text);
  margin-bottom: 0;
}

.store-desc {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.7;
  margin-top: 12px;
  padding-bottom: 24px;
}

.affiliate-disclosure {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 400;
  color: var(--text-subtle);
  font-style: italic;
  text-align: center;
  padding-top: 30px;
}

/* Filter Tags */
.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.filter-tag {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--text-subtle);
  background: none;
  border: 1px solid var(--color-line);
  padding: 6px 14px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.filter-tag:hover {
  color: var(--color-text);
  border-color: var(--color-focus-border);
}

.filter-tag.active {
  color: var(--color-bg);
  background-color: var(--color-text);
  border-color: var(--color-text);
}

/* Shop Grid */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  align-items: stretch;
}

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

.shop-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  height: 100%;
}

.shop-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background-color: var(--color-card-bg);
  padding: 16px;
  transition: background-color 0.2s ease;
  height: 100%;
}

.shop-card:hover {
  background-color: var(--color-input-bg);
}

.shop-img-link {
  display: block;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.shop-img-link:hover {
  opacity: 0.85;
}

.shop-img {
  width: 100%;
  height: 220px;
  background-color: transparent;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0;
  padding: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

html.dark-mode .shop-img {
  background-color: #FFFFFF;
  border-color: rgba(0, 0, 0, 0.08);
}

.shop-img-photo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.shop-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.shop-tag {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.shop-name {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
}

.shop-desc {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
}

.shop-link {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  color: var(--color-accent);
  letter-spacing: 0.03em;
  margin-top: 4px;
  transition: opacity 0.2s ease;
  display: inline-block;
}

.shop-link:hover {
  opacity: 0.7;
}

/* ─── Responsive ─────────────────────────────────── */

@media (max-width: 768px) {
  .wrapper {
    padding: 0 20px;
  }

  nav {
    padding: 24px 0;
  }

  .nav-links {
    gap: 20px;
  }

  .nav-right {
    gap: 16px;
  }

  main {
    padding: 32px 0 72px;
  }

  .accent-line {
    margin-bottom: 36px;
  }

  .hero {
    gap: 16px;
  }

  .hero-photo {
    margin-bottom: 4px;
  }

  .hero-bio {
    font-size: 14px;
  }

  .section {
    margin-top: 56px;
    padding-top: 32px;
  }

  .newsletter-embed form {
    flex-direction: column;
  }

  .newsletter-embed input[type="email"] {
    border-right: 1px solid var(--color-line) !important;
    border-bottom: none !important;
    width: 100%;
  }

  .newsletter-embed button[type="submit"],
  .newsletter-embed input[type="submit"] {
    width: 100%;
    min-height: 44px;
    text-align: center;
  }

  .shop-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  footer .wrapper {
    text-align: center;
  }
}

@media (max-width: 480px) {
  body {
    line-height: 1.7;
  }

  .hero-bio {
    font-size: 14px;
    line-height: 1.85;
  }

  .store-desc {
    font-size: 14px;
  }

  .shop-grid {
    grid-template-columns: 1fr;
  }

  .filter-tags {
    gap: 6px;
  }

  .nav-links a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .social-links a {
    min-height: 44px;
  }

  .shop-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .newsletter-embed input[type="email"],
  .newsletter-embed button[type="submit"],
  .newsletter-embed input[type="submit"] {
    min-height: 44px;
  }
}
