/* Palette — warm tobacconist */
:root {
  --bg: #f2ebe1;
  --paper: #ffffff;
  --ink: #1c1612;
  --muted: #7a6e60;
  --rule: #d6c9b8;
  --accent: #b8860b;
  --accent-soft: #d4a030;
  --accent-dim: #8b6914;
  --card-bg: #faf6f0;
  --nav-bg: rgba(242, 235, 225, 0.92);
}
:root[data-theme="dark"] {
  --bg: #14100c;
  --paper: #1f1a15;
  --ink: #e2d6c6;
  --muted: #8a7a68;
  --rule: #3a3026;
  --accent: #d4a030;
  --accent-soft: #e8b84a;
  --accent-dim: #b8860b;
  --card-bg: #221d17;
  --nav-bg: rgba(20, 16, 12, 0.92);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #14100c;
    --paper: #1f1a15;
    --ink: #e2d6c6;
    --muted: #8a7a68;
    --rule: #3a3026;
    --accent: #d4a030;
    --accent-soft: #e8b84a;
    --accent-dim: #b8860b;
    --card-bg: #221d17;
    --nav-bg: rgba(20, 16, 12, 0.92);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  transition: background-color .2s ease, color .2s ease;
}

/* === Layout wrapper === */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* === Typography === */
h1, h2, h3 {
  font-family: "Iowan Old Style", "Charter", Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
h1 { font-size: 2.8rem; margin: 0 0 0.5rem; }
h2 {
  font-size: 1.6rem;
  margin: 0 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}
h3 { font-size: 1.15rem; margin: 0 0 0.4rem; }
p { margin: 0 0 1rem; }
a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { color: var(--accent-soft); }
.accent { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* === Nav / Header === */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: "Iowan Old Style", "Charter", Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.logo:hover { color: var(--accent); }

[data-theme-toggle] {
  background: none;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 0.4rem;
  cursor: pointer;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  transition: color .2s, border-color .2s;
}
[data-theme-toggle]:hover {
  color: var(--accent);
  border-color: var(--accent);
}
[data-theme-toggle] svg { display: block; }
[data-theme-toggle] .sun { display: block; }
[data-theme-toggle] .moon { display: none; }
:root[data-theme="dark"] [data-theme-toggle] .sun { display: none; }
:root[data-theme="dark"] [data-theme-toggle] .moon { display: block; }

/* === Hero === */
.hero {
  padding: 4rem 0 3rem;
  text-align: center;
}
.hero h1 { font-size: 3rem; }
.hero-sub {
  font-size: 1.1rem;
  max-width: 60ch;
  margin: 0 auto 2rem;
  color: var(--muted);
}
.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: all .2s;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-soft);
  border-color: var(--accent-soft);
  color: #fff;
}
.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* === Sections === */
section {
  padding: 3rem 0;
}

/* === About === */
.about p {
  max-width: 65ch;
}

/* === Products === */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 0.5rem;
}
.product-card {
  background: var(--card-bg);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1.5rem;
  transition: transform .2s, box-shadow .2s;
}
.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.product-icon {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  line-height: 1;
}
.product-card h3 { margin-top: 0; }
.product-card p {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0;
}

/* === Location === */
.location-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
.location-info p { margin-bottom: 1.2rem; }
.location-info .note {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
}
.location-map iframe {
  width: 100%;
  border-radius: 10px;
}

/* === Contact === */
.contact-intro {
  max-width: 55ch;
  margin-bottom: 1.5rem;
}
form {
  max-width: 520px;
}
.form-row {
  margin-bottom: 1rem;
}
.form-row label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.3rem;
  color: var(--muted);
}
.form-row input,
.form-row textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color .2s;
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-status {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--accent);
}

/* === Footer === */
footer {
  margin-top: 3rem;
  border-top: 1px solid var(--rule);
  padding: 2rem 1.5rem;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.footer-brand {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
}
footer .attribution {
  font-size: 0.75rem;
  opacity: 0.7;
  margin: 0.25rem 0 0;
}

/* === Reduced motion === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* === Responsive === */
@media (max-width: 700px) {
  h1 { font-size: 2rem; }
  .hero h1 { font-size: 2.2rem; }
  .hero { padding: 2.5rem 0 2rem; }
  .location-details {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .product-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 480px) {
  main { padding: 0 1rem; }
  nav { padding: 0.6rem 1rem; }
  .product-grid {
    grid-template-columns: 1fr;
  }
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  .hero h1 { font-size: 1.8rem; }
}
