/*
Theme Name: Buhler Quality Yarns
Theme URI: https://buhleryarn.com
Author: Built for Buhler Quality Yarns Corp.
Description: Flame resistant and technical yarn site. Market photos are edited in the
  WordPress dashboard. Everything else lives in the page templates.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: Proprietary
Text Domain: buhler
*/

/* Buhler Quality Yarns, 2026 redesign.
   Palette: mill red, linen, ink, brass. Southern textile heritage, technical delivery. */

:root {
  --ink: #16120F;
  --ink-soft: #3B322B;
  --ink-mute: #6B5F55;
  --linen: #FAF6EF;
  --linen-2: #F1EADE;
  --paper: #FFFFFF;
  --red: #ED1C24;        /* sampled from logo-b.png, the actual mark */
  --red-deep: #B91619;   /* same hue, darkened, for small text on light grounds */
  --red-dark: #C41117;   /* button hover */
  --brass: #A8834A;
  --line: rgba(22, 18, 15, 0.13);
  --line-strong: rgba(22, 18, 15, 0.28);
  --shadow: 0 1px 2px rgba(22,18,15,.05), 0 12px 32px -18px rgba(22,18,15,.35);
  --serif: "Libre Baskerville", "Iowan Old Style", Baskerville, Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --wrap: 1180px;
  --pad: clamp(20px, 5vw, 56px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--linen);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }

/* ---------- type ---------- */

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.12; margin: 0; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: clamp(33px, 5.2vw, 62px); line-height: 1.14; }
h2 { font-size: clamp(25px, 3.2vw, 39px); line-height: 1.2; }
h3 { font-size: clamp(18px, 1.7vw, 22px); line-height: 1.28; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--red-deep);
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--line); max-width: 90px; }
.eyebrow.center { justify-content: center; }
.eyebrow.center::before { content: ""; flex: 1; height: 1px; background: var(--line); max-width: 90px; }

.lede { font-size: clamp(18px, 2vw, 21px); line-height: 1.6; color: var(--ink-soft); }
.mute { color: var(--ink-mute); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 28px;
  font-size: 14px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-ghost { border-color: rgba(255,255,255,.45); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.btn-outline { border-color: var(--line-strong); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--linen); border-color: var(--ink); }

/* ---------- header ---------- */

.topbar {
  background: var(--ink); color: rgba(250,246,239,.72);
  font-size: 12.5px; letter-spacing: .03em;
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 40px; flex-wrap: wrap; }
.topbar .locs { display: flex; gap: 22px; }
.topbar .locs span { display: inline-flex; align-items: center; gap: 7px; }
.topbar .locs span::before { content: ""; width: 6px; height: 6px; background: var(--brass); }
.topbar a { color: rgba(250,246,239,.85); text-decoration: none; }
.topbar a:hover { color: #fff; }
.topbar .right { display: flex; gap: 20px; }

.masthead { background: var(--linen); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 60; }
.masthead .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 88px; }

.brand { display: flex; align-items: center; gap: 15px; text-decoration: none; }
.brand .mark { height: 48px; width: auto; flex: none; }
.brand .name { display: block; font-family: var(--serif); font-size: 18px; font-weight: 700; line-height: 1.05; white-space: nowrap; }
.brand .sub { display: block; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-mute); margin-top: 3px; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  text-decoration: none; font-size: 13px; font-weight: 500; letter-spacing: .04em; white-space: nowrap;
  text-transform: uppercase; padding: 10px 12px; color: var(--ink-soft);
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--ink); }
.nav a.active { color: var(--ink); border-bottom-color: var(--red); }
.nav .btn { margin-left: 14px; padding: 12px 18px; font-size: 12.5px; white-space: nowrap; }

.navtoggle { display: none; background: none; border: 1px solid var(--line-strong); padding: 10px 14px; font: inherit; font-size: 13px; cursor: pointer; }

/* ---------- hero ---------- */

