/* ==========================================================================
   THE RANCHWOOD GROUP — Design System (Dark Edition)
   Aesthetic: True black background, off-white type, classical serif display.
   Restraint and gravitas. Modernist confidence.
   ========================================================================== */

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

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

:root {
  --bg: #000000;
  --bg-soft: #0a0a0a;
  --bg-card: #0f0f0f;
  --paper: #f5f4f0;
  --paper-soft: #b3b1ab;
  --muted: #6a6862;
  --rule: #1f1f1f;
  --rule-strong: #2a2a2a;

  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  --container: 1240px;
  --container-narrow: 880px;
  --container-tight: 640px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

body {
  background: var(--bg);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--paper);
  letter-spacing: -0.02em;
  line-height: 1.08;
}

h1 {
  font-size: clamp(2.6rem, 5.8vw, 5rem);
  letter-spacing: -0.025em;
  line-height: 1.02;
}

h2 {
  font-size: clamp(2rem, 3.6vw, 3.2rem);
  line-height: 1.08;
}

h3 {
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  line-height: 1.2;
}

p {
  margin-bottom: 1.25em;
  max-width: 62ch;
  color: var(--paper-soft);
}

p.lead {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1.8vw, 1.55rem);
  line-height: 1.4;
  color: var(--paper-soft);
  font-style: italic;
  max-width: 32ch;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--muted);
  display: inline-block;
}

a {
  color: var(--paper);
  text-decoration: none;
  transition: opacity 0.2s var(--ease);
}

a:hover {
  opacity: 0.65;
}

em {
  font-style: italic;
  color: var(--paper-soft);
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2.5rem;
}

.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 2.5rem;
}

.container-tight {
  max-width: var(--container-tight);
  margin: 0 auto;
  padding: 0 2.5rem;
}

section {
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.rule {
  width: 100%;
  height: 1px;
  background: var(--rule);
  border: none;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 2.5rem;
  max-width: var(--container);
  margin: 0 auto;
}

.nav-brand {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 70%;
}

.nav-brand img {
  height: 80px;
  width: auto;
  max-width: 100%;
  display: block;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--paper);
  transition: all 0.3s var(--ease);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper-soft);
  font-weight: 500;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--paper);
  transition: width 0.3s var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
  opacity: 1;
  color: var(--paper);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.75rem;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: var(--paper);
  color: var(--bg);
  border: 1px solid var(--paper);
  cursor: pointer;
  transition: all 0.3s var(--ease);
  font-family: var(--font-body);
}

.btn:hover {
  background: transparent;
  color: var(--paper);
  opacity: 1;
}

.btn-ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--rule-strong);
}

.btn-ghost:hover {
  background: var(--paper);
  color: var(--bg);
  border-color: var(--paper);
}

.btn .arrow {
  display: inline-block;
  transition: transform 0.3s var(--ease);
}

.btn:hover .arrow {
  transform: translateX(4px);
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(5rem, 11vw, 9rem) 0 clamp(4rem, 7vw, 6rem);
}

.hero h1 {
  max-width: 18ch;
  margin: 1.75rem 0 2.5rem;
}

.hero-lead {
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  margin-top: 2.5rem;
}

/* Hero with stadium background image */
.hero-stadium {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  padding: clamp(5rem, 10vw, 8rem) 0;
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
}

.hero-stadium-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

/* Layered gradient: deepens the bottom for legibility, fades top so the image breathes */
.hero-stadium-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.55) 0%,
      rgba(0, 0, 0, 0.65) 40%,
      rgba(0, 0, 0, 0.88) 100%
    );
}

.hero-stadium .container {
  position: relative;
  z-index: 1;
}

.hero-stadium h1 {
  max-width: 20ch;
  margin: 1.75rem 0 2.5rem;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.4);
}

.hero-stadium .hero-lead {
  border-top-color: rgba(245, 244, 240, 0.2);
}

/* Hero coda — "WE HELP THEM WIN." */
.hero-coda {
  max-width: none !important;
  margin-top: 2.5rem !important;
  letter-spacing: 0.02em !important;
  font-style: normal;
  color: var(--paper);
}

/* ---------- Surfaces ---------- */
.surface {
  background: var(--bg-soft);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

/* ---------- Section heads ---------- */
.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  margin-bottom: 4rem;
  align-items: start;
}

.section-head .eyebrow {
  padding-top: 0.5rem;
}

.section-head h2 {
  max-width: 20ch;
  margin-bottom: 1.5rem;
}

.section-head p {
  max-width: 56ch;
  margin-bottom: 0;
}

.section-head-stacked {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 3.5rem;
  max-width: 38ch;
}

/* ---------- Pillars ---------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
}

.pillar {
  padding: 3rem 2rem 3rem 0;
}

.pillar:not(:last-child) {
  border-right: 1px solid var(--rule);
  padding-right: 2.5rem;
}

.pillar:not(:first-child) {
  padding-left: 2.5rem;
}

.pillar-num {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.pillar h3 {
  margin-bottom: 1rem;
  font-size: 1.55rem;
}

.pillar p {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0;
}

/* ---------- Quote / Conviction ---------- */
.quote {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.2vw, 2.8rem);
  line-height: 1.2;
  font-style: italic;
  color: var(--paper);
  max-width: 26ch;
  margin: 2rem 0;
}

.quote-cite {
  font-family: var(--font-body);
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-style: normal;
}

