:root {
  --charcoal: #1a1a1a;
  --black: #101010;
  --leather: #8b5a2b;
  --tan: #c9a471;
  --cream: #f5f1e8;
  --offwhite: #fcfaf6;
  --rustic-green: #44503b;
  --text-light: #f2eee6;
  --text-dark: #252320;
  --card-bg: #fffdf8;
  --radius: 14px;
  --shadow-soft: 0 8px 20px rgba(0, 0, 0, 0.12);
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Trebuchet MS", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--text-dark);
  background: var(--offwhite);
  line-height: 1.55;
}

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

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

h1,
h2,
h3 {
  font-family: "Rockwell", "Georgia", "Trebuchet MS", serif;
  letter-spacing: 0.02em;
  margin-top: 0;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(16, 16, 16, 0.94);
  border-bottom: 1px solid rgba(201, 164, 113, 0.35);
  backdrop-filter: blur(6px);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
}

.logo {
  height: 68px;
  width: auto;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.main-nav a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
}

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

.section-dark {
  background: linear-gradient(180deg, var(--charcoal), var(--black));
  color: var(--text-light);
}

.section-light {
  background: var(--offwhite);
}

.section-cream {
  background: var(--cream);
}

section {
  padding: 4.2rem 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  color: var(--tan);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.hero h1 {
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  margin-bottom: 0.55rem;
}

.hero-subheadline {
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  color: #e1d0ba;
  margin: 0 0 1rem 0;
  font-weight: 700;
}

.hero-intro {
  max-width: 60ch;
  margin-bottom: 1.3rem;
}

.hero-logo-wrap {
  display: flex;
  justify-content: center;
}

.hero-logo {
  width: min(340px, 80%);
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.35));
}

.feature-strip {
  padding: 1.1rem 0;
  background: #141210;
  border-top: 1px solid rgba(201, 164, 113, 0.25);
  border-bottom: 1px solid rgba(201, 164, 113, 0.25);
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem 1.25rem;
}

.feature-list li {
  color: var(--text-light);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(201, 164, 113, 0.45);
  border-radius: 999px;
  background: rgba(139, 90, 43, 0.18);
}

.made-one p {
  max-width: 72ch;
  margin-top: 0;
}

.made-one-tagline {
  font-weight: 700;
  color: #4a3523;
  margin-top: 0.85rem;
}

.btn {
  display: inline-block;
  text-decoration: none;
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  border: 2px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--tan);
  color: var(--black);
  border-color: #d7bb94;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #d3b07d;
}

.btn-accent {
  background: var(--leather);
  color: var(--text-light);
  border-color: #9f6b37;
}

.section-heading {
  margin-bottom: 1.2rem;
}

.section-heading h2 {
  margin-bottom: 0.4rem;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1.5rem 0 1.2rem 0;
}