.hero { position: relative; background: var(--ink); color: var(--linen); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    repeating-linear-gradient(58deg, rgba(255,255,255,.05) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(-58deg, rgba(255,255,255,.035) 0 1px, transparent 1px 9px),
    radial-gradient(120% 90% at 78% 20%, rgba(237,28,36,.34) 0%, transparent 60%),
    linear-gradient(160deg, #241C17 0%, #16120F 55%, #0E0B09 100%);
}
.hero .wrap { position: relative; padding-top: clamp(70px, 11vw, 132px); padding-bottom: clamp(70px, 11vw, 132px); }
.hero-inner { max-width: 780px; }
.hero .eyebrow { color: var(--brass); }
.hero .eyebrow::after, .hero .eyebrow::before { background: rgba(250,246,239,.25); }
.hero h1 { color: #fff; max-width: 15ch; }
.hero .lede { color: rgba(250,246,239,.78); margin-top: 24px; max-width: 640px; }
.hero-cta { display: flex; gap: 14px; margin-top: 38px; flex-wrap: wrap; }

.hero-strip { position: relative; border-top: 1px solid rgba(250,246,239,.14); }
.hero-strip .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; padding: 0; max-width: none; }
.hero-strip .cell { padding: 30px var(--pad); border-right: 1px solid rgba(250,246,239,.14); }
.hero-strip .cell:last-child { border-right: 0; }
.hero-strip h3 { font-size: 17px; color: #fff; margin-bottom: 8px; }
.hero-strip p { font-size: 14.5px; color: rgba(250,246,239,.62); line-height: 1.55; }

/* ---------- sections ---------- */

section { padding: clamp(64px, 8vw, 110px) 0; }
section.tight { padding: clamp(48px, 6vw, 76px) 0; }
.bg-paper { background: var(--paper); }
.bg-linen2 { background: var(--linen-2); }
.bg-ink { background: var(--ink); color: var(--linen); }
.bg-ink h2, .bg-ink h3 { color: #fff; }
.bg-ink .lede, .bg-ink p { color: rgba(250,246,239,.75); }
.bg-ink .eyebrow { color: var(--brass); }
.bg-ink .eyebrow::after, .bg-ink .eyebrow::before { background: rgba(250,246,239,.22); }

.sec-head { max-width: 720px; margin-bottom: clamp(36px, 4vw, 56px); }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.sec-head h2 + p { margin-top: 18px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.two-col.narrow-right { grid-template-columns: 1.25fr 1fr; }

/* ---------- product cards ---------- */

.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.card { background: var(--paper); padding: clamp(28px, 3.4vw, 44px); display: flex; flex-direction: column; }
.card .weave { height: 88px; margin-bottom: 26px; border: 1px solid var(--line); }
.card h3 { margin-bottom: 10px; }
.card .lede { font-size: 17px; margin-bottom: 14px; color: var(--red-deep); font-weight: 500; }
.card p { font-size: 15.5px; color: var(--ink-soft); line-height: 1.6; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.tag { font-size: 11px; letter-spacing: .09em; text-transform: uppercase; font-weight: 600; color: var(--ink-mute); border: 1px solid var(--line); padding: 6px 11px; }

/* woven swatches, drawn in CSS so no photography is needed for the comp */
.weave-1 { background: repeating-linear-gradient(45deg, #ED1C24 0 6px, #C41117 6px 12px), var(--red); }
.weave-2 { background: repeating-linear-gradient(90deg, #E4DCCB 0 4px, #CFC3AB 4px 8px); }
.weave-3 { background: repeating-linear-gradient(45deg, #FFD400 0 6px, #E8B500 6px 12px); }
.weave-4 { background: repeating-linear-gradient(45deg, #ED1C24 0 5px, #2C2620 5px 10px, #A8834A 10px 15px); }

/* ---------- capability list ---------- */

.caps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cap { background: var(--linen); padding: clamp(26px, 3vw, 38px); }
.bg-paper .cap { background: var(--paper); }
.cap-rule { display: block; width: 34px; height: 2px; background: var(--red); margin-bottom: 18px; }
.cap h3 { font-size: 18px; margin-bottom: 10px; min-height: 2lh; }
.cap p { font-size: 15px; color: var(--ink-soft); line-height: 1.6; }

/* ---------- heritage band ---------- */

.band { position: relative; background: var(--ink); color: var(--linen); overflow: hidden; }
.band img { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 138%; object-fit: cover; object-position: center top; opacity: .28; filter: grayscale(.6) contrast(1.08) blur(1px); }
.band .wrap { position: relative; padding-top: clamp(66px, 8vw, 108px); padding-bottom: clamp(66px, 8vw, 108px); }
.band .inner { max-width: 640px; }
.band h2 { color: #fff; }
.band p { color: rgba(250,246,239,.82); margin-top: 18px; }

/* ---------- footprint ---------- */

.footprint { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.fp { background: var(--paper); padding: clamp(28px, 3.4vw, 44px); }
.fp .flagline { font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--red-deep); font-weight: 600; margin-bottom: 12px; }
.fp h3 { margin-bottom: 10px; }
.fp p { font-size: 15.5px; color: var(--ink-soft); }



/* ---------- news ---------- */

.news { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 2.5vw, 34px); }
.post { background: var(--paper); border: 1px solid var(--line); padding: clamp(26px, 3vw, 36px); }
.post .date { font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--red-deep); font-weight: 600; margin-bottom: 14px; }
.post h3 { font-size: 20px; margin-bottom: 12px; }
.post p { font-size: 15px; color: var(--ink-soft); }

/* ---------- contact ---------- */

.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(32px, 5vw, 68px); align-items: start; }
.info-block { border-top: 1px solid var(--line-strong); padding-top: 20px; margin-bottom: 32px; }
.info-block .k { font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--red-deep); font-weight: 600; margin-bottom: 10px; }
.info-block .v { font-size: 17px; line-height: 1.6; }
.info-block a { text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.info-block a:hover { color: var(--red-deep); border-bottom-color: var(--red-deep); }

form { background: var(--paper); border: 1px solid var(--line); padding: clamp(26px, 3.4vw, 44px); }
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 14px; font: inherit; font-size: 15.5px;
  border: 1px solid var(--line-strong); background: var(--linen); color: var(--ink); border-radius: 0;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--red); outline-offset: -2px; background: #fff; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.checks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.check { display: flex; align-items: center; gap: 9px; font-size: 15px; color: var(--ink-soft); }
.check input { width: auto; }
.formnote { font-size: 13px; color: var(--ink-mute); margin-top: 16px; }

/* ---------- cta band ---------- */

.cta { background: var(--red); color: #fff; }
.cta .wrap { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding-top: 56px; padding-bottom: 56px; flex-wrap: wrap; }
.cta h2 { color: #fff; max-width: 640px; }
.cta .btn { background: #fff; color: var(--red); }
.cta .btn:hover { background: var(--ink); color: #fff; }

/* ---------- footer ---------- */

footer { background: var(--ink); color: rgba(250,246,239,.65); font-size: 15px; }
footer .wrap { padding-top: 64px; padding-bottom: 32px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 44px; border-bottom: 1px solid rgba(250,246,239,.14); }
.foot-grid h4 { font-family: var(--sans); font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--brass); margin-bottom: 18px; font-weight: 600; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: 10px; }
.foot-grid a { text-decoration: none; }
.foot-grid a:hover { color: #fff; }
.foot-brand .name { font-family: var(--serif); font-size: 19px; color: #fff; margin-bottom: 12px; }
.foot-brand p { font-size: 14.5px; max-width: 330px; line-height: 1.6; }
.foot-brand { display: flex; flex-direction: column; align-items: flex-start; }
.foot-bottom { display: flex; justify-content: space-between; gap: 20px; padding-top: 24px; font-size: 13px; color: rgba(250,246,239,.45); flex-wrap: wrap; }

/* ---------- page hero (interior) ---------- */

.pagehead { background: var(--ink); color: var(--linen); position: relative; overflow: hidden; }
.pagehead::before {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(58deg, rgba(255,255,255,.045) 0 1px, transparent 1px 8px),
              linear-gradient(120deg, #241C17 0%, #16120F 70%);
}
.pagehead .wrap { position: relative; padding-top: clamp(52px, 7vw, 92px); padding-bottom: clamp(52px, 7vw, 92px); }
.pagehead h1 { color: #fff; font-size: clamp(28px, 4vw, 48px); max-width: 780px; }
.pagehead .lede { color: rgba(250,246,239,.75); margin-top: 20px; max-width: 660px; }
.pagehead .eyebrow { color: var(--brass); }
.pagehead .eyebrow::after { background: rgba(250,246,239,.25); }

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .nav { display: none; }
  .nav.open { display: flex; position: absolute; top: 100%; left: 0; right: 0; background: var(--linen); flex-direction: column; align-items: stretch; padding: 12px var(--pad) 22px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav.open a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav.open a.active { border-bottom-color: var(--red); }
  .nav .btn { margin: 14px 0 0; justify-content: center; }
  .navtoggle { display: block; }
  .masthead .wrap { position: relative; }
  .two-col, .two-col.narrow-right, .contact-grid { grid-template-columns: 1fr; }
  .caps, .markets, .news { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .hero-strip .wrap { grid-template-columns: 1fr; }
  .hero-strip .cell { border-right: 0; border-bottom: 1px solid rgba(250,246,239,.14); }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .cards, .caps, .markets, .news, .footprint, .row2, .checks { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .topbar .locs { gap: 14px; }
  .topbar .wrap { justify-content: center; text-align: center; }
  .brand .name { font-size: 18px; }
  .cta .wrap { flex-direction: column; align-items: flex-start; }
}


/* ---------- fiber technologies, expandable ---------- */

.fibers { display: grid; grid-template-columns: 1fr; gap: 0; background: var(--paper); border: 1px solid var(--line); }
.fb { border-bottom: 1px solid var(--line); }
.fb:last-child { border-bottom: 0; }
.fb-head {
  width: 100%; display: grid; grid-template-columns: 150px 1fr 28px; align-items: center; gap: 20px;
  background: none; border: 0; text-align: left; cursor: pointer;
  padding: 26px clamp(20px, 3vw, 34px); font: inherit; color: inherit;
  transition: background .16s ease;
}
.fb-head:hover { background: var(--linen); }
.fb-head:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }
.fb-n { font-family: var(--serif); font-size: 21px; font-weight: 700; }
.fb-line { font-size: 15px; color: var(--ink-mute); }
.fb-sign { position: relative; width: 15px; height: 15px; justify-self: end; }
.fb-sign::before, .fb-sign::after {
  content: ""; position: absolute; background: var(--red); transition: transform .2s ease, opacity .2s ease;
}
.fb-sign::before { left: 0; right: 0; top: 7px; height: 1.5px; }
.fb-sign::after { top: 0; bottom: 0; left: 7px; width: 1.5px; }
.fb.open .fb-sign::after { transform: scaleY(0); opacity: 0; }
.fb.open .fb-head { background: var(--linen); }
.fb-body { padding: 0 clamp(20px, 3vw, 34px) 30px; background: var(--linen); }
.fb-body p { max-width: 68ch; font-size: 16px; color: var(--ink-soft); line-height: 1.68; }
.fb-body[hidden] { display: none; }
.fibers-hint { margin-top: 16px; font-size: 13.5px; color: var(--ink-mute); text-align: center; }

/* ---------- markets with photography ---------- */

.markets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.mk { background: var(--paper); border-top: 0; display: flex; flex-direction: column; }
.mk:hover { border-top-color: transparent; }
.mk-photo { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--ink); }
.mk-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.mk:hover .mk-photo img { transform: scale(1.04); }
.mk-text { padding: clamp(22px, 2.6vw, 32px); border-top: 3px solid var(--red); }
.mk-text h3 { font-size: 19px; margin-bottom: 10px; }
.mk-text p { font-size: 15px; color: var(--ink-soft); line-height: 1.6; }

/* ---------- end use strip ---------- */

.enduse { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(250,246,239,.16); border: 1px solid rgba(250,246,239,.16); }
.eu { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; text-decoration: none; background: #0E0B09; }
.eu img { width: 100%; height: 100%; object-fit: cover; opacity: .74; transition: opacity .35s ease, transform .5s ease; }
.eu:hover img { opacity: 1; transform: scale(1.05); }
.eu-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 20px 18px; color: #fff;
  font-size: 13px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase;
  background: linear-gradient(to top, rgba(14,11,9,.92), rgba(14,11,9,0));
}
.eu:focus-visible { outline: 2px solid var(--brass); outline-offset: -2px; }

/* ---------- footer hangtag ---------- */

.foot-brand .foot-tag { width: 196px; height: auto; margin-bottom: 22px; padding: 12px 14px; background: var(--linen); border-radius: 2px; }

@media (max-width: 1000px) {
  .enduse { grid-template-columns: repeat(2, 1fr); }
  .fb-head { grid-template-columns: 1fr 24px; }
  .fb-line { grid-column: 1 / 2; }
}

@media (max-width: 640px) {
  .enduse { grid-template-columns: repeat(2, 1fr); }
  .brand .mark { height: 38px; }
}

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


/* ---------- skip link ---------- */

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: 14px 22px;
  font-size: 14px; font-weight: 600; text-decoration: none;
}
.skip:focus { left: 0; }


/* ---------- keyboard focus, everywhere ---------- */

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}
.hero a:focus-visible, .bg-ink a:focus-visible, footer a:focus-visible, .topbar a:focus-visible {
  outline-color: var(--brass);
}

/* ---------- form polish ---------- */

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%),
                    linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%);
  background-position: calc(100% - 19px) calc(50% + 1px), calc(100% - 13px) calc(50% + 1px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 40px;
}
.field select:invalid { color: var(--ink-mute); }

/* ---------- contact column ---------- */

@media (min-width: 1001px) {
  .contact-info { position: sticky; top: 116px; }
}

/* ---------- responsive, last word ----------
   These come last on purpose. Media queries do not beat later rules on specificity,
   they only win by order, so every breakpoint override lives here at the bottom. */

@media (max-width: 1000px) {
  .caps, .markets, .news { grid-template-columns: repeat(2, 1fr); }
  .enduse { grid-template-columns: repeat(2, 1fr); }
  .two-col, .two-col.narrow-right, .contact-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .contact-info { position: static; }
}

@media (max-width: 700px) {
  .cards, .caps, .markets, .news, .footprint, .row2, .checks { grid-template-columns: 1fr; }
  .enduse { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr; }
  .cap h3 { min-height: 0; }
  .mk-photo { aspect-ratio: 16 / 9; }
}


/* ---------- product teaser, home page only ---------- */

.teasers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.pt {
  background: var(--paper); padding: clamp(24px, 2.6vw, 34px); text-decoration: none;
  display: flex; flex-direction: column; transition: background .18s ease;
}
.pt:hover { background: var(--linen); }
.pt .weave { display: block; height: 64px; margin-bottom: 22px; border: 1px solid var(--line); }
.pt-name { font-family: var(--serif); font-size: 19px; font-weight: 700; line-height: 1.25; margin-bottom: 10px; }
.pt-lede { font-size: 15px; color: var(--ink-soft); line-height: 1.55; }

@media (max-width: 1000px) { .teasers { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px)  { .teasers { grid-template-columns: 1fr; } }

/* ---------- WordPress editor output ----------
   Whatever gets typed into the post editor lands inside .entry or .mk-text, so
   those need styles for headings, lists, quotes, and images. Without this the
   news posts come out unstyled. */

.post h3 a { text-decoration: none; }
.post h3 a:hover { color: var(--red-deep); }

.entry { max-width: 70ch; }
.entry > * + * { margin-top: 1.1em; }
.entry h2 { font-size: clamp(23px, 2.6vw, 31px); margin-top: 1.6em; }
.entry h3 { font-size: 21px; margin-top: 1.5em; }
.entry p, .entry li { font-size: 17px; line-height: 1.7; color: var(--ink-soft); }
.entry ul, .entry ol { padding-left: 1.3em; }
.entry li + li { margin-top: .5em; }
.entry a { color: var(--red-deep); text-decoration: underline; text-underline-offset: 2px; }
.entry blockquote {
  margin: 1.6em 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--red);
  font-family: var(--serif); font-size: 20px; line-height: 1.5;
}
.entry img, .entry-photo img { width: 100%; height: auto; }
.entry-photo { margin: 0 0 2em; }
.entry figcaption, .entry .wp-caption-text {
  font-size: 13.5px; color: var(--ink-mute); margin-top: 10px;
}
.entry table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.entry table th, .entry table td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.entry .wp-block-image { margin: 1.8em 0; }
.entry-content-wide { overflow-x: auto; }

.mk-text p { font-size: 15px; color: var(--ink-soft); line-height: 1.6; }
.mk-text p + p { margin-top: .8em; }

/* pagination on the news archive */
.pagination, .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.nav-links .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; height: 42px; padding: 0 12px; border: 1px solid var(--line-strong);
  text-decoration: none; font-size: 14px; font-weight: 600;
}
.nav-links .page-numbers.current, .nav-links .page-numbers:hover { background: var(--ink); color: var(--linen); border-color: var(--ink); }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- contact form result messages ---------- */

.formmsg { padding: 20px 22px; margin-bottom: 26px; border-left: 3px solid var(--red); background: var(--paper); }
.formmsg-ok { border-left-color: #2F7A45; }
.formmsg-bad { border-left-color: var(--red); }
.formmsg strong { display: block; font-size: 17px; margin-bottom: 6px; }
.formmsg p { font-size: 15px; color: var(--ink-soft); }
.bqy-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }


/* ---------- five up end use strip ---------- */

.enduse { grid-template-columns: repeat(5, 1fr); }

/* outbound link inside an open fiber row */
.fb-link {
  display: inline-block; margin-top: 4px; font-size: 14px; font-weight: 600;
  color: var(--red-deep); text-decoration: none;
  border-bottom: 1px solid currentColor; padding-bottom: 1px;
}
.fb-link:hover { color: var(--ink); }
.fb-link::after { content: " \2197"; }

@media (max-width: 1200px) { .enduse { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px)  { .enduse { grid-template-columns: repeat(2, 1fr); } }


/* ---------- supplied vector logos ----------
   The official lockup sets "BY SAMIL SPINNING" at about 8% of its height, which is
   unreadable at any web header size. So the header uses the vector B mark with the
   name as real text, and the footer uses the full supplied lockup where there is room. */

.brand .mark { display: block; }
.foot-brand .foot-lockup { width: 252px; height: auto; margin-bottom: 24px; }

@media (max-width: 640px) {
  .brand .mark { height: 40px; }
  .foot-brand .foot-lockup { width: 210px; }
}

/* ---------- Grav Form output ---------- */

.contact-form .form-wrapper > form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 20px;
}
.contact-form .form-field { grid-column: 1 / -1; margin-bottom: 20px; }
.contact-form .form-field.half { grid-column: span 1; }
.contact-form .form-label label {
  display: block; margin-bottom: 8px; color: var(--ink-soft);
  font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
}
.contact-form input:not([type="checkbox"]):not([type="hidden"]),
.contact-form select,
.contact-form textarea {
  width: 100%; padding: 13px 14px; border: 1px solid var(--line-strong);
  border-radius: 0; background: var(--linen); color: var(--ink);
  font: inherit; font-size: 15.5px;
}
.contact-form textarea { min-height: 130px; resize: vertical; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
  outline: 2px solid var(--red); outline-offset: -2px; background: #fff;
}
.contact-form .checkboxes {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px 9px; align-items: center;
}
.contact-form .checkboxes input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--red); }
.contact-form .checkboxes label { margin: 0; color: var(--ink-soft); font-size: 15px; cursor: pointer; }
.contact-form .buttons { grid-column: 1 / -1; }
.contact-form .buttons button {
  padding: 15px 28px; border: 1px solid transparent; background: var(--red); color: #fff;
  font: inherit; font-size: 14px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; cursor: pointer;
}
.contact-form .buttons button:hover { background: var(--red-dark); }
.contact-form .required, .contact-form .form-message { color: var(--red-deep); }
.contact-form .notices {
  margin-bottom: 26px; padding: 20px 22px; border-left: 3px solid var(--red);
  background: var(--paper); color: var(--ink-soft);
}
.contact-form .notices.success { border-left-color: #2F7A45; }
.contact-form .notices p { margin: 0; }

@media (max-width: 700px) {
  .contact-form .form-wrapper > form { grid-template-columns: 1fr; }
  .contact-form .form-field.half { grid-column: 1; }
  .contact-form .checkboxes { grid-template-columns: auto minmax(0, 1fr); }
}
