/* ==========================================================================
   FAITHBOUND — brand stylesheet
   Reverent. Ancient. Restrained. Permanent.
   ========================================================================== */

/* 1. Tokens */
:root {
  --fb-bg: #0D0D0D;
  --fb-surface: #101010;

  --fb-text: #D8D2C8;
  --fb-heading: #BDB6AC;
  --fb-muted: #938B82;

  --fb-accent: #6F655C;
  --fb-border: #484038;

  --fb-font-display: "Cinzel", Georgia, serif;
  --fb-font-body: "Inter", Arial, sans-serif;

  --fb-radius: 2px;
  --fb-content-width: 1200px;
  --fb-reading-width: 720px;

  --fb-space-section: clamp(4rem, 10vw, 9rem);
}

/* 2. Reset & base */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--fb-bg);
  color: var(--fb-text);
  font-family: var(--fb-font-body);
  font-weight: 400;
  line-height: 1.7;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Subtle grain overlay — should almost disappear */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("../images/noise.svg");
  background-repeat: repeat;
  opacity: 0.035;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: overlay;
}

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

a { color: inherit; text-decoration: none; }

::selection { background: var(--fb-accent); color: var(--fb-bg); }

/* 3. Typography */
h1, h2, h3, h4 {
  font-family: var(--fb-font-display);
  color: var(--fb-heading);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.4rem, 7vw, 5.5rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.5rem); letter-spacing: -0.01em; }

p { margin: 0 0 1.2em; }

.lead {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  color: var(--fb-text);
  line-height: 1.6;
}

.muted { color: var(--fb-muted); }

/* 4. Layout */
.container {
  width: 100%;
  max-width: var(--fb-content-width);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

.reading {
  max-width: var(--fb-reading-width);
  margin-inline: auto;
}

.section { padding-block: var(--fb-space-section); }

.section--surface { background: var(--fb-surface); }

.center { text-align: center; }

.stack > * + * { margin-top: 1.5rem; }

/* 5. Scripture reference */
.scripture-reference {
  font-family: var(--fb-font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--fb-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding-left: 0.45em; /* optically balance the tracking */
}

.scripture-reference::before,
.scripture-reference::after {
  content: "";
  height: 1px;
  width: clamp(2rem, 8vw, 5rem);
  background: var(--fb-accent);
  opacity: 0.7;
}

/* Thin standalone rule */
.rule {
  border: 0;
  height: 1px;
  background: var(--fb-border);
  width: 100%;
  max-width: 6rem;
  margin: 2.5rem auto;
}

.rule--wide { max-width: 100%; }

/* Cross glyph */
.cross {
  font-family: var(--fb-font-display);
  color: var(--fb-accent);
  line-height: 1;
  display: inline-block;
  transform: scaleY(1.35);
  transform-origin: center;
  opacity: 0.85;
}

.cross--hero {
  font-size: clamp(2.5rem, 6vw, 4rem);
  color: var(--fb-heading);
  opacity: 0.55;
}

/* 6. Buttons */
.button {
  display: inline-block;
  font-family: var(--fb-font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.85rem 1.6rem;
  border-radius: var(--fb-radius);
  cursor: pointer;
  transition: background-color 400ms ease, color 400ms ease, border-color 400ms ease, opacity 400ms ease;
}

.button-primary {
  background: var(--fb-heading);
  color: var(--fb-bg);
  border: 1px solid var(--fb-heading);
}

.button-primary:hover { background: var(--fb-text); border-color: var(--fb-text); }

.button-secondary {
  background: transparent;
  color: var(--fb-heading);
  border: 1px solid var(--fb-accent);
}

.button-secondary:hover { border-color: var(--fb-heading); color: var(--fb-text); }

.button[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* 7. Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 13, 13, 0.85);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--fb-border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.1rem;
}

.nav__brand {
  font-family: var(--fb-font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: -0.015em;
  font-size: 1.05rem;
  color: var(--fb-heading);
}

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

.nav__links a {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fb-muted);
  transition: color 300ms ease;
}

.nav__links a:hover,
.nav__links a[aria-current="page"] { color: var(--fb-heading); }

.nav__toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--fb-heading);
  cursor: pointer;
  padding: 0.25rem;
}

.nav__toggle svg { width: 22px; height: 22px; }

@media (max-width: 640px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--fb-surface);
    border-bottom: 1px solid var(--fb-border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 400ms ease;
  }
  .nav__links.is-open { max-height: 320px; }
  .nav__links a {
    display: block;
    padding: 1rem 0;
    text-align: center;
    border-top: 1px solid var(--fb-border);
  }
}

