:root {
  --ink: #241b1d;
  --paper: #fbf1ec;
  --rose: #8c2a3b;
  --rose-dark: #6e2030;
  --gold: #b08d57;
  --blush: #f1d6d6;
  --white: #ffffff;

  /* Trowbridge Group brand system — header/footer only, kept separate
     from the page's own rose/gold theme above. */
  --tg-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --tg-ink: #24262b;
  --tg-paper: #ffffff;
  --tg-text-primary: #1f2127;
  --tg-text-muted: #6e7280;
  --tg-text-invert: #ffffff;
  --tg-text-invert-2: #b9bdc6;
  --tg-accent-text: #96691a;
  --tg-accent-dark: #c8952b;
  --tg-line: #dfe3e8;
  --tg-line-invert: #3b3d44;

  --content-width: clamp(560px, 58vw, 760px);
}

* { box-sizing: border-box; }

html {
  scroll-padding-top: env(safe-area-inset-top, 0px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Work Sans', sans-serif;
  line-height: 1.5;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

h1, h2, .card-name {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  margin: 0;
}

main {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px 64px;
}

/* Hero */

.hero {
  text-align: center;
  padding: 64px 0 40px;
}

.ring {
  width: 88px;
  height: 100px;
  margin-bottom: 28px;
}

@media (prefers-reduced-motion: no-preference) {
  .ring {
    animation: settle 0.7s ease-out;
  }
}

@keyframes settle {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

h1 {
  font-size: 2.4rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.lede {
  max-width: 42ch;
  margin: 20px auto 0;
  color: var(--ink);
  opacity: 0.75;
  font-size: 1.05rem;
}

/* Content blocks */

.block {
  padding: 40px 0;
  border-top: 1px solid var(--blush);
}

.block h2 {
  font-size: 1.6rem;
}

.block > p {
  margin: 10px 0 24px;
  opacity: 0.8;
}

/* Contact card preview */

.card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--blush);
  border-radius: 4px;
  padding: 20px;
  margin-bottom: 24px;
}

.card-body {
  flex: 1;
  min-width: 0;
}

.avatar {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.card-name {
  font-size: 1.1rem;
}

.card-org {
  margin: 2px 0 12px;
  font-size: 0.9rem;
  opacity: 0.7;
}

.card-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
  font-size: 0.95rem;
}

.card-row svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.8;
  flex: none;
}

.card-row a {
  color: var(--ink);
  text-decoration: none;
}

.card-row a:hover {
  color: var(--rose);
}

/* Buttons */

.button {
  display: inline-block;
  background: var(--rose);
  color: var(--white);
  border: none;
  border-radius: 4px;
  padding: 14px 28px;
  font-family: 'Work Sans', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.button:hover {
  background: var(--rose-dark);
}

.button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* Form */

.hp {
  position: absolute;
  left: -9999px;
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.optional {
  opacity: 0.55;
  font-weight: 400;
}

.field input,
.field textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--gold);
  background: transparent;
  padding: 8px 2px;
  font-family: 'Work Sans', sans-serif;
  font-size: 1rem;
  color: var(--ink);
}

.field textarea {
  resize: vertical;
  border: 1px solid var(--blush);
  border-radius: 4px;
  padding: 10px;
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-color: var(--rose);
}

@media (min-width: 640px) {
  #referral-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 24px;
  }

  #referral-form > .hp,
  #referral-form > .field:has(textarea),
  #referral-form > button {
    grid-column: 1 / -1;
  }
}

.success {
  background: var(--white);
  border: 1px solid var(--blush);
  border-radius: 4px;
  padding: 24px;
  font-family: 'Fraunces', serif;
  font-size: 1.2rem;
  text-align: center;
}

/* Trowbridge Group header */

.tg-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--tg-paper);
  border-bottom: 1px solid var(--tg-line);
  font-family: var(--tg-sans);
}

.tg-header-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tg-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  line-height: 1;
  min-width: 0;
}

.tg-brand-logo {
  height: 32px;
  width: auto;
  flex: none;
}

.tg-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tg-brand-text b {
  white-space: nowrap;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--tg-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
}

.tg-brand-text span {
  white-space: nowrap;
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tg-text-muted);
  margin-top: 3px;
}

.tg-header-phone {
  font-weight: 800;
  font-size: 0.88rem;
  text-decoration: none;
  color: var(--tg-text-primary);
  white-space: nowrap;
  flex: none;
}

.tg-header-phone:hover {
  color: var(--tg-accent-text);
}

@media (max-width: 420px) {
  .tg-brand-text span { display: none; }
}

/* Trowbridge Group footer */

.tg-footer {
  background: var(--tg-paper);
  color: var(--tg-text-primary);
  font-family: var(--tg-sans);
  font-size: 0.9rem;
  padding: 48px 0 32px;
  margin-top: 40px;
  border-top: 1px solid var(--tg-line);
}

.tg-footer-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px;
}

.tg-footer-brand {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--tg-line);
}

.tg-footer-logo {
  height: 64px;
  width: auto;
  margin-bottom: 1rem;
}

.tg-footer-serhant {
  height: 20px;
  width: auto;
  display: block;
  margin-bottom: 1rem;
  opacity: 0.85;
}

.tg-footer-brand p {
  margin: 0 0 0.8em;
}

.tg-footer-brand a {
  color: var(--tg-text-primary);
  text-decoration: none;
}

.tg-footer-brand a:hover {
  color: var(--tg-accent-text);
}

.tg-socials a {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tg-footer-legal {
  padding-top: 24px;
  font-size: 0.74rem;
  line-height: 1.7;
  color: var(--tg-text-muted);
}

.tg-footer-legal p {
  margin: 0 0 0.7em;
}

.tg-trec-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 1.2em;
}

.tg-trec-link {
  color: var(--tg-text-muted);
}

.tg-trec-link:hover {
  color: var(--tg-accent-text);
}