.filter-btn {
  border: 1px solid #b48b59;
  background: #f3e6d4;
  color: #3d2b1f;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}

.filter-btn[aria-pressed="true"] {
  background: var(--leather);
  color: var(--text-light);
}

.hat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.hat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  border: 1px solid #dfccb3;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hat-image-wrap {
  aspect-ratio: 4 / 3;
  background: linear-gradient(145deg, #eee4d6, #d5c2aa);
  position: relative;
}

.hat-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-placeholder {
  position: absolute;
  inset: 0;
  display: none;
  place-content: center;
  text-align: center;
  padding: 1rem;
  color: #4e3b2b;
  font-weight: 700;
  background: repeating-linear-gradient(
    -45deg,
    rgba(139, 90, 43, 0.08),
    rgba(139, 90, 43, 0.08) 12px,
    rgba(201, 164, 113, 0.12) 12px,
    rgba(201, 164, 113, 0.12) 24px
  );
}

.hat-card-content {
  padding: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

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

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag {
  display: inline-block;
  font-size: 0.72rem;
  background: #efe2cf;
  border: 1px solid #d8b586;
  color: #4a3523;
  border-radius: 999px;
  padding: 0.22rem 0.48rem;
}

.hat-meta {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.18rem;
  font-size: 0.92rem;
}

.status-pill {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: #e9dbc6;
  border: 1px solid #ccb087;
  color: #4f3a26;
  font-weight: 700;
}

.hat-description {
  margin: 0;
  font-size: 0.93rem;
}

.card-footer {
  margin-top: auto;
  padding-top: 0.35rem;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 1.25rem;
  border: 1px dashed #c8a67a;
  border-radius: var(--radius);
  background: #fff8ed;
  text-align: center;
}

.order-intro {
  max-width: 72ch;
  margin-bottom: 0.65rem;
}

.order-disclaimer {
  font-size: 0.88rem;
  color: #5a4635;
  max-width: 72ch;
  margin: 0 0 1.5rem 0;
}

.order-wizard {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.1fr);
  gap: 1.5rem;
  align-items: start;
}

.order-wizard-preview {
  position: sticky;
  top: 5.5rem;
}

.wizard-preview-image-wrap {
  aspect-ratio: 4 / 3;
  background: linear-gradient(145deg, #eee4d6, #d5c2aa);
  border-radius: var(--radius);
  border: 1px solid #dfc09a;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.wizard-preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wizard-preview-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 1rem;
  color: #4e3b2b;
  font-weight: 700;
}

.wizard-view-toggle {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.wizard-view-btn {
  flex: 1;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #b48b59;
  background: #f3e6d4;
  color: #3d2b1f;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.wizard-view-btn.is-active {
  background: var(--leather);
  color: var(--text-light);
}

.order-wizard-panel {
  background: var(--card-bg);
  border: 1px solid #dfc09a;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 1.2rem;
}

.wizard-progress {
  margin: 0 0 1rem 0;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #5a4635;
}

.wizard-step-title {
  font-size: 1.25rem;
  margin: 0 0 0.75rem 0;
}

.wizard-optional {
  font-size: 0.85rem;
  font-weight: 700;
  color: #5a4635;
}

.wizard-step-help {
  margin: 0 0 0.85rem 0;
  font-size: 0.92rem;
  color: #5a4635;
}

.wizard-style-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.wizard-design-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.wizard-show-more {
  margin-top: 0.75rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid #b48b59;
  background: #f3e6d4;
  color: #3d2b1f;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.wizard-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #e8d5bc;
}

.wizard-nav-btn {
  cursor: pointer;
  font-family: inherit;
}

.wizard-nav .wizard-nav-btn:last-child {
  margin-left: auto;
}

.wizard-nav-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.color-picker-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.color-picker-strip .color-swatch-card {
  width: min(110px, 28vw);
  flex-shrink: 0;
}

.order-steps {
  display: grid;
  gap: 2rem;
}

.order-step-title {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}

.picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.picker-card {
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.picker-card.is-selected {
  border-color: var(--leather);
  box-shadow: 0 0 0 2px rgba(139, 90, 43, 0.25);
}

.picker-card:focus-visible {
  outline: 2px solid var(--leather);
  outline-offset: 2px;
}

.picker-card-content {
  padding: 0.85rem;
}

.picker-card-content h3 {
  margin: 0 0 0.35rem 0;
  font-size: 1.05rem;
}

.picker-card-content p {
  margin: 0;
  font-size: 0.9rem;
}

.order-review-card {
  padding: 1.2rem;
  background: var(--card-bg);
  border: 1px solid #dfc09a;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.order-review-placeholder {
  margin: 0;
  color: #5a4635;
}

.order-review-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.35rem;
}

.color-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
}

.color-swatch-card {
  cursor: pointer;
  background: var(--card-bg);
  border: 1px solid #dfccb3;
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.color-swatch-card.is-selected {
  border-color: var(--leather);
  box-shadow: 0 0 0 2px rgba(139, 90, 43, 0.25);
}

.color-swatch-card:focus-visible {
  outline: 2px solid var(--leather);
  outline-offset: 2px;
}

.color-swatch-image-wrap {
  aspect-ratio: 1;
  background: linear-gradient(145deg, #eee4d6, #d5c2aa);
  position: relative;
}

.color-swatch-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.color-swatch-label {
  display: block;
  padding: 0.45rem 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
}

.hat-preview-images {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.hat-preview-images .hat-image-wrap {
  width: min(160px, 45%);
  flex-shrink: 0;
}

.hat-preview-caption {
  font-size: 0.78rem;
  font-weight: 700;
  margin: 0.25rem 0 0 0;
  color: #5a4635;
}

.order-review-message {
  margin: 0.85rem 0 0 0;
  padding: 0.75rem;
  border-radius: var(--radius);
  font-size: 0.92rem;
}

.order-review-message.is-info {
  background: #fff8ed;
  border: 1px dashed #c8a67a;
  color: #4a3523;
}

.order-review-message.is-warn {
  background: #f8ece0;
  border: 1px solid #d8b586;
  color: #4a3523;
}

.order-notes-label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.4rem;
  font-size: 0.92rem;
}

.order-notes {
  width: 100%;
  max-width: 520px;
  padding: 0.65rem 0.75rem;
  border: 1px solid #d8b586;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  resize: vertical;
  background: #fffdf8;
}

.order-email-btn[aria-disabled="true"] {
  opacity: 0.55;
  pointer-events: none;
  cursor: not-allowed;
}

.order-email-btn[aria-disabled="true"]:hover,
.order-email-btn[aria-disabled="true"]:focus-visible {
  transform: none;
}

.card-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.custom-orders p {
  max-width: 72ch;
}

.contact-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.2rem;
  padding: 1.2rem;
  background: #fff9ef;
  border: 1px solid #dfc09a;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.site-footer {
  background: #0e0e0e;
  color: #d6c4ab;
  padding: 1.1rem 0;
  text-align: center;
}

@media (max-width: 900px) {
  .order-wizard {
    grid-template-columns: 1fr;
  }

  .order-wizard-preview {
    position: static;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .hero-logo-wrap {
    order: -1;
    margin-bottom: 0.5rem;
  }

  .contact-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  section {
    padding: 3.2rem 0;
  }

  .logo {
    height: 46px;
  }

  .main-nav {
    gap: 0.55rem;
  }

  .main-nav a {
    font-size: 0.88rem;
  }
}
