/* ============================================================
   Ray Bridge — Base: elements, type, buttons, forms, utilities
   ============================================================ */

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--c-text);
  background: var(--c-bg);
}

/* ---------- Headings ---------- */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--c-heading);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-display);
  text-wrap: balance;
}

h1, .h1 { font-size: var(--fs-h1); }
h2, .h2 { font-size: var(--fs-h2); }
h3, .h3 { font-size: var(--fs-h3); font-weight: 600; }
h4, .h4 { font-size: var(--fs-h4); font-weight: 600; }

/* ---------- Prose ---------- */
p { max-width: 68ch; }
.lead {
  font-size: var(--fs-body-lg);
  line-height: var(--lh-relaxed);
  color: var(--c-text);
}

strong, b { color: var(--c-heading); font-weight: 600; }

/* ---------- Links ---------- */
a { text-decoration: none; }
.text-link {
  color: var(--c-primary);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color var(--t-fast);
}
.text-link:hover { color: var(--rb-blue-dark); }

/* ---------- Focus ---------- */
:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  background: var(--rb-blue-dark);
  color: #fff;
  padding: 0.65rem 1.1rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: top var(--t-base);
}
.skip-link:focus { top: 1rem; }

/* ---------- Eyebrow / kicker ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--c-primary);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--c-accent);
  flex: none;
}
.eyebrow--center { justify-content: center; }
.eyebrow--light { color: var(--rb-blue-light); }

.on-dark h2, .on-dark h3, .on-dark h4 { color: #fff; }
.on-dark p { color: #C6D4DF; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: var(--control-h);
  padding: 0.72em 1.5em;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  text-align: center;
  white-space: nowrap;
  transition: background var(--t-fast), color var(--t-fast),
              border-color var(--t-fast), box-shadow var(--t-fast),
              transform var(--t-fast);
}
.btn svg { flex: none; }
.btn:active { transform: translateY(1px); }

/* Orange is reserved for primary conversion actions only */
.btn--primary {
  background: var(--c-accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--c-accent-hover); }

.btn--blue {
  background: var(--c-primary);
  color: #fff;
}
.btn--blue:hover { background: var(--c-primary-dark); }

.btn--outline {
  background: transparent;
  color: var(--c-primary);
  border-color: var(--rb-blue-light);
}
.btn--outline:hover {
  background: var(--rb-blue-tint);
  border-color: var(--c-primary);
}

.btn--light {
  background: #fff;
  color: var(--rb-blue-dark);
}
.btn--light:hover { background: var(--rb-blue-tint); }

.btn--ghost-light {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.42);
}
.btn--ghost-light:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: #fff;
}

.btn--sm { min-height: 38px; padding: 0.5em 1.05em; font-size: var(--fs-xs); }
.btn--lg { min-height: 54px; padding: 0.9em 1.9em; font-size: var(--fs-body); }
.btn--block { width: 100%; }

.btn--whatsapp {
  background: #1FAF5E;
  color: #fff;
}
.btn--whatsapp:hover { background: #178A4A; }

/* ============================================================
   Forms
   ============================================================ */
.field { margin-bottom: 1.1rem; }

.field label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--rb-ink);
  margin-bottom: 0.45rem;
}
.field label .req {
  color: var(--c-accent);
  margin-left: 2px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: var(--control-h);
  padding: 0.62em 0.85em;
  font-size: var(--fs-sm);
  color: var(--rb-ink);
  background: #fff;
  border: 1px solid var(--rb-line);
  border-radius: var(--radius-sm);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: #9AA7B1; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(21, 104, 167, 0.14);
}

.field[data-invalid] input,
.field[data-invalid] select,
.field[data-invalid] textarea {
  border-color: var(--c-error);
  box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.1);
}

.field-error {
  display: none;
  margin-top: 0.4rem;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--c-error);
}
.field[data-invalid] .field-error { display: block; }

.field-hint {
  margin-top: 0.4rem;
  font-size: var(--fs-xs);
  color: var(--rb-muted);
}

.form-row { display: grid; gap: 0 1rem; }

.form-note {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-size: var(--fs-xs);
  color: var(--rb-muted);
  line-height: 1.55;
}
.form-note svg { flex: none; margin-top: 2px; color: var(--rb-blue-light); }

/* Form success panel */
.form-success {
  display: none;
  padding: var(--sp-6) var(--sp-5);
  text-align: center;
  background: var(--c-success-bg);
  border: 1px solid #BFE5CD;
  border-radius: var(--radius-md);
}
.form-success.is-visible { display: block; }
.form-success__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--c-success);
  color: #fff;
  margin-bottom: var(--sp-4);
}
.form-success h3 { color: var(--c-success); margin-bottom: var(--sp-2); }
.form-success p { margin: 0 auto var(--sp-2); }

/* ============================================================
   Placeholder media system
   Client replaces each <figure class="media-ph"> with a real
   <picture> using the path recorded in data-replace.
   ============================================================ */
.media-ph {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.25rem;
  text-align: center;
  background:
    repeating-linear-gradient(45deg, #EDF3F7 0 10px, #E7EEF3 10px 20px);
  border: 1.5px dashed var(--rb-blue-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.media-ph::before {
  content: "";
  width: 34px;
  height: 26px;
  flex: none;
  background: var(--rb-blue-light);
  opacity: 0.55;
  clip-path: polygon(14% 100%, 34% 62%, 48% 78%, 68% 40%, 86% 62%, 86% 100%);
}
.media-ph::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(57, 140, 196, 0.35);
  border-radius: var(--radius-sm);
  pointer-events: none;
}
.media-ph figcaption,
.media-ph__label {
  position: relative;
  z-index: 1;
  font-size: var(--fs-xs);
  font-weight: 500;
  line-height: 1.5;
  color: var(--rb-blue-dark);
  max-width: 42ch;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* Aspect ratios (prevents CLS; keep on real <img> too) */
.ratio-16-7 { aspect-ratio: 16 / 7; }
.ratio-16-9 { aspect-ratio: 16 / 9; }
.ratio-4-3  { aspect-ratio: 4 / 3; }
.ratio-3-2  { aspect-ratio: 3 / 2; }
.ratio-1-1  { aspect-ratio: 1 / 1; }
.ratio-4-5  { aspect-ratio: 4 / 5; }
.ratio-3-4  { aspect-ratio: 3 / 4; }

img { object-fit: cover; }

/* ============================================================
   Utilities
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: var(--container-narrow); }
.container--text { max-width: var(--container-text); }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: calc(var(--section-y) * 0.62); }
.section--alt { background: var(--c-bg-alt); }
.section--dark {
  background:
    linear-gradient(160deg, var(--rb-blue-dark), var(--rb-blue-deep) 68%);
  color: #C6D4DF;
}

.text-center { text-align: center; }
.grid { display: grid; gap: var(--sp-5); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Section header block */
.section-head { max-width: 780px; margin-bottom: var(--sp-7); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }
.section-head p { margin-top: var(--sp-3); }
.section-head--split {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-5);
  flex-wrap: wrap;
}
.section-head--split > div { max-width: 640px; }

/* Placeholder-tag inline (unverified facts) */
.ph-tag {
  background: var(--rb-orange-tint);
  border-bottom: 2px dotted var(--c-accent);
  padding: 0 0.25em;
  font-weight: 500;
  color: var(--rb-orange-dark);
  white-space: nowrap;
}
