/* ============================================================
   REDOLIC — styles.css
   ============================================================ */

:root {
  --red:   #D00909;
  --ink:   #111111;
  --paper: #FFFFFF;
  --off:   #F7F6F4;
  --muted: #5E5E5E;          /* darkened from #888 → passes AA 4.5:1 on white */
  --rule:  1px solid #E3E3E3;
  --font-display: 'Inter Tight', sans-serif;
  --max: 1200px;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: 'Inter Tight', sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
}

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

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

/* ── Focus-visible: clear, consistent ring ────────────────── */

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 4px;
  border-radius: 2px;
}

/* Suppress default outline only when :focus-visible is supported */
:focus:not(:focus-visible) { outline: none; }

/* ── Scroll reveal (only when motion is OK + JS ready) ───── */
/* .js-reveal class is added by JS after pre-scanning viewport,
   so elements are never hidden before JS decides to hide them. */

@media (prefers-reduced-motion: no-preference) {
  .js-reveal .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
  }

  .js-reveal .reveal.is-visible {
    opacity: 1;
    transform: none;
  }

  /* Stagger brand rows */
  .js-reveal .brand-item:nth-child(2).reveal { transition-delay: 0.1s; }
  .js-reveal .brand-item:nth-child(3).reveal { transition-delay: 0.2s; }
  .js-reveal .brand-item:nth-child(4).reveal { transition-delay: 0.3s; }
}

/* ── Utility ──────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3.5rem);
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Header ───────────────────────────────────────────────── */

#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: var(--rule);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 2rem;
}

.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
}

.site-logo img { height: 24px; width: auto; }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2.25rem);
  list-style: none;
}

.site-nav a {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.5;
  transition: opacity 0.2s;
}

.site-nav a:hover { opacity: 1; }

/* ── Mobile nav ───────────────────────────────────────────── */

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  width: 36px;
  height: 36px;
  border-radius: 2px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.22s var(--ease), opacity 0.22s;
  transform-origin: center;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 660px) {
  .nav-toggle { display: flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--paper);
    border-bottom: var(--rule);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem clamp(1.25rem, 5vw, 3.5rem) 2rem;
    gap: 1.25rem;
  }

  .site-nav.is-open { display: flex; }
  .site-nav a { font-size: 0.8rem; letter-spacing: 0.1em; opacity: 0.8; }
}

/* ── Hero ─────────────────────────────────────────────────── */

#hero {
  padding-block: clamp(4.5rem, 12vw, 9rem);
  border-bottom: var(--rule);
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: clamp(1.5rem, 3vw, 2rem);
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  background: var(--red);
  flex-shrink: 0;
}

.hero-eyebrow span {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
}

.hero-content h1 {
  font-family: var(--font-display);
  font-weight: 800;
  /* fluid: 2.75rem at 360px → 7rem at 1200px */
  font-size: clamp(2.75rem, 2.2rem + 6vw, 7rem);
  line-height: 1.0;
  letter-spacing: -0.035em;
  color: var(--ink);
  max-width: 920px;
  margin-bottom: clamp(1.5rem, 3vw, 2rem);
}

.hero-sub {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 2rem;
  max-width: 920px;
}

.hero-sub p {
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  color: var(--muted);
  line-height: 1.75;
  max-width: 520px;
}

/* ── Buttons ──────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.9rem 1.6rem;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn-primary {
  background: var(--red);
  color: var(--paper);
  border: 1.5px solid var(--red);
}

.btn-primary:hover {
  background: #a80707;
  border-color: #a80707;
}

.btn-arrow::after {
  content: '↓';
  font-size: 0.9rem;
  font-weight: 400;
  transition: transform 0.2s var(--ease);
}

.btn-arrow:hover::after { transform: translateY(3px); }

/* ── Approach ─────────────────────────────────────────────── */

#approach {
  padding-block: clamp(4rem, 9vw, 7rem);
  border-bottom: var(--rule);
  background: var(--off);
}

.approach-inner {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.approach-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1.25rem;
}

.approach-inner h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.85rem, 3.5vw, 3.2rem);
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--ink);
}

.approach-body { padding-top: clamp(0rem, 2vw, 2.5rem); }

.approach-body p {
  font-size: 1.05rem;
  color: #4A4A4A;            /* #4A4A4A on #F7F6F4 = ~7:1, passes AAA */
  line-height: 1.8;
}

/* ── Brands ───────────────────────────────────────────────── */

#brands {
  padding-block: clamp(4rem, 9vw, 7rem);
  border-bottom: var(--rule);
}

