/* ===== EasyFit Enterprise — shared styles ===== */

@import url('https://fonts.googleapis.com/css2?family=Zilla+Slab:wght@400;500;600;700&family=Work+Sans:wght@400;500;600&display=swap');

:root {
  --maroon: #6E1F2A;
  --maroon-dark: #4A141C;
  --charcoal: #1C1815;
  --cream: #F3E9D8;
  --beige: #D9C4A0;
  --beige-dark: #C4AC80;
  --white: #FBF8F3;
  --wood-light: #B98255;
  --wood-dark: #7A4E2C;

  --font-head: 'Zilla Slab', Georgia, serif;
  --font-body: 'Work Sans', -apple-system, sans-serif;

  --seam: 3px solid var(--charcoal);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--cream);
  line-height: 1.55;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.5em 0;
  color: var(--charcoal);
}

h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.3rem; }

p { max-width: 62ch; margin: 0 0 1.1em 0; }

a { color: var(--maroon); }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--maroon);
  outline-offset: 3px;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

/* ---- Plank seam divider: a routed groove between sections ---- */
.seam {
  height: 10px;
  background:
    linear-gradient(var(--charcoal), var(--charcoal)) center/100% 3px no-repeat,
    linear-gradient(var(--beige-dark), var(--beige-dark)) center/100% 1px no-repeat;
}

/* ---- Header / nav ---- */
.site-header {
  background: var(--charcoal);
  color: var(--cream);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 4px solid var(--maroon);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem clamp(1.25rem, 4vw, 3rem);
  max-width: 1120px;
  margin: 0 auto;
}

.brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--white);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.brand span { color: var(--wood-light); }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--cream);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.98rem;
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  border-bottom-color: var(--wood-light);
  color: var(--white);
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--cream);
  color: var(--cream);
  padding: 0.4rem 0.7rem;
  font-size: 1.1rem;
  border-radius: 2px;
  cursor: pointer;
}

@media (max-width: 780px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--charcoal);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0 1rem;
    border-bottom: 4px solid var(--maroon);
  }
  .nav-links.open { display: flex; }
  .nav-links li { padding: 0.6rem clamp(1.25rem, 4vw, 3rem); }
}

/* ---- Mitered corner motif: a 45deg cut used on panels/section edges ---- */
.miter {
  position: relative;
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%);
}

.miter-flip {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 28px 100%, 0 calc(100% - 28px));
}

/* ---- Hero ---- */
.hero {
  background: var(--charcoal);
  color: var(--cream);
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4rem);
  position: relative;
  overflow: hidden;
}

.hero-grain {
  position: absolute;
  inset: 0;
  opacity: 0.14;
  background-image: repeating-linear-gradient(
    100deg,
    var(--wood-light) 0px,
    var(--wood-light) 2px,
    transparent 2px,
    transparent 34px
  ),
  repeating-linear-gradient(
    100deg,
    var(--wood-dark) 0px,
    var(--wood-dark) 1px,
    transparent 1px,
    transparent 12px
  );
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2.5rem;
  align-items: end;
}

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.hero h1 { color: var(--white); }

.hero-lede {
  font-size: 1.15rem;
  color: var(--beige);
  max-width: 46ch;
}

.hero-planks {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero-planks .plank {
  height: 30px;
  border-radius: 1px;
}

.hero-planks .plank:nth-child(1) { background: var(--wood-light); width: 100%; }
.hero-planks .plank:nth-child(2) { background: var(--wood-dark); width: 88%; }
.hero-planks .plank:nth-child(3) { background: var(--maroon); width: 96%; }
.hero-planks .plank:nth-child(4) { background: var(--beige-dark); width: 78%; }
.hero-planks .plank:nth-child(5) { background: var(--wood-light); width: 92%; }

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  text-decoration: none;
  padding: 0.85rem 1.7rem;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--maroon);
  color: var(--white);
}
.btn-primary:hover { background: var(--maroon-dark); }

.btn-outline {
  background: transparent;
  border-color: var(--cream);
  color: var(--cream);
}
.btn-outline:hover { background: var(--cream); color: var(--charcoal); }

.btn-outline-dark {
  background: transparent;
  border-color: var(--charcoal);
  color: var(--charcoal);
}
.btn-outline-dark:hover { background: var(--charcoal); color: var(--cream); }

/* ---- Sections ---- */
.section {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}

.section-beige { background: var(--beige); }
.section-white { background: var(--white); }
.section-charcoal { background: var(--charcoal); color: var(--cream); }
.section-charcoal h2, .section-charcoal h3 { color: var(--white); }

.eyebrow-note {
  font-size: 0.95rem;
  color: var(--maroon);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

/* ---- Two-board split (services overview) ---- */
.board-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 3px solid var(--charcoal);
}

@media (max-width: 780px) {
  .board-split { grid-template-columns: 1fr; }
}

.board {
  background: var(--white);
  padding: 2.2rem;
}

.board:first-child {
  border-right: 3px solid var(--charcoal);
}

@media (max-width: 780px) {
  .board:first-child {
    border-right: none;
    border-bottom: 3px solid var(--charcoal);
  }
}

.board h3 { color: var(--maroon); }

/* ---- Process steps (legitimate sequence) ---- */
.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

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

.process-step {
  border-left: 4px solid var(--maroon);
  padding-left: 1rem;
}

.process-step .step-num {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  color: var(--beige-dark);
  display: block;
  line-height: 1;
  margin-bottom: 0.3rem;
}

/* ---- Gallery ---- */
.swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
}

.swatch-card {
  background: var(--white);
  border: 2px solid var(--charcoal);
}

.swatch-visual {
  height: 160px;
  position: relative;
  overflow: hidden;
  border-bottom: 2px solid var(--charcoal);
}

.swatch-visual .plank-row {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}

.swatch-visual .plank-row div {
  flex: 1;
  border-bottom: 2px solid rgba(28,24,21,0.25);
}

.swatch-card .caption {
  padding: 1rem 1.2rem;
}

.swatch-card .caption h3 { margin-bottom: 0.2rem; font-size: 1.1rem; }
.swatch-card .caption p { margin: 0; font-size: 0.92rem; color: var(--maroon-dark); }

/* ---- Contact ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.contact-detail {
  margin-bottom: 1.3rem;
}

.contact-detail .label {
  font-weight: 600;
  color: var(--maroon);
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
}

.contact-detail .value {
  font-size: 1.05rem;
}

.placeholder-note {
  font-size: 0.85rem;
  color: var(--maroon-dark);
  font-style: italic;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

form label {
  font-weight: 600;
  font-size: 0.92rem;
}

form input, form textarea, form select {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.7rem 0.8rem;
  border: 2px solid var(--charcoal);
  background: var(--white);
  color: var(--charcoal);
  width: 100%;
}

form textarea { resize: vertical; min-height: 120px; }

/* ---- Footer ---- */
.site-footer {
  background: var(--charcoal);
  color: var(--beige);
  padding: 2.5rem 0;
  font-size: 0.92rem;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-grid a { color: var(--cream); }

.about-hero-figure {
  border: 3px solid var(--charcoal);
  background: var(--beige);
  padding: 1.6rem;
}

.joint-diagram {
  width: 100%;
  height: auto;
}
