/* ==========================================================================
   Riofin Services LLC — Stylesheet
   Deep navy + teal accent, clean sans-serif headings.
   ========================================================================== */

:root {
  --navy-900: #0b1f3a;
  --navy-800: #10294a;
  --navy-700: #16345c;
  --teal-700: #0f766e;
  --teal-600: #0d9488;
  --teal-500: #14b8a6;
  --teal-100: #e6f7f5;
  --white: #ffffff;
  --surface: #f6f9fb;
  --surface-alt: #eef3f7;
  --border: #e2e8f0;
  --text: #16233a;
  --text-muted: #5b6b82;
  --text-on-dark: #eef3f8;
  --text-on-dark-muted: #a9bad0;

  --font-heading: "Sora", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --max-width: 1180px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(11, 31, 58, 0.06), 0 1px 3px rgba(11, 31, 58, 0.08);
  --shadow-md: 0 8px 24px rgba(11, 31, 58, 0.10);
  --shadow-lg: 0 20px 48px rgba(11, 31, 58, 0.16);
  --transition: 180ms ease;
}

/* -------------------------- Reset & base -------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--navy-900);
  line-height: 1.2;
  margin: 0;
}

p {
  margin: 0;
}

button {
  font-family: inherit;
}

svg {
  display: block;
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* -------------------------- Utility -------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

.section-alt {
  background: var(--surface);
}

.section-header {
  max-width: 640px;
  margin: 0 0 48px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-700);
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: clamp(1.75rem, 1.4vw + 1.4rem, 2.5rem);
  font-weight: 700;
  margin-bottom: 14px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy-900);
  color: var(--white);
  padding: 12px 20px;
  z-index: 1000;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
}

/* Focus visibility for keyboard users */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--teal-600);
  outline-offset: 2px;
  border-radius: 4px;
}

