/* ==========================================================================
   Bill's Apparel — Stylesheet
   Editorial menswear style guide. Calm, premium, knowledge-forward.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --navy: #1E3A5F;
  --navy-deep: #15294a;
  --camel: #C19A6B;
  --camel-soft: #d8b88a;
  --cream: #FBF9F6;
  --cream-2: #f3efe7;
  --charcoal: #2D2D2D;
  --red: #A0392E;
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --line: #e4ded2;

  --font-display: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --font-body: "Mulish", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --maxw: 1200px;
  --maxw-read: 720px;
  --radius: 4px;
  --shadow-sm: 0 1px 2px rgba(21, 41, 74, 0.06);
  --shadow: 0 8px 30px rgba(21, 41, 74, 0.08);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--cream);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--red); }
ul, ol { padding-left: 1.3rem; }

/* ---------- Layout helpers ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.read { max-width: var(--maxw-read); margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section--tight { padding: 56px 0; }
.section--cream { background: var(--cream-2); }
.section--navy { background: var(--navy); color: var(--cream); }
.section--navy a { color: var(--camel-soft); }

.eyebrow {
  font-family: var(--font-body);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--camel);
  margin-bottom: 14px;
  display: inline-block;
}
.section--navy .eyebrow { color: var(--camel-soft); }

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); line-height: 1.25; font-weight: 400; }
h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); letter-spacing: -.005em; }
h3 { font-size: 1.35rem; }
.section--navy h1, .section--navy h2, .section--navy h3 { color: var(--cream); }

p { margin-bottom: 1.2rem; }
.lead { font-size: 1.15rem; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 14px 30px;
  border: 1.5px solid var(--navy);
  border-radius: var(--radius);
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  transition: all .25s var(--ease);
}
.btn:hover { background: var(--navy); color: var(--cream); border-color: var(--navy); }
.btn--solid { background: var(--navy); color: var(--cream); }
.btn--solid:hover { background: var(--navy-deep); color: var(--cream); }
.btn--camel { border-color: var(--camel); color: var(--camel); }
.btn--camel:hover { background: var(--camel); color: var(--cream); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251, 249, 246, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand__mark { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: var(--navy); display: flex; align-items: center; justify-content: center; }
.brand__mark img { width: 100%; height: 100%; object-fit: cover; }
.brand__name { font-family: var(--font-display); font-size: 1.25rem; color: var(--navy); letter-spacing: .01em; }
.brand__name span { color: var(--camel); }

.nav__menu { display: flex; align-items: center; gap: 30px; list-style: none; padding: 0; margin: 0; }
.nav__menu a {
  font-size: .82rem; font-weight: 600; letter-spacing: .05em;
  color: var(--charcoal); position: relative; padding: 6px 0;
}
.nav__menu a::after {
  content: ""; position: absolute; bottom: 0; left: 0; width: 0; height: 1.5px;
  background: var(--camel); transition: width .3s var(--ease);
}
.nav__menu a:hover::after, .nav__menu a.active::after { width: 100%; }
.nav__menu a.active { color: var(--navy); }

.nav__toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav__toggle span {
  display: block; width: 24px; height: 2px; background: var(--navy);
  margin: 5px 0; transition: .3s var(--ease);
}

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 78vh; display: flex; align-items: center; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(21,41,74,.82) 0%, rgba(21,41,74,.55) 45%, rgba(21,41,74,.25) 100%);
}
.hero__inner { position: relative; z-index: 1; color: var(--cream); max-width: 640px; padding: 90px 0; }
.hero__eyebrow { color: var(--camel-soft); }
.hero h1 { color: var(--cream); margin-bottom: 20px; }
.hero p { font-size: 1.18rem; color: rgba(251,249,246,.9); margin-bottom: 30px; max-width: 520px; }
.hero .btn { border-color: var(--cream); color: var(--cream); }
.hero .btn:hover { background: var(--cream); color: var(--navy); }

/* ---------- Cards / Grid ---------- */
.grid { display: grid; gap: 32px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card__img { aspect-ratio: 3/2; overflow: hidden; background: var(--cream-2); }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card__img img { transform: scale(1.04); }
.card__body { padding: 26px 24px 30px; flex: 1; display: flex; flex-direction: column; }
.card__cat { font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--camel); margin-bottom: 10px; }
.card__title { font-family: var(--font-display); font-size: 1.18rem; color: var(--ink); margin-bottom: 10px; line-height: 1.35; }
.card__title a { color: inherit; }
.card__title a:hover { color: var(--red); }
.card__excerpt { color: var(--muted); font-size: .95rem; margin-bottom: 18px; flex: 1; }
.card__meta { font-size: .8rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; }