.brands-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
  padding-bottom: clamp(1.25rem, 3vw, 2rem);
  border-bottom: var(--rule);
}

.brands-top-left { display: flex; flex-direction: column; gap: 0.6rem; }

.brands-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
}

.brands-top h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.4rem, 2.8vw, 2.1rem);
  letter-spacing: -0.025em;
  color: var(--ink);
}

.brands-count {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  align-self: flex-end;
}

/* ── Brand list — editorial numbered rows ─────────────────── */

.brands-list { list-style: none; }

.brand-item {
  display: grid;
  grid-template-columns: 3rem 1fr 220px 100px;
  align-items: center;
  gap: 1.5rem;
  padding-block: 2rem;
  border-bottom: var(--rule);
  transition: background 0.2s var(--ease);
  position: relative;
}

.brand-item::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  background: var(--red);
  transition: width 0.3s var(--ease);
}

.brand-item:hover { background: var(--off); }
.brand-item:hover::after { width: 3px; }

.brand-num {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.05em;
  padding-left: 1rem;
}

.brand-info { min-width: 0; }

.brand-logo-wrap {
  display: flex;
  align-items: center;
  margin-bottom: 0.65rem;
}

.brand-logo {
  width: auto;
  display: block;
  max-width: 180px;
}

.brand-desc {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
}

.brand-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--off);
  padding: 0.4rem 0.85rem;
  border: var(--rule);
  justify-self: start;
  white-space: nowrap;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.35;
  justify-self: end;
  padding-right: 0.5rem;
  transition: opacity 0.2s, color 0.2s;
}

.brand-item:hover .brand-link {
  opacity: 1;
  color: var(--red);
}

@media (max-width: 900px) {
  .brand-item {
    grid-template-columns: 2.5rem 1fr 90px;
    grid-template-rows: auto auto;
  }
  .brand-tag { grid-column: 3; grid-row: 1; justify-self: end; }
  .brand-link { grid-column: 2 / 4; justify-self: start; padding-left: 0; opacity: 0.7; }
}

@media (max-width: 540px) {
  .brand-item {
    grid-template-columns: 2rem 1fr;
    gap: 0.75rem 1rem;
    padding-inline: 0;
    padding-block: 1.75rem;
  }
  .brand-num { padding-left: 0; }
  .brand-tag { grid-column: 2; grid-row: 2; justify-self: start; }
  .brand-link { grid-column: 2; grid-row: 3; }
}

/* ── Contact / Footer ─────────────────────────────────────── */

#contact {
  background: #F5F5F3;
  color: var(--ink);
  padding-block: clamp(4.5rem, 11vw, 8rem);
  border-top: var(--rule);
}

.contact-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: end;
  margin-bottom: clamp(3rem, 6vw, 5rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  border-bottom: var(--rule);
}

.contact-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1.25rem;
}

.contact-body h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 5.5vw, 5rem);
  letter-spacing: -0.04em;
  line-height: 1.0;
}

.contact-right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: flex-end;
}

.contact-right p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.75;
  max-width: 320px;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  color: var(--ink);
  border-bottom: 1.5px solid var(--red);
  padding-bottom: 3px;
  width: fit-content;
  transition: color 0.2s;
}

.contact-email:hover { color: var(--red); }

.footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-text {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.footer-logo img {
  height: 17px;
  width: auto;
  opacity: 0.45;
  transition: opacity 0.2s;
}

.footer-logo:hover img { opacity: 1; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   360px · 660px · 768px · 1200px
══════════════════════════════════════════════════════════ */

/* 1200px — max container, confirmed by --max */

/* 768px — tablet ──────────────────────────────────────── */
@media (max-width: 768px) {
  .brands-grid { grid-template-columns: repeat(2, 1fr); }

  .approach-inner { grid-template-columns: 1fr; }
  .approach-body { padding-top: 0; }

  .contact-body { grid-template-columns: 1fr; align-items: start; }
}

/* 660px — mobile nav trigger ──────────────────────────── */
@media (max-width: 660px) {
  .nav-toggle { display: flex; }

  .hero-sub { grid-template-columns: 1fr; }
}

/* 360px — smallest supported viewport ─────────────────── */
@media (max-width: 360px) {
  :root { --max: 100%; }

  .container { padding-inline: 1rem; }

  .brands-grid { grid-template-columns: 1fr; }

  .brand-card { padding: 1.25rem 1rem; }

  .header-inner { height: 56px; gap: 0.75rem; }
  .site-logo img { height: 20px; }

  .contact-body { gap: 2rem; }
}
