/* ==========================================================================
   Real Yield Capital — styles.css
   Design system derived from the RY Capital logo.
   Core palette (do not change without updating brand assets):
     Deep navy   #04132A  — primary background (matches logo background exactly)
     Blue        #2B5E9F  — the "R" mark; rules, accents, primary button
     Slate       #434F5D  — the "Y" mark; secondary accents, quiet borders
     White       #FFFFFF  — headline text
   Extended tints (derived, for hover/borders/cards only):
     Raised navy #081B38  — card & panel backgrounds
     Hairline    #14294A  — borders and dividers
     Blue (text) #7FA6D6  — small accent text (AA-safe on navy)
     Blue (hover)#3D74BC  — button/link hover
     Mist        #A9B7C9  — secondary body text (AA-safe on navy)
   ========================================================================== */

:root {
  --navy: #04132A;
  --navy-raised: #081B38;
  --hairline: #14294A;
  --blue: #2B5E9F;
  --blue-hover: #3D74BC;
  --blue-text: #7FA6D6;
  --slate: #434F5D;
  --white: #FFFFFF;
  --ink: #EEF3F9;
  --mist: #A9B7C9;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --measure: 62ch;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --section-pad: clamp(2.75rem, 5vw, 4.25rem);
}

/* ---------- Reset & base ---------- */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--navy);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--blue-text); text-decoration: none; }

::selection { background: var(--blue); color: var(--white); }

/* ---------- Type scale ---------- */

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--white);
  margin: 0;
  letter-spacing: 0.005em;
}

h1 {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  line-height: 1.12;
}

h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.35rem);
  line-height: 1.2;
}

h3 {
  font-size: 1.25rem;
  line-height: 1.35;
}

p { margin: 0 0 1.2em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: clamp(1.15rem, 2vw, 1.3rem);
  line-height: 1.6;
  color: var(--mist);
}

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

/* Eyebrow labels — small caps, tracked out, in accent blue */
.eyebrow {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue-text);
  display: block;
  margin-bottom: 1.1rem;
}

/* ---------- Layout ---------- */

.container {
  max-width: 68rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.section + .section { border-top: 1px solid var(--hairline); }

/* ---------- Header / nav ---------- */

.site-header {
  border-bottom: 1px solid var(--hairline);
  background: var(--navy);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--white);
}

/* ---------- Brand: wordmark only ----------
   The heavy white name is the brand (BlackRock model): Inter 800, tight
   tracking, no mark in the header. The RY monogram lives as the favicon;
   the full RY CAPITAL square remains the avatar/touch icon. */

.brand { display: flex; align-items: center; }

.brand-name {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 1.85rem;
  letter-spacing: -0.022em;
  line-height: 1;
  color: var(--white);
  white-space: nowrap;
}

.site-nav {
  display: flex;
  gap: 2.2rem;
}

.site-nav a {
  position: relative;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mist);
  padding-block: 0.35rem;
  transition: color 160ms ease;
}

/* Understated hover: hairline underline draws in */
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--blue-text);
  transition: right 220ms ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--white); }

.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after { right: 0; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding-block: clamp(3.5rem, 8vw, 6rem);
  overflow: hidden;
}

.hero-inner { position: relative; z-index: 1; max-width: 46rem; }

.hero h1 { margin-bottom: 1.6rem; }

.hero .lede { margin-bottom: 2.6rem; }