/* ---------- Featured ---------- */
.featured { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.featured__img { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; box-shadow: var(--shadow); }
.featured__img img { width: 100%; height: 100%; object-fit: cover; }
.featured__cat { font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--camel); margin-bottom: 16px; }
.featured__title { font-family: var(--font-display); font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.2; margin-bottom: 18px; color: var(--ink); }
.featured__title a { color: inherit; }
.featured__excerpt { color: var(--muted); font-size: 1.08rem; margin-bottom: 24px; }

/* ---------- Spotlight (fabric guide) ---------- */
.spotlight { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.spotlight__media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; }
.spotlight__media img { width: 100%; height: 100%; object-fit: cover; }
.spotlight__list { list-style: none; padding: 0; margin: 24px 0 0; }
.spotlight__list li { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.15); display: flex; align-items: center; gap: 14px; }
.spotlight__list li:last-child { border-bottom: none; }
.spotlight__num { font-family: var(--font-display); color: var(--camel-soft); font-size: 1.3rem; min-width: 30px; }

/* ---------- Article body ---------- */
.article-hero { background: var(--cream-2); padding: 70px 0 50px; border-bottom: 1px solid var(--line); }
.article-hero .eyebrow { color: var(--red); }
.article-hero h1 { margin-bottom: 18px; }
.article-meta { display: flex; align-items: center; gap: 18px; font-size: .85rem; color: var(--muted); flex-wrap: wrap; }
.article-meta span { display: flex; align-items: center; gap: 6px; }
.article-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--camel); }
.article-cover { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.article-cover img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 3/2; object-fit: cover; }

.article-body { padding: 56px 0 70px; }
.article-body h2 { margin: 2.2rem 0 1rem; }
.article-body h3 { margin: 1.8rem 0 .8rem; color: var(--navy); }
.article-body p { margin-bottom: 1.3rem; }
.article-body ul, .article-body ol { margin: 0 0 1.4rem; }
.article-body li { margin-bottom: .6rem; }
.article-body strong { color: var(--ink); font-weight: 700; }
.article-body a { color: var(--navy); text-decoration: underline; text-decoration-color: var(--camel); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.article-body a:hover { color: var(--red); }
.article-body blockquote {
  border-left: 3px solid var(--camel); padding: 6px 0 6px 24px;
  margin: 1.8rem 0; font-family: var(--font-display); font-size: 1.2rem;
  font-style: italic; color: var(--navy); line-height: 1.5;
}
.article-body hr { border: none; border-top: 1px solid var(--line); margin: 2.4rem 0; }

.callout {
  background: var(--cream-2); border-left: 3px solid var(--navy);
  padding: 22px 26px; border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.8rem 0;
}
.callout__label { font-size: .7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--navy); margin-bottom: 8px; }
.callout p:last-child { margin-bottom: 0; }

table.data { width: 100%; border-collapse: collapse; margin: 1.6rem 0; font-size: .95rem; }
table.data th { background: var(--navy); color: var(--cream); text-align: left; padding: 12px 14px; font-family: var(--font-body); font-weight: 700; font-size: .82rem; letter-spacing: .04em; }
table.data td { padding: 12px 14px; border-bottom: 1px solid var(--line); }
table.data tr:nth-child(even) td { background: var(--cream-2); }

