/* ============================================
   In Residence Collective — Design System
   Brand: deep teal + warm charcoal + paper
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500&family=Inter:wght@300;400;500;600&display=swap');

:root {
  /* Brand: teal family */
  --teal:       #2C7D79;
  --teal-deep:  #17423F;
  --teal-mid:   #1F5C58;
  --teal-light: #5AACA6;
  --teal-pale:  #CFE6E3;

  /* Brand: warm charcoal family (secondary brand surface) */
  --ink:        #38342F;
  --ink-deep:   #24211D;
  --ink-soft:   #46413A;

  /* Neutrals */
  --paper:      #F7F3EA;
  --white:      #FFFFFF;
  --paper-dim:  rgba(247, 243, 234, 0.72);
  --paper-faint:rgba(247, 243, 234, 0.48);

  --line-on-dark:   rgba(247, 243, 234, 0.14);
  --line-on-dark-strong: rgba(247, 243, 234, 0.26);
  --line-on-light:  rgba(36, 33, 29, 0.12);

  --max: 1140px;

  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--paper);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal-light);
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--teal-light);
}

/* ---------- Header (white, brand-forward) ---------- */
header.site {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border-bottom: 1px solid var(--line-on-light);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}

.logo {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-deep);
}
.logo span { color: var(--teal); }

.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
}
.nav-links a {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-deep);
  position: relative;
  padding: 6px 0;
  transition: color 0.25s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.nav-links a:hover,
.nav-links a.active { color: var(--teal); }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--teal);
  padding: 12px 24px;
  border-radius: 2px;
  transition: background 0.25s ease, transform 0.25s ease;
}
.nav-cta:hover { background: var(--teal-mid); transform: translateY(-1px); }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.menu-toggle span {
  width: 22px;
  height: 1px;
  background: var(--ink-deep);
  transition: all 0.25s ease;
}

/* ---------- Hero (brand teal) ---------- */
.hero {
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding-top: 140px;
  padding-bottom: 100px;
  position: relative;
  background: radial-gradient(120% 160% at 15% 0%, var(--teal-mid) 0%, var(--teal) 42%, var(--teal-deep) 100%);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 82% 18%, rgba(255,255,255,0.08), transparent 40%),
    radial-gradient(circle at 100% 100%, rgba(0,0,0,0.18), transparent 55%);
  pointer-events: none;
}

.hero-inner { max-width: 780px; position: relative; z-index: 1; }

.hero .eyebrow { color: var(--paper); }
.hero .eyebrow::before { background: var(--paper); }

.hero h1 {
  font-size: clamp(44px, 6.4vw, 80px);
  line-height: 1.04;
  margin: 22px 0 28px;
  color: var(--white);
}
.hero h1 em {
  font-style: italic;
  color: var(--paper);
}

.hero .lede {
  font-size: 21px;
  color: rgba(255,255,255,0.88);
  max-width: 540px;
  margin-bottom: 8px;
  font-weight: 400;
}

.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0.35), transparent);
  margin: 52px 0;
}

.body-copy {
  max-width: 660px;
  color: rgba(255,255,255,0.82);
  font-size: 17.5px;
  line-height: 1.9;
}
.body-copy p { margin-bottom: 22px; }
.body-copy p:last-child { margin-bottom: 0; }
.body-copy strong { color: var(--white); font-weight: 600; }

/* body-copy used on ink sections too */
section:not(.hero) .body-copy { color: var(--paper-dim); }
section:not(.hero) .body-copy strong { color: var(--paper); }

.cta-row {
  display: flex;
  gap: 16px;
  margin-top: 44px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 16px 30px;
  border-radius: 2px;
  transition: all 0.25s ease;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--white);
  color: var(--ink-deep);
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}
.btn-primary:hover { background: var(--paper); transform: translateY(-2px); }
.btn-ghost {
  color: var(--white);
  background: transparent;
  border-color: rgba(255,255,255,0.4);
}
.btn-ghost:hover {
  border-color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.08);
}
.btn svg { width: 14px; height: 14px; transition: transform 0.25s ease; }
.btn:hover svg { transform: translateX(3px); }

/* Buttons placed on ink (non-hero) sections */
section:not(.hero) .btn-ghost {
  color: var(--paper);
  border-color: var(--line-on-dark-strong);
}
section:not(.hero) .btn-ghost:hover {
  border-color: var(--paper-dim);
  background: rgba(247,243,234,0.05);
}
section:not(.hero) .btn-primary { background: var(--teal-light); color: var(--ink-deep); box-shadow: none; }
section:not(.hero) .btn-primary:hover { background: var(--paper); }

/* ---------- Section shell ---------- */
section { position: relative; z-index: 1; padding: 120px 0; }
section.tight { padding: 88px 0; }
section:not(.hero) + section:not(.hero) { border-top: 1px solid var(--line-on-dark); }

.section-head { max-width: 660px; margin-bottom: 64px; }
.section-head h2 {
  font-size: clamp(30px, 4vw, 46px);
  margin-top: 18px;
  line-height: 1.14;
}
.section-head .lede {
  color: var(--paper-dim);
  font-size: 18px;
  margin-top: 18px;
}

