/* ============ TFN Enterprises — design system ============ */
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/barlow-condensed-v13-latin-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/barlow-condensed-v13-latin-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-v20-latin-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-v20-latin-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-v20-latin-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --ink: #1b1813;          /* warm charcoal — dominant */
  --ink-2: #262119;
  --ink-3: #353026;
  --tan: #b08d57;          /* saddle leather — accent */
  --tan-deep: #8c6d3f;
  --bone: #f4efe6;         /* light sections */
  --bone-2: #eae2d2;
  --text-on-dark: #e9e2d4;
  --text-mute-dark: #a89e8c;
  --text-on-light: #2a251e;
  --text-mute-light: #6f6657;
  --stitch: 2px dashed rgba(176, 141, 87, 0.55);
  --radius: 10px;
  --shadow: 0 10px 30px rgba(10, 8, 5, 0.35);
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;
  --wrap: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-body); font-size: 16px; line-height: 1.65; color: var(--text-on-dark); background: var(--ink); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--tan); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.04em; line-height: 1.08; margin: 0 0 0.4em; }
h1 { font-size: clamp(2.6rem, 6.5vw, 4.6rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; letter-spacing: 0.08em; }
.eyebrow { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.22em; font-size: 0.85rem; color: var(--tan); margin-bottom: 14px; }
.lead { font-size: 1.13rem; color: var(--text-mute-dark); max-width: 56ch; }
section { padding: 96px 0; }
.section-light { background: var(--bone); color: var(--text-on-light); }
.section-light .lead { color: var(--text-mute-light); }
.section-light .eyebrow { color: var(--tan-deep); }
.section-light .eyebrow, .section-light .text-link, .contact-direct a { color: #77592e; }

/* fabric grain on dark sections — one subtle texture touch */
.grain { position: relative; }
.grain::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.05;
  background-image: repeating-linear-gradient(45deg, transparent 0 2px, rgba(244, 239, 230, 0.7) 2px 3px); }

/* stitch divider */
.stitch-rule { border: 0; border-top: var(--stitch); max-width: 220px; margin: 26px 0; }

/* buttons */
.btn { display: inline-block; font-family: var(--font-display); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.12em; font-size: 1.02rem; padding: 15px 30px; border-radius: 6px; text-decoration: none;
  border: 2px solid var(--tan); cursor: pointer; transition: transform 0.15s ease, background 0.15s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-solid { background: var(--tan); color: var(--ink); }
.btn-solid:hover { background: #c29d63; }
.btn-ghost { background: transparent; color: var(--tan); }
.btn-ghost:hover { background: rgba(176, 141, 87, 0.12); }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--tan); outline-offset: 2px; }

/* leather-patch stat card */
.patch { background: linear-gradient(160deg, #b3905a, #a18254); color: #241c10; border-radius: var(--radius);
  padding: 22px 18px; text-align: center; box-shadow: inset 0 2px 6px rgba(255, 240, 210, 0.35), inset 0 -3px 8px rgba(30, 20, 5, 0.35);
  border: 2px solid rgba(36, 28, 16, 0.35); }
.patch .num { font-family: var(--font-display); font-weight: 700; font-size: 2.3rem; line-height: 1; display: block; }
.patch .label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 600; }

/* cards */
.card { background: var(--ink-2); border: 1px solid var(--ink-3); border-radius: var(--radius); overflow: hidden; }
.section-light .card { background: #fffdf8; border-color: var(--bone-2); }

/* forms */
.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 6px; }
input, textarea, select { width: 100%; font: inherit; padding: 12px 14px; border-radius: 6px;
  border: 1.5px solid var(--ink-3); background: var(--ink-2); color: var(--text-on-dark); }
.section-light input, .section-light textarea, .section-light select { background: #fff; border-color: var(--bone-2); color: var(--text-on-light); }
.form-note { font-size: 0.9rem; color: var(--text-mute-dark); }
.section-light .form-note { color: var(--text-mute-light); }
.form-status { margin-top: 14px; border-radius: 6px; min-height: 1px; }
.form-status.ok, .form-status.err { padding: 12px 16px; border-width: 1px; border-style: solid; }
.form-status.ok { background: rgba(86, 130, 70, 0.18); border-color: #6f9c5c; color: #cfe3c4; }
.form-status.err { background: rgba(150, 60, 50, 0.18); border-color: #b06a5e; color: #ecccc5; }
.section-light .form-status.ok { background: #e4eedd; border-color: #4c7a3d; color: #24431a; }
.section-light .form-status.err { background: #f6e2dd; border-color: #a14a3c; color: #6e2417; }
#contact-form { position: relative; }
.hp-field { position: absolute; left: -5000px; opacity: 0; pointer-events: none; }

/* skip link */
.skip-link { position: absolute; left: -9999px; top: 16px; z-index: 100; background: var(--tan); color: var(--ink); padding: 10px 18px; border-radius: 6px; font-weight: 600; text-decoration: none; }
.skip-link:focus { left: 16px; }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover { transform: none; }
}

/* ============ header / nav ============ */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(27, 24, 19, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--ink-3); }
#programs, #series, #why, #contact, #paths { scroll-margin-top: 100px; }
@media (max-width: 960px) { #programs, #series, #why, #contact, #paths { scroll-margin-top: 150px; } }
.nav-row { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; column-gap: 16px; }
.nav-row nav { display: flex; align-items: center; gap: 26px; }
.nav-row nav a:not(.btn) { color: var(--text-on-dark); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.nav-row nav a:not(.btn):hover { color: var(--tan); }
.btn-nav { padding: 10px 18px; font-size: 0.9rem; }

/* ============ hero ============ */
.hero { padding: 110px 0 90px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 30px; }
.hero-photo img { border-radius: var(--radius); box-shadow: var(--shadow); }

/* ============ stats ============ */
.stats { padding: 0 0 90px; }
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }

/* ============ paths ============ */
.paths-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 36px; }
.path-card { padding: 34px 30px; }
.text-link { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; text-decoration: none; }

/* ============ steps ============ */
.steps-grid { list-style: none; margin: 44px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 26px; }
.step-num { font-family: var(--font-display); font-weight: 700; font-size: 2.6rem; color: var(--tan); display: block; line-height: 1; margin-bottom: 10px; }
.steps-grid p { color: var(--text-mute-dark); font-size: 0.95rem; }

/* ============ series ============ */
.series-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; margin-top: 36px; max-width: 920px; }
.series-card { margin: 0; }
.series-card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.series-card figcaption { padding: 20px 22px 24px; }
.series-card p { margin: 0; color: var(--text-mute-light); font-size: 0.95rem; }

/* ============ why ============ */
.why-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.why-photos { display: grid; gap: 20px; }
.why-photos img { border-radius: var(--radius); box-shadow: var(--shadow); }
.why-copy strong { color: var(--tan); }

/* ============ contact ============ */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; }
.contact-direct { font-size: 1.15rem; line-height: 2; font-weight: 500; }
.contact-direct a { text-decoration: none; }

/* ============ footer ============ */
.site-footer { background: #14110d; padding: 44px 0; border-top: 1px solid var(--ink-3); }
.footer-row { display: flex; gap: 28px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.footer-row p { color: var(--text-mute-dark); font-size: 0.9rem; }
.footer-row a { color: var(--text-mute-dark); }

/* ============ responsive ============ */
@media (max-width: 960px) {
  .hero-grid, .why-grid, .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .series-grid { grid-template-columns: repeat(2, 1fr); }
  .paths-grid { grid-template-columns: 1fr; }
  .nav-row { flex-wrap: wrap; row-gap: 8px; }
  .nav-row nav { gap: 16px; flex-wrap: wrap; row-gap: 8px; }
  .nav-row nav a:not(.btn) { font-size: 0.88rem; }
}
@media (max-width: 960px) { .steps-grid > li:last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (max-width: 560px) {
  section { padding: 64px 0; }
  .hero { padding: 72px 0 60px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid, .series-grid { grid-template-columns: 1fr; }
  .stats-grid > .patch:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .stage-actions { flex-direction: column; }
  .stage-actions .btn { width: 100%; text-align: center; }
}

/* ============ customizer ============ */
.customizer-intro { padding: 90px 0 36px; }
.customizer-app { padding: 0 0 80px; }
.customizer-grid { display: grid; grid-template-columns: 380px 1fr; gap: 44px; align-items: start; }
.ctl-group { border: 1px solid var(--ink-3); border-radius: var(--radius); padding: 20px; margin: 0 0 20px; }
.ctl-group legend { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; padding: 0 8px; }
.step-tag { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--tan); color: var(--ink); font-weight: 700; margin-right: 6px; }
.style-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.style-btn { border: 2px solid var(--ink-3); border-radius: 8px; background: var(--ink-2); color: var(--text-on-dark); padding: 8px; cursor: pointer; font: inherit; font-size: 0.85rem; }
.style-btn img { aspect-ratio: 1; object-fit: cover; border-radius: 5px; margin-bottom: 6px; width: 100%; }
.style-btn[aria-pressed="true"] { border-color: var(--tan); background: rgba(176, 141, 87, 0.12); }
.swatch-row { display: flex; gap: 12px; flex-wrap: wrap; }
.swatch { width: 42px; height: 42px; border-radius: 50%; border: 3px solid var(--ink-3); cursor: pointer; box-shadow: inset 0 0 0 2px rgba(244, 239, 230, 0.38); }
.swatch[aria-checked="true"] { border-color: var(--tan); box-shadow: inset 0 0 0 2px rgba(244, 239, 230, 0.38), 0 0 0 3px rgba(176, 141, 87, 0.35); }
.dropzone { display: grid; place-items: center; text-align: center; min-height: 110px; border: var(--stitch); border-radius: var(--radius); cursor: pointer; padding: 18px; color: var(--text-mute-dark); }
.dropzone.dragover { background: rgba(176, 141, 87, 0.1); }
.customizer-stage { position: sticky; top: 90px; }
#hat-canvas { width: 100%; height: auto; max-height: 72vh; width: auto; max-width: 100%; margin: 0 auto; display: block; background: #f6f4f0; border-radius: var(--radius); box-shadow: var(--shadow); cursor: grab; touch-action: none; }
#hat-canvas:active { cursor: grabbing; }
.stage-actions { display: flex; gap: 14px; margin-top: 18px; justify-content: flex-end; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.quote-section { padding: 80px 0; }
.quote-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; }
.quote-preview { border-radius: var(--radius); box-shadow: var(--shadow); margin-top: 20px; max-width: 360px; }
#quote-form { position: relative; }
input[type="range"] { padding: 0; accent-color: var(--tan); }
input[type="range"]:disabled { opacity: 0.45; cursor: not-allowed; }
kbd { background: var(--ink-3); border-radius: 4px; padding: 1px 6px; font-size: 0.85em; }
@media (max-width: 960px) {
  .customizer-grid, .quote-grid { grid-template-columns: 1fr; }
  .customizer-stage { position: static; order: -1; }
}

/* ============ embroidery fonts (customizer text tool only) ============ */
@font-face { font-family: "Graduate"; src: url("../fonts/graduate-v19-latin-regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Archivo Black"; src: url("../fonts/archivo-black-v23-latin-regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Pacifico"; src: url("../fonts/pacifico-v23-latin-regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Rye"; src: url("../fonts/rye-v17-latin-regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Oswald"; src: url("../fonts/oswald-v57-latin-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Roboto Slab"; src: url("../fonts/roboto-slab-v36-latin-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

/* ============ customizer text tool ============ */
.arch-toggle { display: flex; align-items: center; gap: 10px; }
.arch-toggle input { width: auto; }
.arch-toggle span { margin: 0; text-transform: uppercase; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.1em; }
#font-select option { font-size: 1.05rem; }