.article-tags { margin: 40px 0 0; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.article-tags span { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-right: 6px; }
.tag { display: inline-block; font-size: .78rem; padding: 5px 12px; background: var(--cream-2); border: 1px solid var(--line); border-radius: 20px; color: var(--navy); }
.tag:hover { background: var(--navy); color: var(--cream); }

.prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 50px; padding-top: 40px; border-top: 1px solid var(--line); }
.prev-next a { display: block; padding: 20px 24px; background: var(--cream-2); border-radius: var(--radius); border: 1px solid var(--line); transition: all .25s var(--ease); }
.prev-next a:hover { border-color: var(--camel); transform: translateY(-2px); }
.prev-next small { display: block; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.prev-next strong { font-family: var(--font-display); font-weight: 400; color: var(--navy); font-size: 1rem; }
.prev-next .pn-right { text-align: right; }

/* ---------- Journal / blog index ---------- */
.journal-hero { padding: 70px 0 40px; text-align: center; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 30px 0 50px; }
.filter-btn {
  font-size: .78rem; font-weight: 600; letter-spacing: .04em; padding: 8px 18px;
  border: 1px solid var(--line); border-radius: 20px; background: #fff; color: var(--charcoal);
  cursor: pointer; transition: all .2s var(--ease);
}
.filter-btn:hover, .filter-btn.active { background: var(--navy); color: var(--cream); border-color: var(--navy); }

/* ---------- About ---------- */
.about-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 70px 0; }
.principle-list { list-style: none; padding: 0; counter-reset: pr; }
.principle-list li { counter-increment: pr; padding: 22px 0 22px 56px; border-bottom: 1px solid var(--line); position: relative; }
.principle-list li::before { content: counter(pr, decimal-leading-zero); position: absolute; left: 0; top: 24px; font-family: var(--font-display); color: var(--camel); font-size: 1.3rem; }
.principle-list li:last-child { border-bottom: none; }
.principle-list h3 { margin-bottom: 6px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; }
.form-group { margin-bottom: 22px; }
.form-group label { display: block; font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--navy); margin-bottom: 8px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 13px 16px; border: 1.5px solid var(--line); border-radius: var(--radius);
  font-family: var(--font-body); font-size: 1rem; background: #fff; color: var(--charcoal);
  transition: border-color .2s var(--ease);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: var(--navy); }
.form-group textarea { min-height: 140px; resize: vertical; }
.form-note { font-size: .82rem; color: var(--muted); margin-top: 6px; }
.form-success { display: none; padding: 16px 20px; background: #e8f0e8; border: 1px solid #b8d4b8; border-radius: var(--radius); color: #2d5a2d; margin-top: 20px; font-size: .92rem; }
.form-success.show { display: block; }

.contact-info { list-style: none; padding: 0; }
.contact-info li { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.contact-info li:last-child { border-bottom: none; }
.contact-info .ci-label { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--camel); min-width: 90px; padding-top: 3px; }
.contact-info .ci-value { color: var(--charcoal); }

/* ---------- Fabric guide hub ---------- */
.hub-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.hub-card { padding: 32px 28px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); transition: all .3s var(--ease); }
.hub-card:hover { border-color: var(--camel); transform: translateY(-3px); box-shadow: var(--shadow); }
.hub-card__icon { width: 48px; height: 48px; border-radius: 50%; background: var(--cream-2); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 1.3rem; color: var(--navy); margin-bottom: 18px; }
.hub-card h3 { margin-bottom: 10px; }
.hub-card p { font-size: .95rem; color: var(--muted); margin-bottom: 16px; }
.hub-card a { font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--navy); }

