/* Values live in tokens.css, which must be loaded before this file. */

@font-face {
  font-family: "Mona Sans";
  src: url(fonts/mona-sans-latin.woff2) format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Outfit";
  src: url(fonts/outfit-500-latin.woff2) format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}


/* --- reset + base -------------------------------------------------------- */

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

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

body {
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: var(--leading-normal);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* home page: one centred block rather than a top-aligned column */
body.home {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 20px;   /* keeps content off the edges once it grows */
}


/* --- brand lockup: inline SVG mark + Outfit wordmark ---------------------- */

.brand {
  display: inline-block;
  text-decoration: none;
  border-radius: var(--radius-sm);
  text-align: center;
}

/* on the home page .brand is a block inside .logo-container, not a link */
.home .brand { display: block; }

.brand-mark {
  display: block;
  height: auto;
  margin-left: auto;
  margin-right: auto;
  width: 108px;
  max-width: 46vw;
  margin-bottom: 16px;
}

.home .brand-mark {
  width: 152px;
  max-width: 62vw;
  margin-bottom: 21px;
}

.brand-name {
  display: block;
  font-family: var(--font-display);
  font-weight: var(--weight-medium);
  line-height: var(--leading-none);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-strong);
  font-size: var(--text-wordmark);
  /* optical correction, not a system value: letter-spacing trails the final
     letter too, so text-indent nudges the word back until its ink centres
     over the mark. Retune by eye if the tracking changes. */
  text-indent: .17em;
}

.home .brand-name {
  font-size: var(--text-wordmark-home);
  text-indent: .19em;
}

/* two-word lockup: "Riacore" over "Foundation". Each line is its own block so
   the inherited text-indent re-applies per line, keeping both optically
   centred over the mark despite the trailing letter-spacing. */
.brand-line { display: block; }
.brand-line + .brand-line { margin-top: .16em; }

/* the wordmark doubles as the page h1 here; drop the inner-page h1 margin */
h1.brand-name { margin-bottom: 0; }


/* ==========================================================================
   HOME PAGE
   ========================================================================= */

.logo-container {
  width: 100%;
  max-width: var(--width-home);
}

/* the SVG mark has no baked-in padding, so normal positive spacing works */
.about { margin-top: 42px; }

.about-label {
  margin-bottom: 16px;
  text-align: center;
  font-size: var(--text-eyebrow);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--teal);
}

.about-lead {
  margin-bottom: 26px;
  text-align: center;
  font-size: var(--text-lead);
  line-height: var(--leading-snug);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-tight);
  color: var(--text-strong);
}

.about p {
  margin-bottom: 16px;
  font-size: var(--text-body-sm);
  line-height: var(--leading-relaxed);
  color: var(--muted);
}

.about p:last-child { margin-bottom: 0; }

.cta-wrap {
  margin-top: 36px;
  text-align: center;
}

.cta-btn {
  display: inline-block;
  padding: 12px 30px;
  font-size: var(--text-control);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--text-on-accent);
  background-color: var(--teal);
  border: 1px solid var(--teal);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background-color var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out);
}

.cta-btn:hover { background-color: var(--teal-lo); border-color: var(--teal-lo); }
.cta-btn:active { transform: translateY(1px); }
.cta-btn:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-offset); }


/* ==========================================================================
   INNER PAGES (contact-us, thank-you)
   ========================================================================= */

.page { max-width: var(--width-page); margin: 0 auto; padding: 44px 20px 72px; }

.masthead { text-align: center; margin-bottom: 32px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 40px;
}

.eyebrow {
  margin-bottom: 12px;
  font-size: var(--text-eyebrow);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--teal);
}

h1 {
  margin-bottom: 10px;
  font-size: var(--text-h1);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tighter);
  font-weight: var(--weight-heading);
  color: var(--text-strong);
}

.lede { margin-bottom: 34px; color: var(--muted); }


/* --- form ---------------------------------------------------------------- */

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
/* title / first / last - the title select only needs room for "Prof." */
.row-name { grid-template-columns: .68fr 1fr 1fr; }
.field { margin-bottom: 18px; }
.row .field { margin-bottom: 0; }

label {
  display: block;
  margin-bottom: 7px;
  font-size: var(--text-label);
  font-weight: var(--weight-semibold);
  color: var(--ink);
}

.req { color: var(--amber); font-weight: var(--weight-bold); }

input[type="text"], input[type="email"], input[type="tel"],
select, textarea {
  width: 100%;
  padding: 11px 12px;
  font: inherit;
  font-size: var(--text-control);
  color: var(--ink);
  background: var(--sunken);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}

input::placeholder, textarea::placeholder { color: var(--text-placeholder); }

textarea { min-height: 118px; resize: vertical; }

select {
  appearance: none;
  /* a data URI cannot read a custom property - the %2398a2b3 fill is
     --color-slate-300 (--muted) and has to be updated by hand */
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2398a2b3' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}

/* native dropdown list on dark */
select option { background: var(--surface); color: var(--ink); }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: var(--focus-ring);
}

a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: var(--focus-outline);
  outline-offset: var(--focus-offset);
}

.hint { margin-top: 14px; font-size: var(--text-hint); color: var(--muted); }

/* shown when the chosen country has no state/province list */
.state-note { margin-top: 7px; }

select:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.cf-turnstile { visibility: hidden; }


/* --- buttons ------------------------------------------------------------- */

.btn {
  display: inline-block;
  padding: 12px 28px;
  font: inherit;
  font-size: var(--text-control);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--text-on-accent);   /* dark ink on teal - AAA contrast */
  background: var(--teal);
  border: 1px solid var(--teal);
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out);
}

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


/* --- footer -------------------------------------------------------------- */

.foot { margin-top: 30px; text-align: center; font-size: var(--text-foot); color: var(--muted); }
.foot a { color: var(--teal); text-decoration: none; }
.foot a:hover { text-decoration: underline; }


/* --- thank-you page ------------------------------------------------------ */

.card.centered { text-align: center; padding: 56px 40px; }

.mark {
  width: 62px; height: 62px;
  margin: 0 auto 24px;
  border-radius: var(--radius-full);
  background: var(--teal);
  display: flex; align-items: center; justify-content: center;
}

.mark svg { width: 29px; height: 29px; }

.card.centered .lede { margin-bottom: 32px; }


/* ==========================================================================
   RESPONSIVE
   Layout only - the type ramp compresses via token overrides in the
   matching @media block in tokens.css.
   ========================================================================= */

@media (max-width: 560px) {
  /* home */
  body.home { padding: 40px 18px; }
  .home .brand-mark { width: 120px; margin-bottom: 17px; }
  .about { margin-top: 34px; }
  .cta-wrap { margin-top: 30px; }

  /* inner pages */
  .page { padding: 36px 16px 52px; }
  .card { padding: 26px 20px; }
  .card.centered { padding: 36px 20px; }
  /* rows collapse to one column - children carry the spacing */
  .row, .row-name { grid-template-columns: 1fr; gap: 0; margin-bottom: 0; }
  .row .field { margin-bottom: 18px; }
}

/* "FOUNDATION" is the widest line in the lockup and is unique to this site, so
   these stay literal here rather than overriding a shared token - back the
   tracking off on the narrowest handsets so it never wraps mid-word */
@media (max-width: 360px) {
  .home .brand-name { font-size: 27px; letter-spacing: .16em; text-indent: .16em; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