/* 8. Footer */
.footer {
  background: var(--fb-surface);
  border-top: 1px solid var(--fb-border);
  padding-block: clamp(3rem, 6vw, 5rem);
  text-align: center;
}

.footer__brand {
  font-family: var(--fb-font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fb-heading);
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
}

.footer__links {
  display: flex;
  gap: 2rem;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  flex-wrap: wrap;
}

.footer__links a {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fb-muted);
  transition: color 300ms ease;
}

.footer__links a:hover { color: var(--fb-heading); }

.footer__fine {
  font-size: 0.7rem;
  color: var(--fb-accent);
  letter-spacing: 0.05em;
}

/* 9. Hero */
.hero {
  min-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-block: clamp(4rem, 12vh, 9rem);
  gap: 2.5rem;
}

.hero__logo {
  width: min(520px, 78vw);
  height: auto;
  margin-inline: auto;
  filter: grayscale(0.15) brightness(0.98);
}

.hero__statement {
  font-family: var(--fb-font-display);
  font-weight: 500;
  color: var(--fb-heading);
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  max-width: 30ch;
  margin-inline: auto;
}

/* 10. Product grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: clamp(1.25rem, 3vw, 2.25rem);
}

.card {
  background: var(--fb-surface);
  border: 1px solid var(--fb-border);
  border-radius: var(--fb-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 400ms ease;
}

.card:hover { border-color: var(--fb-accent); }

.card__media {
  aspect-ratio: 4 / 5;
  background:
    radial-gradient(120% 120% at 50% 20%, #16150f 0%, var(--fb-surface) 55%, #0b0b0b 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--fb-border);
  overflow: hidden;
}

.card__media img { width: 100%; height: 100%; object-fit: cover; }

/* Placeholder cross mark shown when no image */
.card__placeholder {
  font-family: var(--fb-font-display);
  color: var(--fb-accent);
  font-size: 3.5rem;
  transform: scaleY(1.4);
  opacity: 0.35;
}

.card__body { padding: 1.25rem 1.35rem 1.5rem; }

.card__name {
  font-family: var(--fb-font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: var(--fb-heading);
  font-size: 1.05rem;
  margin: 0 0 0.35rem;
}

.card__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.card__category {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fb-muted);
}

.card__price { color: var(--fb-text); font-size: 0.95rem; }

/* 11. Product detail */
.product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.product__media {
  aspect-ratio: 4 / 5;
  background:
    radial-gradient(120% 120% at 50% 20%, #16150f 0%, var(--fb-surface) 55%, #0b0b0b 100%);
  border: 1px solid var(--fb-border);
  border-radius: var(--fb-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product__media img { width: 100%; height: 100%; object-fit: cover; }

.product__placeholder {
  font-family: var(--fb-font-display);
  color: var(--fb-accent);
  font-size: 6rem;
  transform: scaleY(1.4);
  opacity: 0.35;
}

.product__category {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--fb-muted);
  margin-bottom: 0.75rem;
}

.product__price {
  font-size: 1.35rem;
  color: var(--fb-text);
  margin: 1rem 0 1.75rem;
}

.product__desc { color: var(--fb-text); max-width: 46ch; }

.sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.75rem 0;
  list-style: none;
  padding: 0;
}

.size {
  border: 1px solid var(--fb-border);
  border-radius: var(--fb-radius);
  padding: 0.55rem 0.95rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--fb-text);
  cursor: pointer;
  background: transparent;
  transition: border-color 300ms ease, color 300ms ease;
}

.size:hover, .size.is-selected {
  border-color: var(--fb-heading);
  color: var(--fb-heading);
}

.product__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.product__note {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fb-muted);
  margin-top: 1.5rem;
}

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

/* 12. Featured strip label + misc */
.eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--fb-muted);
  margin-bottom: 1.25rem;
}

.values {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
}

.values li {
  padding: 1.25rem 0;
  border-top: 1px solid var(--fb-border);
  font-family: var(--fb-font-body);
  color: var(--fb-muted);
  font-size: 1rem;
  line-height: 1.7;
}
.values li strong {
  display: block;
  margin-bottom: 0.4rem;
  font-family: var(--fb-font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--fb-heading);
  font-size: 1.1rem;
}
.values li:last-child { border-bottom: 1px solid var(--fb-border); }

/* 13. Motion — reverent reveals */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms ease, transform 600ms ease;
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