/* ---------- CTA strip ---------- */
.cta-strip { text-align: center; padding: 70px 0; }
.cta-strip h2 { margin-bottom: 16px; }
.cta-strip p { max-width: 540px; margin: 0 auto 28px; color: rgba(251,249,246,.85); }

/* ---------- Legal pages ---------- */
.legal { padding: 70px 0; }
.legal h1 { margin-bottom: 12px; }
.legal .updated { font-size: .85rem; color: var(--muted); margin-bottom: 40px; }
.legal h2 { margin: 2.2rem 0 1rem; font-size: 1.4rem; }
.legal h3 { margin: 1.6rem 0 .8rem; color: var(--navy); font-size: 1.1rem; }
.legal p, .legal li { margin-bottom: 1rem; }
.legal ul { margin-bottom: 1.4rem; }

/* ---------- Sitemap page ---------- */
.sitemap-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.sitemap-cols h3 { margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--camel); color: var(--navy); }
.sitemap-cols ul { list-style: none; padding: 0; }
.sitemap-cols li { padding: 6px 0; }
.sitemap-cols a { color: var(--charcoal); font-size: .95rem; }

/* ---------- 404 ---------- */
.notfound { min-height: 70vh; display: flex; align-items: center; justify-content: center; text-align: center; }
.notfound__code { font-family: var(--font-display); font-size: clamp(5rem, 15vw, 9rem); color: var(--navy); line-height: 1; margin-bottom: 20px; }
.notfound p { max-width: 460px; margin: 0 auto 30px; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--charcoal); color: rgba(251,249,246,.7); padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.footer-brand .brand__name { color: var(--cream); }
.footer-brand .brand__name span { color: var(--camel); }
.footer-tag { font-style: italic; font-family: var(--font-display); color: var(--camel-soft); margin-bottom: 18px; }
.footer-col h4 { color: var(--cream); font-family: var(--font-body); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 18px; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: rgba(251,249,246,.7); font-size: .9rem; }
.footer-col a:hover { color: var(--camel-soft); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; font-size: .82rem; flex-wrap: wrap; gap: 12px; }
.footer-bottom a { color: rgba(251,249,246,.6); }

/* ---------- Section heading ---------- */
.section-head { text-align: center; max-width: 620px; margin: 0 auto 50px; }
.section-head p { color: var(--muted); margin-top: 14px; }
.section-head--left { text-align: left; margin-left: 0; }

/* ---------- Misc ---------- */
.text-center { text-align: center; }
.mt-40 { margin-top: 40px; }
.divider { height: 1px; background: var(--line); margin: 0; border: none; }
.breadcrumb { font-size: .82rem; color: var(--muted); margin-bottom: 24px; }
.breadcrumb a { color: var(--navy); }
.breadcrumb span { margin: 0 8px; color: var(--camel); }

/* ---------- Entrance animations ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .featured, .spotlight, .about-hero, .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .hub-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .sitemap-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav__menu {
    position: fixed; top: 72px; left: 0; right: 0; bottom: 0;
    background: var(--cream); flex-direction: column; align-items: flex-start;
    padding: 30px 24px; gap: 4px; transform: translateX(100%);
    transition: transform .35s var(--ease); height: auto; box-shadow: var(--shadow);
  }
  .nav__menu.open { transform: translateX(0); }
  .nav__menu li { width: 100%; border-bottom: 1px solid var(--line); }
  .nav__menu a { display: block; padding: 14px 0; font-size: .95rem; }
  .nav__toggle { display: block; z-index: 101; }
  .nav__toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .nav__toggle.active span:nth-child(2) { opacity: 0; }
  .nav__toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }
  .grid--2, .grid--3, .grid--4, .hub-grid, .sitemap-cols, .footer-grid, .prev-next { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  body { font-size: 16px; }
  .hero { min-height: 60vh; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  .container, .read { padding: 0 18px; }
  .btn { padding: 12px 24px; font-size: .76rem; }
}

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