/* ---------- Icon card grid (How We Work Together) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.icon-card {
  background: rgba(247, 243, 234, 0.035);
  border: 1px solid var(--line-on-dark);
  padding: 40px 32px;
  border-radius: 3px;
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.icon-card:hover {
  border-color: var(--teal-light);
  background: rgba(90, 172, 166, 0.06);
  transform: translateY(-3px);
}
.icon-card .icon {
  width: 46px;
  height: 46px;
  margin-bottom: 26px;
  color: var(--teal-light);
}
.icon-card .icon svg { width: 100%; height: 100%; }
.icon-card h3 {
  font-size: 21px;
  margin-bottom: 12px;
  font-weight: 600;
}
.icon-card p {
  color: var(--paper-dim);
  font-size: 15.5px;
  line-height: 1.75;
  margin-bottom: 12px;
}
.icon-card .kicker {
  font-family: var(--serif);
  font-style: italic;
  color: var(--teal-light);
  font-size: 16px;
  margin-top: auto;
  padding-top: 20px;
}
.icon-card .time-list { margin-top: 16px; margin-bottom: auto; }
.icon-card .time-list li { padding: 10px 0; font-size: 14.5px; border-top-color: var(--line-on-dark); }
.icon-card .time-list li:first-child { border-top: none; padding-top: 0; }
.icon-card .time-list li:last-child { border-bottom: none; }

@media (max-width: 960px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .card-grid { grid-template-columns: 1fr; }
}

/* ---------- Stat / outcome grid (Performance page) ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-on-dark);
  border: 1px solid var(--line-on-dark);
}
.grid-3 .card {
  background: var(--ink);
  padding: 40px 32px;
}
.card .num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 700;
  font-size: 40px;
  color: var(--teal-light);
  margin-bottom: 18px;
  display: block;
}
.card p { color: var(--paper-dim); font-size: 15.5px; line-height: 1.7; }

/* ---------- Time list (standalone use) ---------- */
.time-list { list-style: none; margin-top: 20px; }
.time-list li {
  display: flex;
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid var(--line-on-dark);
  color: var(--paper-dim);
  font-size: 16px;
}
.time-list li:last-child { border-bottom: 1px solid var(--line-on-dark); }
.time-list li::before {
  content: "";
  width: 6px; height: 6px;
  margin-top: 8px;
  background: var(--teal-light);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---------- Quote / integration line ---------- */
.pull-line {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(24px, 3vw, 36px);
  color: var(--paper);
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 0;
  line-height: 1.5;
}
.pull-line span { color: var(--teal-light); }

/* teal banner strip for pull quotes */
.banner-teal {
  background: linear-gradient(120deg, var(--teal-deep), var(--teal) 55%, var(--teal-mid));
}
.banner-teal .pull-line { color: var(--white); }
.banner-teal .pull-line span { color: var(--paper); }

/* ---------- Form ---------- */
.contact-shell {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 80px;
  align-items: start;
}
@media (max-width: 860px) {
  .contact-shell { grid-template-columns: 1fr; gap: 56px; }
}

.form-grid { display: grid; gap: 20px; margin-top: 36px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.field { position: relative; }
.field label {
  display: block;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-faint);
  margin-bottom: 10px;
}
.field input,
.field textarea {
  width: 100%;
  background: rgba(247,243,234,0.04);
  border: 1px solid var(--line-on-dark-strong);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 15px;
  padding: 14px 16px;
  border-radius: 2px;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--teal-light);
  background: rgba(247,243,234,0.07);
}
.field input::placeholder,
.field textarea::placeholder { color: var(--paper-faint); }

.submit-btn {
  justify-self: start;
  margin-top: 8px;
  background: var(--teal);
  color: var(--white);
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  box-shadow: 0 6px 18px rgba(23,66,63,0.35);
}
.submit-btn:hover { background: var(--teal-mid); }

.form-note {
  color: var(--paper-faint);
  font-size: 13px;
  margin-top: 16px;
}

.form-success {
  display: none;
  padding: 22px 24px;
  border: 1px solid var(--teal-light);
  background: rgba(90,172,166,0.08);
  color: var(--paper);
  font-size: 15px;
  margin-top: 20px;
}
.form-success.visible { display: block; }

/* ---------- Footer ---------- */
footer.site {
  padding: 64px 0 48px;
  background: var(--ink-deep);
  border-top: 1px solid var(--line-on-dark);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}
footer.site .logo { font-size: 15px; color: var(--paper); }
footer.site .logo span { color: var(--teal-light); }
.footer-links { display: flex; gap: 28px; list-style: none; }
.footer-links a {
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper-faint);
  transition: color 0.2s ease;
}
.footer-links a:hover { color: var(--paper); }
.copyright {
  font-size: 12.5px;
  color: var(--paper-faint);
  letter-spacing: 0.03em;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-links, .nav-cta { display: none; }
  .menu-toggle { display: flex; }
  .grid-3 { grid-template-columns: 1fr; }
  section { padding: 80px 0; }
}

.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--ink-deep);
  z-index: 99;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 32px;
  gap: 26px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 32px;
  color: var(--paper);
}
.mobile-menu .btn-primary { margin-top: 20px; background: var(--teal); color: var(--white); }