/* ---------- Editorial ---------- */
.editorial {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.editorial-text p {
  font-size: 1.02rem;
}

.editorial-aside {
  padding: 2rem;
  border: 1px solid var(--rule-strong);
  background: var(--bg-soft);
}

.editorial-aside .eyebrow {
  margin-bottom: 1.25rem;
}

.editorial-aside p {
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1.5;
  font-style: italic;
  color: var(--paper);
  margin-bottom: 0;
}

/* ---------- Founder ---------- */
.founder {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: center;
}

.founder-portrait {
  aspect-ratio: 4/5;
  background: #0a0a0a;
  position: relative;
  overflow: hidden;
}

.founder-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  filter: grayscale(100%) contrast(1.05);
  transition: filter 0.7s var(--ease);
}

.founder-portrait:hover img,
.founder-portrait:focus-within img {
  filter: grayscale(0%) contrast(1);
}

.founder-portrait::after {
  content: "Portrait";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--muted);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
}

.founder-portrait:has(img)::after {
  display: none;
}

.founder-name {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 3.6vw, 3rem);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.founder-title {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2rem;
}

.founder-icons {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 2rem;
}

.founder-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
  color: var(--paper-soft);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.founder-icons a:hover,
.founder-icons a:focus-visible {
  color: var(--bg);
  background: var(--paper);
  border-color: var(--paper);
  opacity: 1;
}

.founder-icons svg {
  display: block;
}

/* ---------- Home (family section) ---------- */
.home-section {
  margin-top: 3rem;
}

.home-portrait {
  aspect-ratio: 3/2;
  background: #0a0a0a;
  overflow: hidden;
  max-width: 720px;
  margin: 0;
}

.home-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.home-text {
  max-width: 60ch;
  margin: 3rem 0 0;
  text-align: left;
}

.home-lead {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.4rem, 2.2vw, 1.75rem);
  line-height: 1.4;
  color: var(--paper);
  margin-bottom: 2rem;
}

.home-text p:not(.home-lead) {
  color: var(--paper-soft);
}

@media (max-width: 560px) {
  .home-text {
    margin-top: 2.5rem;
  }
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.contact-item .label {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-item .value {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--paper);
}

.contact-item .value a {
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}

.contact-item .value a:hover {
  border-bottom-color: var(--paper);
  opacity: 1;
}

/* ---------- Form ---------- */
.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 3rem;
}

.form-field {
  display: flex;
  flex-direction: column;
}

.form-field-full {
  grid-column: 1 / -1;
}

.form-field label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.form-field input,
.form-field textarea,
.form-field select {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rule-strong);
  padding: 0.75rem 0;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--paper);
  transition: border-color 0.3s var(--ease);
}

.form-field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23b3b1ab' stroke-width='1' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0 center;
  padding-right: 2rem;
  cursor: pointer;
}

.form-field select option {
  background: var(--bg);
  color: var(--paper);
}

.form-field textarea {
  min-height: 120px;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-bottom-color: var(--paper);
}

::placeholder {
  color: var(--muted);
  opacity: 1;
}

/* ---------- Page header ---------- */
.page-header {
  padding: clamp(4rem, 8vw, 6.5rem) 0 clamp(3rem, 5vw, 4.5rem);
  border-bottom: 1px solid var(--rule);
}

.page-header .eyebrow {
  margin-bottom: 1.5rem;
}

.page-header h1 {
  max-width: 22ch;
  margin-bottom: 1.5rem;
}

.page-header .lead {
  max-width: 38ch;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--rule);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--rule);
}

.footer-brand img {
  height: 52px;
  width: auto;
  margin-bottom: 1.25rem;
}

.footer-brand p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--paper-soft);
  max-width: 32ch;
  margin: 0;
}

.footer-brand p.footer-pftb {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.8rem, 2.4vw, 2.2rem);
  letter-spacing: 0.18em;
  color: var(--paper);
  margin: 0;
  line-height: 1;
}

.footer-col h5 {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer-col a {
  color: var(--paper-soft);
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: var(--paper);
  opacity: 1;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.75rem;
  font-size: 0.74rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.footer-bottom .pftb {
  font-family: var(--font-display);
  font-style: italic;
  letter-spacing: 0.18em;
}

/* ---------- Animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.24s; }
.reveal-delay-3 { transition-delay: 0.36s; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .nav-links {
    position: fixed;
    top: calc(70px + env(safe-area-inset-top, 0));
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--rule);
    transform: translateY(-120%);
    transition: transform 0.4s var(--ease);
  }

  .nav-links.open {
    transform: translateY(0);
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .nav {
    padding: 1.5rem 1.5rem 1.1rem;
  }

  .nav-brand img {
    height: 48px;
  }

  .nav-toggle {
    flex-shrink: 0;
    margin-right: -0.25rem;
  }

  .section-head,
  .editorial,
  .founder,
  .pillars,
  .contact-grid,
  .contact-form,
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .pillar {
    padding: 2.5rem 0 !important;
    border-right: none !important;
    border-bottom: 1px solid var(--rule);
  }

  .pillar:last-child {
    border-bottom: none;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .container,
  .container-narrow,
  .container-tight {
    padding: 0 1.25rem;
  }

  .nav {
    padding: 1.4rem 1rem 0.95rem;
  }

  .nav-brand img {
    height: 42px;
  }
}

@media (max-width: 380px) {
  .nav-brand img {
    height: 36px;
  }
}