/* Signature motif: a single ascending fine line — quiet, chart-adjacent */
.hero-motif {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-motif svg {
  position: absolute;
  right: -4%;
  bottom: 0;
  width: min(58rem, 90vw);
  height: auto;
  opacity: 0.55;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--blue);
  border: 1px solid var(--blue);
  padding: 0.95rem 2.1rem;
  border-radius: 2px;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.btn:hover { background: var(--blue-hover); border-color: var(--blue-hover); }
.btn:active { transform: translateY(1px); }

.btn-ghost {
  background: transparent;
  border-color: var(--slate);
  color: var(--ink);
}

.btn-ghost:hover {
  background: rgba(43, 94, 159, 0.12);
  border-color: var(--blue-text);
}

/* ---------- Two-column section pattern ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 22rem) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5.5rem);
  align-items: start;
}

.split .rule {
  width: 3.5rem;
  height: 2px;
  background: var(--blue);
  margin-top: 1.4rem;
}

/* ---------- Principle list (Why RYC) ---------- */

.principles {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.principles li {
  padding-block: 1.9rem;
  border-top: 1px solid var(--hairline);
  display: grid;
  grid-template-columns: minmax(0, 14rem) minmax(0, 1fr);
  gap: 1.25rem 2.5rem;
}

.principles li:last-child { border-bottom: 1px solid var(--hairline); }

.principles h3 { color: var(--white); }

.principles p { color: var(--mist); margin: 0; }

/* ---------- Closing CTA band ---------- */

.cta-band {
  text-align: center;
}

.cta-band h2 { margin-bottom: 1.1rem; }

.cta-band p {
  margin-inline: auto;
  margin-bottom: 2.4rem;
  color: var(--mist);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--hairline);
  padding-block: 2.6rem;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem 2.5rem;
  align-items: flex-start;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
}

/* Wordmark sized up a touch so the location line beneath sits in proportion */
.footer-brand .brand-name { font-size: 1.29rem; }

.footer-location,
.footer-email {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.825rem;
  line-height: 1.4;
  letter-spacing: 0;
  color: var(--white);
}

.footer-email { transition: color 160ms ease; }
.footer-email:hover { color: var(--blue-text); }

.footer-notes { max-width: 42rem; display: grid; gap: 0.55rem; }

.footer-notes .footer-note:last-child { color: #647383; }

.footer-note a {
  color: var(--blue-text);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 160ms ease;
}
.footer-note a:hover { color: var(--white); }

.footer-note {
  font-size: 0.8rem;
  line-height: 1.55;
  color: #788694; /* slate lifted for AA contrast on navy */
  margin: 0;
}

/* Regulatory disclosure line — full width, quiet, on every page */
.footer-disclosure {
  border-top: 1px solid var(--hairline);
  margin-top: 2rem;
  padding-top: 1.4rem;
  font-size: 0.78rem;
  line-height: 1.6;
  color: #788694;
}

/* ---------- Contact page ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 24rem) minmax(0, 1fr);
  gap: clamp(2.5rem, 7vw, 6rem);
  align-items: start;
}

.contact-aside .rule {
  width: 3.5rem;
  height: 2px;
  background: var(--blue);
  margin-top: 1.4rem;
}

/* ---------- Form ---------- */

.form-panel {
  background: var(--navy-raised);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: clamp(1.6rem, 4vw, 2.8rem);
}

.field { margin-bottom: 1.5rem; }

.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mist);
  margin-bottom: 0.5rem;
}

.field .optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.02em;
  color: #788694;
}

.field input,
.field textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  background: var(--navy);
  border: 1px solid var(--slate);
  border-radius: 3px;
  padding: 0.85rem 1rem;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field textarea { resize: vertical; min-height: 9rem; }

.field input::placeholder,
.field textarea::placeholder { color: #5A6875; }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue-text);
  box-shadow: 0 0 0 3px rgba(43, 94, 159, 0.28);
}

/* Inline validation */
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: #C8746A;
}

.field-error {
  display: none;
  font-size: 0.85rem;
  color: #E0968C; /* warm error tone, AA on navy */
  margin-top: 0.45rem;
}

.field.has-error .field-error { display: block; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.4rem;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin-top: 2rem;
}

.form-status {
  font-size: 0.9rem;
  color: var(--mist);
}

/* Success state */
.form-success {
  display: none;
  text-align: left;
  padding-block: 1rem;
}

.form-success h3 {
  font-family: var(--serif);
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
}

.form-success p { color: var(--mist); }

.form-panel.is-submitted form { display: none; }
.form-panel.is-submitted .form-success { display: block; }

/* ---------- Focus visibility (keyboard) ---------- */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--blue-text);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .site-header .brand-name { font-size: 1.6rem; }
}

@media (max-width: 860px) {
  .split,
  .contact-grid,
  .principles li {
    grid-template-columns: 1fr;
  }

  .principles li { gap: 0.6rem; }

  .hero-motif svg { opacity: 0.3; }
}

@media (max-width: 560px) {
  .site-header .container { flex-direction: column; gap: 0.9rem; }
  .site-header .brand-name { font-size: 1.35rem; }
  .form-row { grid-template-columns: 1fr; }
  .form-actions { flex-direction: column; align-items: stretch; text-align: center; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