/* -------------------------- Buttons -------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--teal-700);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--teal-600);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--navy-900);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--teal-600);
  color: var(--teal-700);
}

.btn-on-dark {
  background: var(--teal-600);
  color: var(--white);
}

.btn-on-dark:hover {
  background: var(--teal-500);
}

.btn-ghost-on-dark {
  background: transparent;
  color: var(--text-on-dark);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-ghost-on-dark:hover {
  border-color: var(--teal-500);
  color: var(--white);
}

.btn-block {
  width: 100%;
}

/* -------------------------- Header / Nav -------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 2px 12px rgba(11, 31, 58, 0.05);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy-900);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.brand-name {
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  position: relative;
  padding: 4px 0;
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--teal-700);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--navy-900);
  position: relative;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle span::before {
  top: -6px;
}

.nav-toggle span::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] span {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] span::before {
  transform: rotate(45deg);
  top: 0;
}

.nav-toggle[aria-expanded="true"] span::after {
  transform: rotate(-45deg);
  top: 0;
}

/* -------------------------- Hero -------------------------- */
.hero {
  position: relative;
  background: radial-gradient(120% 140% at 15% 0%, var(--navy-800) 0%, var(--navy-900) 55%, #081527 100%);
  color: var(--text-on-dark);
  overflow: hidden;
  padding: 120px 0 100px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse 80% 60% at 30% 20%, black 40%, transparent 90%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 780px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(20, 184, 166, 0.35);
  color: var(--teal-500);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 28px;
}

.hero h1 {
  font-size: clamp(2.3rem, 3.2vw + 1.2rem, 3.6rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.hero-lede {
  font-size: 1.15rem;
  color: var(--text-on-dark-muted);
  max-width: 640px;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 56px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--text-on-dark-muted);
}

.hero-meta-item svg {
  flex-shrink: 0;
  color: var(--teal-500);
}

/* -------------------------- Cards / Grids -------------------------- */
.grid {
  display: grid;
  gap: 28px;
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-5 {
  grid-template-columns: repeat(3, 1fr);
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(13, 148, 136, 0.25);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--teal-100);
  color: var(--teal-700);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.card p {
  color: var(--text-muted);
  font-size: 0.97rem;
}

/* Industries cards — slightly distinct treatment */
.industry-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.industry-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.industry-card-top {
  padding: 28px 28px 0;
}

.industry-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal-700);
  background: var(--teal-100);
  padding: 5px 10px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.industry-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.industry-card-body {
  padding: 0 28px 28px;
}

.industry-card-body p {
  color: var(--text-muted);
  font-size: 0.96rem;
}

.industry-note {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

/* -------------------------- Approach -------------------------- */
.approach {
  background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-800) 100%);
  color: var(--text-on-dark);
}

.approach .section-header p {
  color: var(--text-on-dark-muted);
}

.approach .eyebrow {
  color: var(--teal-500);
}

.approach .section-header h2 {
  color: var(--white);
}

.approach-lede {
  font-size: 1.1rem;
  color: var(--text-on-dark-muted);
  max-width: 760px;
  margin-bottom: 56px;
}

.approach-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.approach-item {
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
}

.approach-item .card-icon {
  background: rgba(20, 184, 166, 0.15);
  color: var(--teal-500);
}

.approach-item h3 {
  color: var(--white);
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.approach-item p {
  color: var(--text-on-dark-muted);
  font-size: 0.95rem;
}

/* -------------------------- About -------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 56px;
  align-items: start;
}

.about-copy p {
  color: var(--text-muted);
  font-size: 1.03rem;
  margin-bottom: 20px;
}

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

.bio-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-sm);
}

.bio-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-900), var(--teal-700));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.bio-card h3 {
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.bio-title {
  color: var(--teal-700);
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 16px;
}

.bio-card p.bio-text {
  color: var(--text-muted);
  font-size: 0.96rem;
}

/* -------------------------- Contact -------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 48px;
  align-items: start;
}

.contact-info h2 {
  font-size: clamp(1.75rem, 1.4vw + 1.4rem, 2.4rem);
  margin-bottom: 16px;
}

.contact-info > p {
  color: var(--text-muted);
  font-size: 1.03rem;
  margin-bottom: 32px;
}

.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
}

.contact-detail:last-child {
  border-bottom: 1px solid var(--border);
}

.contact-detail svg {
  color: var(--teal-700);
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-detail-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.contact-detail-value {
  font-weight: 600;
  color: var(--navy-900);
}

.contact-detail-value:hover {
  color: var(--teal-700);
}

.contact-form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy-900);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.96rem;
  color: var(--text);
  background: var(--surface);
  transition: border-color var(--transition), background var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--teal-600);
  background: var(--white);
}

.form-group textarea {
  min-height: 130px;
  resize: vertical;
}

.form-footnote {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 16px;
  text-align: center;
}

.form-footnote a {
  color: var(--teal-700);
  font-weight: 600;
}

.form-status {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  display: none;
}

.form-status.is-visible {
  display: block;
}

.form-status.is-success {
  background: var(--teal-100);
  color: var(--teal-700);
}

.form-status.is-error {
  background: #fdecec;
  color: #a53737;
}

.form-status a {
  font-weight: 700;
  text-decoration: underline;
}

/* -------------------------- Footer -------------------------- */
.site-footer {
  background: var(--navy-900);
  color: var(--text-on-dark-muted);
  padding: 56px 0 32px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 10px;
}

.footer-brand .brand-mark {
  width: 30px;
  height: 30px;
  font-size: 0.95rem;
}

.footer-col p {
  font-size: 0.92rem;
  max-width: 340px;
}

.footer-links {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-links-group h4 {
  color: var(--white);
  font-size: 0.85rem;
  margin-bottom: 14px;
}

.footer-links-group ul li {
  margin-bottom: 10px;
}

.footer-links-group a {
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-links-group a:hover {
  color: var(--teal-500);
}

.footer-disclaimer {
  font-size: 0.82rem;
  line-height: 1.7;
  color: rgba(169, 186, 208, 0.75);
  max-width: 920px;
  margin-bottom: 20px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: rgba(169, 186, 208, 0.6);
}

/* -------------------------- Responsive -------------------------- */
@media (max-width: 980px) {
  .grid-3,
  .grid-5,
  .approach-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .about-grid {
    gap: 40px;
  }
}

@media (max-width: 760px) {
  .section {
    padding: 72px 0;
  }

  .nav-links {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 20px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition), opacity var(--transition);
  }

  .nav-links.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    width: 100%;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .nav-actions .btn-primary.nav-cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding: 96px 0 72px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .grid-3,
  .grid-5,
  .approach-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .contact-form-card {
    padding: 28px 22px;
  }

  .footer-top {
    flex-direction: column;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 420px) {
  .container {
    padding: 0 18px;
  }
}
