/* ==========================================================================
   R3COMM — SMS Consent page styles                              Version 1.0
   Colors match the landing page (index.html) so both look like one company.
   To change a color everywhere, edit it once in :root below.
   ========================================================================== */

:root {
  --r3-blue:        #0076A3;
  --r3-blue-dark:   #005C80;
  --r3-navy:        #06293A;
  --r3-navy-soft:   #0E3A50;
  --r3-navy-deep:   #041C28;   /* form card background */
  --r3-sky:         #4FB8DC;
  --r3-ink:         #12242F;
  --r3-line:        #DCE7ED;
  --r3-white:       #FFFFFF;
  --r3-on-navy:     #E8F1F6;
  --r3-on-navy-dim: #9EBCCB;
  --r3-field:       #0B3346;   /* input background */
  --r3-field-line:  #24516A;   /* input border */
  --r3-error:       #FF9B8F;
  --r3-radius:      8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--r3-on-navy);
  background: var(--r3-navy);
}

h1, h2 { color: var(--r3-white); line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 .6em; font-weight: 600; }
h1 { font-size: clamp(2.2rem, 1.6rem + 2.6vw, 3.4rem); }
h2 { font-size: clamp(1.4rem, 1.2rem + .8vw, 1.85rem); }
a  { color: var(--r3-sky); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--r3-sky); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.nowrap { white-space: nowrap; }

/* --- Header (white, same as landing page) --- */
.site-header { background: var(--r3-white); border-bottom: 1px solid var(--r3-line); padding: 14px 0; }
.logo img { display: block; height: 30px; width: auto; }

/* --- Bar motif from the logo --- */
.rule { display: flex; flex-direction: column; gap: 3px; width: 34px; margin-bottom: 1.25rem; }
.rule span { height: 3px; background: var(--r3-sky); border-radius: 1px; }
.rule span:nth-child(1) { width: 100%; }
.rule span:nth-child(2) { width: 64%; }
.rule span:nth-child(3) { width: 84%; }

/* --- Main two-column layout --- */
.consent { padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem); }
.consent-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(2rem, 1rem + 4vw, 4.5rem); align-items: center; }
.lead { color: var(--r3-on-navy-dim); font-size: 1.1rem; max-width: 40ch; margin: 0 0 2.25rem; }

/* --- Contact tiles (left side) --- */
.contact-tiles { display: grid; gap: .9rem; max-width: 380px; }
.contact-tile {
  display: flex; align-items: center; gap: 1rem; text-decoration: none;
  color: var(--r3-white); font-weight: 600; font-size: 1.05rem;
  background: var(--r3-navy-soft); border: 1px solid var(--r3-field-line);
  border-radius: 10px; padding: .9rem 1.1rem;
  transition: border-color .15s ease;
}
.contact-tile:hover, .contact-tile:focus { border-color: var(--r3-sky); }
.contact-tile small { display: block; font-size: .8rem; font-weight: 500; color: var(--r3-on-navy-dim); }
.tile-icon {
  width: 42px; height: 42px; padding: 10px; flex-shrink: 0; border-radius: 8px;
  background: var(--r3-blue); fill: none; stroke: var(--r3-white); stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

/* --- Form card (right side) --- */
.form-card {
  background: var(--r3-navy-deep); border: 1px solid var(--r3-navy-soft);
  border-radius: 14px; padding: clamp(1.5rem, 1rem + 2.5vw, 2.75rem);
}
.field { margin-bottom: 1.15rem; }
.field label { display: block; font-size: .9rem; font-weight: 500; margin-bottom: .35rem; color: var(--r3-on-navy); }
.field input[type="text"], .field input[type="tel"], .field textarea {
  width: 100%; font: inherit; color: var(--r3-white);
  background: var(--r3-field); border: 1px solid var(--r3-field-line);
  border-radius: var(--r3-radius); padding: .75rem .9rem;
}
.field input::placeholder { color: #6F8E9E; }
.field textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.optional { color: var(--r3-on-navy-dim); font-weight: 400; }
.field input[aria-invalid="true"] { border-color: var(--r3-error); }

/* Consent checkbox row */
.field--check { display: flex; gap: .75rem; align-items: flex-start; margin-top: 1.5rem; }
.field--check input { width: 20px; height: 20px; margin: .2rem 0 0; flex-shrink: 0; accent-color: var(--r3-blue); }
.field--check label { font-size: .85rem; line-height: 1.6; font-weight: 400; color: var(--r3-on-navy-dim); margin: 0; }

.captcha { margin: 1.25rem 0 1.5rem; min-height: 78px; }

.error  { color: var(--r3-error); font-size: .85rem; margin: .35rem 0 0; }
.notice { border-radius: var(--r3-radius); padding: .75rem 1rem; font-size: .9rem; margin: 0 0 1.25rem; }
.notice--setup { background: #4A3A12; color: #FFE3A3; border: 1px solid #7A6224; }
.notice--error { background: #4A1F1C; color: #FFD2CC; border: 1px solid #8A3A33; }

/* Thank-you page */
.thanks { max-width: 640px; }
.thanks .lead { max-width: none; }
.thanks .tile-icon { display: block; width: 56px; height: 56px; padding: 13px; margin-bottom: 1.5rem; }

/* --- Button --- */
.btn {
  display: inline-block; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  padding: .85rem 1.4rem; border-radius: var(--r3-radius); border: 1px solid transparent;
  transition: background-color .15s ease, opacity .15s ease;
}
.btn--primary { background: var(--r3-blue); color: var(--r3-white); }
.btn--primary:hover, .btn--primary:focus { background: var(--r3-blue-dark); }
.btn--block { display: block; width: 100%; }
.btn[aria-disabled="true"] { opacity: .55; }

.fine-print { font-size: .8rem; color: var(--r3-on-navy-dim); margin: 1rem 0 0; }
.form-links { display: flex; flex-wrap: wrap; gap: .5rem 2rem; margin-top: 1.25rem; font-size: .9rem; }

/* --- Footer --- */
.site-footer { background: var(--r3-navy-deep); padding: 2rem 0 1.5rem; border-top: 1px solid var(--r3-navy-soft); }
.site-footer img { height: 22px; width: auto; display: block; margin-bottom: 1rem; }
.site-footer p { color: var(--r3-on-navy-dim); font-size: .82rem; margin: 0 0 .75rem; }
.site-footer .copy { font-size: .78rem; margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; margin: 0 0 .9rem; font-size: .85rem; }
.footer-links a { color: var(--r3-on-navy-dim); }
.footer-links a:hover, .footer-links a[aria-current="page"] { color: var(--r3-white); }

/* --- Phones and tablets --- */
@media (max-width: 860px) {
  .consent-grid { grid-template-columns: 1fr; }
  .contact-tiles { max-width: none; }
}
@media (max-width: 360px) {
  /* reCAPTCHA is 304px wide; shrink it on very narrow phones. */
  .g-recaptcha { transform: scale(.88); transform-origin: 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; }
}
