/* Scalzo Trading Co. - component styles layered on Tailwind (CDN) */

html {
  scroll-padding-top: 5.5rem;
}

body {
  font-feature-settings: "kern", "liga";
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
  background: #2B2A26;
  color: #FAF6EE;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 1rem;
}

/* Focus states */
:focus-visible {
  outline: 3px solid #9A5518;
  outline-offset: 3px;
}
.on-dark :focus-visible {
  outline-color: #F3D9B5;
}
#main:focus {
  outline: none;
}

/* Hero wash */
.hero-wash {
  background:
    radial-gradient(60rem 30rem at 85% 10%, rgba(200, 116, 43, 0.14), transparent 60%),
    radial-gradient(50rem 30rem at 0% 100%, rgba(74, 93, 35, 0.12), transparent 60%);
}

/* Navigation */
.nav-link {
  display: inline-block;
  padding: 0.5rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #2B2A26;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.nav-link:hover {
  background: #E4EAD4;
  color: #2F3B16;
}
.mobile-link {
  display: block;
  padding: 0.8rem 1rem;
  border-radius: 0.75rem;
  font-size: 1.05rem;
  font-weight: 500;
  color: #2B2A26;
}
.mobile-link:hover {
  background: #E4EAD4;
}

/* Buttons */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn-primary {
  background: #4A5D23;
  color: #ffffff;
}
.btn-primary:hover {
  background: #3B4A1B;
}
.btn-secondary {
  border: 2px solid #2B2A26;
  color: #2B2A26;
  background: transparent;
}
.btn-secondary:hover {
  background: #2B2A26;
  color: #FAF6EE;
}

.text-link {
  color: #4A5D23;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(200, 116, 43, 0.6);
}
.text-link:hover {
  color: #2F3B16;
  text-decoration-color: #C8742B;
}

/* Section headings */
.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #9A5518;
}
.section-title {
  margin-top: 0.75rem;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #2B2A26;
}

/* Service cards */
.service-card {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(140, 133, 119, 0.22);
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(43, 42, 38, 0.04);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.service-card:hover {
  box-shadow: 0 12px 30px -12px rgba(43, 42, 38, 0.18);
  transform: translateY(-2px);
}
@media (min-width: 640px) {
  .service-card { padding: 2rem; }
}
.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 1rem;
  background: #F3F5EC;
  color: #4A5D23;
  box-shadow: inset 0 0 0 1px rgba(74, 93, 35, 0.15);
}
.card-title {
  margin-top: 1.25rem;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: #2B2A26;
}
.card-text {
  margin-top: 0.75rem;
  line-height: 1.7;
  color: #5F5A50;
}
.card-list {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px dashed rgba(140, 133, 119, 0.4);
  display: grid;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: #2B2A26;
}
.card-list li {
  position: relative;
  padding-left: 1.4rem;
}
.card-list li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.45rem;
  width: 0.55rem;
  height: 0.7rem;
  border-radius: 50% 50% 50% 50% / 65% 65% 35% 35%;
  background: #C8742B;
}

/* Product categories */
.category {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-height: 4.5rem;
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  background: #FAF6EE;
  border: 1px solid rgba(140, 133, 119, 0.2);
  font-weight: 500;
  color: #2B2A26;
}
.category-icon {
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  color: #9A5518;
}
.category-cta {
  padding: 0;
  background: #4A5D23;
  border-color: #4A5D23;
  color: #ffffff;
  font-weight: 600;
}
.category-cta a {
  padding: 1rem 1.25rem;
  color: #ffffff;
}
.category-cta a:hover {
  background: #3B4A1B;
}

/* Facts */
.fact-card {
  padding: 1.5rem;
  border-radius: 1.25rem;
  background: rgba(250, 246, 238, 0.07);
  border: 1px solid rgba(250, 246, 238, 0.16);
}
.fact-title {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: #FAF6EE;
}
.fact-text {
  margin-top: 0.5rem;
  line-height: 1.65;
  color: rgba(250, 246, 238, 0.85);
}
.timeline {
  position: relative;
  padding-left: 1.75rem;
  border-left: 2px solid rgba(224, 162, 103, 0.5);
}
.timeline li {
  position: relative;
  padding-bottom: 1.5rem;
}
.timeline li:last-child {
  padding-bottom: 0;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: calc(-1.75rem - 7px);
  top: 0.35rem;
  width: 12px;
  height: 12px;
  border-radius: 9999px;
  background: #E0A267;
  box-shadow: 0 0 0 4px #4A5D23;
}
.timeline-year {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: #E0A267;
}
.timeline-text {
  margin-top: 0.15rem;
  color: rgba(250, 246, 238, 0.88);
}

/* Form */
.form-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #2B2A26;
}
.form-input {
  display: block;
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 0.75rem;
  border: 1.5px solid rgba(95, 90, 80, 0.45);
  background: #ffffff;
  color: #2B2A26;
  font-size: 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-input:focus {
  outline: none;
  border-color: #4A5D23;
  box-shadow: 0 0 0 3px rgba(74, 93, 35, 0.25);
}
.form-input[aria-invalid="true"] {
  border-color: #B42318;
}
.form-input[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.2);
}
.form-error {
  margin-top: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #B42318;
}
.status-success {
  padding: 1rem;
  border-radius: 1rem;
  background: #F3F5EC;
  border: 1px solid rgba(74, 93, 35, 0.3);
  color: #2F3B16;
}
.status-error {
  padding: 1rem;
  border-radius: 1rem;
  background: #FEF3F2;
  border: 1px solid rgba(180, 35, 24, 0.3);
  color: #912018;
}

/* Contact block */
.contact-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-radius: 0.9rem;
  padding: 0.35rem;
  margin: -0.35rem;
  color: #FAF6EE;
  font-weight: 500;
}
.contact-row:hover {
  color: #F3D9B5;
}
.contact-icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.8rem;
  background: rgba(250, 246, 238, 0.1);
  color: #E0A267;
}

/* Footer */
.footer-link {
  color: rgba(250, 246, 238, 0.85);
  text-decoration: none;
  border-radius: 0.25rem;
}
.footer-link:hover {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Legal dialogs */
.legal-dialog {
  width: min(44rem, calc(100% - 2rem));
  max-height: min(85vh, 52rem);
  padding: 0;
  border: none;
  border-radius: 1.5rem;
  background: #FAF6EE;
  color: #2B2A26;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.legal-dialog[open] {
  display: flex;
  flex-direction: column;
  animation: dialog-in 0.2s ease-out;
}
.legal-dialog::backdrop {
  background: rgba(43, 42, 38, 0.65);
}
.legal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(140, 133, 119, 0.25);
  background: #ffffff;
}
.legal-body {
  overflow-y: auto;
  padding: 1.5rem;
  line-height: 1.7;
  color: #3F3D37;
}
.legal-body h3 {
  margin-top: 1.5rem;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: #2B2A26;
}
.legal-body p,
.legal-body ul {
  margin-top: 0.6rem;
}
.legal-body ul {
  list-style: disc;
  padding-left: 1.25rem;
}
.legal-body a {
  color: #4A5D23;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  flex: none;
  border-radius: 9999px;
  border: 1px solid rgba(140, 133, 119, 0.4);
  color: #2B2A26;
}
.close-btn:hover {
  background: #E4EAD4;
}
body.modal-open {
  overflow: hidden;
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .service-card:hover { transform: none; }
}
