/* ============================================================
   Real Fun Technology — Global Stylesheet
   Pure CSS, no external dependencies, mobile-first
   ============================================================ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
               "Helvetica Neue", Arial, sans-serif;
  color: #1f2937;
  background: #ffffff;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Design Tokens ────────────────────────────────────────── */
:root {
  --navy:        #0f172a;
  --navy-mid:    #1e293b;
  --navy-light:  #334155;
  --blue:        #2563eb;
  --blue-light:  #3b82f6;
  --blue-pale:   #eff6ff;
  --gray-50:     #f8fafc;
  --gray-100:    #f1f5f9;
  --gray-200:    #e2e8f0;
  --gray-400:    #94a3b8;
  --gray-600:    #475569;
  --gray-800:    #1e293b;
  --text:        #1f2937;
  --text-muted:  #64748b;
  --white:       #ffffff;
  --radius:      8px;
  --radius-lg:   14px;
  --shadow:      0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:   0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg:   0 10px 15px rgba(0,0,0,.08), 0 4px 6px rgba(0,0,0,.05);
  --max-w:       1100px;
  --section-gap: 5rem;
}

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4 {
  color: var(--navy);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }

p { color: var(--text-muted); max-width: 68ch; }
p + p { margin-top: 1rem; }

/* ── Layout Utilities ─────────────────────────────────────── */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: var(--section-gap) 0; }
.section--alt { background: var(--gray-50); }

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }

@media (min-width: 640px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.flex-center { display: flex; align-items: center; justify-content: center; }
.text-center { text-align: center; }
.section-label {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: .75rem;
}
.section-header { margin-bottom: 3rem; }
.section-header p { margin-top: .75rem; font-size: 1.05rem; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.75rem;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .15s;
  border: 2px solid transparent;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(37,99,235,.3);
}
.btn--primary:hover { background: #1d4ed8; box-shadow: 0 4px 12px rgba(37,99,235,.35); }
.btn--outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--gray-200);
}
.btn--outline:hover { border-color: var(--blue); color: var(--blue); }
.btn--ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.35);
}
.btn--ghost:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.6); }
.btn--disabled {
  background: var(--gray-100);
  color: var(--gray-400);
  cursor: not-allowed;
  border-color: var(--gray-200);
}

/* ── Card ─────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card__icon {
  width: 44px; height: 44px;
  border-radius: var(--radius);
  background: var(--blue-pale);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}
.card h3 { margin-bottom: .5rem; }
.card p { font-size: .95rem; }

/* ── Tag / Badge ──────────────────────────────────────────── */
.tag {
  display: inline-block;
  padding: .25rem .75rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  background: var(--blue-pale);
  color: var(--blue);
  letter-spacing: .02em;
}

/* ── Navigation ───────────────────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo {
  display: flex; align-items: center; gap: .75rem;
  color: var(--white);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -.01em;
  text-decoration: none;
}
.nav-logo img { width: 32px; height: 32px; border-radius: 6px; }
.nav-logo-text span { color: var(--blue-light); }

.nav-links {
  display: none;
  align-items: center;
  gap: .25rem;
}
.nav-links a {
  padding: .45rem .85rem;
  border-radius: 6px;
  color: rgba(255,255,255,.7);
  font-size: .9rem;
  font-weight: 500;
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--white); background: rgba(255,255,255,.08); }
.nav-links a.active { color: var(--white); background: rgba(255,255,255,.1); }
.nav-cta { margin-left: .5rem; }

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: rgba(255,255,255,.8);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  display: none;
  flex-direction: column;
  background: var(--navy-mid);
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,.07);
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  padding: .65rem 0;
  color: rgba(255,255,255,.75);
  font-size: .95rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,.06);
  transition: color .15s;
}
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a:hover, .nav-mobile a.active { color: var(--white); }

@media (min-width: 768px) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1a2744 50%, #162040 100%);
  padding: 5rem 0 4.5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 60% at 70% 50%, rgba(37,99,235,.18) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content { position: relative; max-width: 700px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .8rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue-light);
  margin-bottom: 1.25rem;
}
.hero h1 { color: var(--white); margin-bottom: 1.25rem; }
.hero-sub {
  color: rgba(255,255,255,.65);
  font-size: 1.1rem;
  line-height: 1.7;
  max-width: 56ch;
  margin-bottom: 2rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ── Bullet lists ─────────────────────────────────────────── */
.check-list { display: flex; flex-direction: column; gap: .65rem; }
.check-list li {
  display: flex; align-items: flex-start; gap: .65rem;
  font-size: .95rem; color: var(--text-muted);
}
.check-list li::before {
  content: '✓';
  flex-shrink: 0;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--blue-pale);
  color: var(--blue);
  font-size: .7rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-top: .15rem;
}

/* ── Service blocks ───────────────────────────────────────── */
.service-block {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2rem;
  background: var(--white);
}
.service-block + .service-block { margin-top: 1.5rem; }
.service-block__header {
  display: flex; align-items: flex-start; gap: 1rem;
  margin-bottom: 1rem;
}
.service-block__icon {
  flex-shrink: 0;
  width: 48px; height: 48px;
  border-radius: var(--radius);
  background: var(--blue-pale);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.service-block h3 { margin-top: .15rem; margin-bottom: .35rem; }
.service-block > p { margin-bottom: 1.25rem; }
.service-examples {
  display: flex; flex-direction: column; gap: .5rem;
  padding-left: 0;
}
.service-examples li {
  display: flex; align-items: flex-start; gap: .5rem;
  font-size: .9rem; color: var(--text-muted);
}
.service-examples li::before { content: '→'; color: var(--blue); flex-shrink: 0; }

/* ── Client profiles ──────────────────────────────────────── */
.profile-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  border-left: 4px solid var(--blue);
}
.profile-card h3 { margin-bottom: .5rem; font-size: 1.05rem; }

/* ── Project cards ────────────────────────────────────────── */
.project-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
}
.project-card__tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.project-card h3 { margin-bottom: .65rem; }
.project-card p { font-size: .95rem; }
.project-outcome {
  margin-top: 1.25rem;
  padding: .85rem 1rem;
  background: var(--gray-50);
  border-radius: var(--radius);
  border-left: 3px solid var(--blue);
  font-size: .9rem;
  color: var(--gray-600);
}
.project-outcome strong { color: var(--navy); }

/* ── Contact form ─────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}
@media (min-width: 768px) {
  .contact-grid { grid-template-columns: 1fr 2fr; }
}

.contact-info h2 { margin-bottom: 1rem; }
.contact-info p { font-size: .95rem; }
.contact-detail {
  display: flex; align-items: flex-start; gap: .75rem;
  margin-top: 1.5rem;
}
.contact-detail__icon {
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: var(--radius);
  background: var(--blue-pale);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.contact-detail h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: .15rem; }
.contact-detail p { font-size: .9rem; color: var(--text); max-width: none; }

.form-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-md);
}
.form-row { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 480px) { .form-row { grid-template-columns: 1fr 1fr; } }
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-group label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--navy);
}
.form-group label .req { color: var(--blue); margin-left: .1rem; }
.form-group input,
.form-group textarea,
.form-group select {
  padding: .65rem 1rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: .95rem;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
  width: 100%;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.form-group textarea { resize: vertical; min-height: 140px; }
.form-submit { margin-top: 1.5rem; }
.form-submit .btn { width: 100%; justify-content: center; padding: .85rem; font-size: 1rem; }
.form-note { margin-top: 1rem; font-size: .8rem; color: var(--text-muted); text-align: center; }

/* ── About bio ────────────────────────────────────────────── */
.bio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}
@media (min-width: 768px) { .bio-grid { grid-template-columns: 260px 1fr; } }
.bio-photo {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--gray-100);
  aspect-ratio: 3/4;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-400);
  font-size: .85rem;
}
.bio-photo img { width: 100%; height: 100%; object-fit: cover; }
.bio-content h2 { margin-bottom: 1rem; }

.stat-row { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 2rem; }
.stat { display: flex; flex-direction: column; }
.stat__num { font-size: 2rem; font-weight: 800; color: var(--navy); letter-spacing: -.03em; }
.stat__label { font-size: .8rem; color: var(--text-muted); font-weight: 500; }

/* ── Values ───────────────────────────────────────────────── */
.values-list { display: flex; flex-direction: column; gap: 1rem; margin-top: 2rem; }
.value-item {
  display: flex; gap: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background: var(--white);
}
.value-item__icon {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: var(--radius);
  background: var(--blue-pale);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}
.value-item h4 { margin-bottom: .25rem; }
.value-item p { font-size: .9rem; max-width: none; }

/* ── Client portal teaser ─────────────────────────────────── */
.portal-teaser {
  background: linear-gradient(135deg, var(--navy) 0%, #1a2744 100%);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  color: var(--white);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
@media (min-width: 640px) {
  .portal-teaser { flex-direction: row; align-items: center; justify-content: space-between; }
}
.portal-teaser h3 { color: var(--white); margin-bottom: .35rem; }
.portal-teaser p { color: rgba(255,255,255,.65); max-width: 52ch; font-size: .95rem; }
.portal-teaser .btn { flex-shrink: 0; }

/* ── Why section ──────────────────────────────────────────── */
.why-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 640px) { .why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .why-grid { grid-template-columns: repeat(3, 1fr); } }

.why-item {
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--gray-200);
}
.why-item__num {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -.03em;
  line-height: 1;
  margin-bottom: .5rem;
}
.why-item h4 { margin-bottom: .35rem; }
.why-item p { font-size: .88rem; max-width: none; }

/* ── Page hero (inner pages) ──────────────────────────────── */
.page-hero {
  background: var(--navy);
  padding: 3.5rem 0 3rem;
}
.page-hero h1 { color: var(--white); margin-bottom: .65rem; }
.page-hero p { color: rgba(255,255,255,.6); font-size: 1.05rem; max-width: 60ch; }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  padding: 3rem 0 2rem;
  margin-top: auto;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 640px) { .footer-inner { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand { color: var(--white); }
.footer-brand h3 { font-size: 1rem; margin-bottom: .5rem; }
.footer-brand p { font-size: .85rem; color: rgba(255,255,255,.45); max-width: 32ch; }
.footer-col h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.4); margin-bottom: .85rem; font-weight: 600; }
.footer-col ul li + li { margin-top: .5rem; }
.footer-col a { font-size: .875rem; color: rgba(255,255,255,.6); transition: color .15s; }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
}
.footer-bottom p { font-size: .8rem; color: rgba(255,255,255,.35); max-width: none; margin: 0; }
.footer-bottom a { color: rgba(255,255,255,.5); }
.footer-bottom a:hover { color: var(--white); }

/* ── Divider ──────────────────────────────────────────────── */
.divider { height: 1px; background: var(--gray-200); margin: 0; }

/* ── Utilities ────────────────────────────────────────────── */
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ── Contact Simple (no-form layout) ─────────────────────────────── */
.contact-simple {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  max-width: 900px;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .contact-simple { grid-template-columns: 1fr 1fr; gap: 4rem; }
}

.contact-simple__reach h2,
.contact-simple__context h2 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
}
.contact-simple__reach p,
.contact-simple__context p {
  font-size: .95rem;
  color: var(--text-muted);
}

.contact-email-link {
  display: inline-block;
  margin: 1.5rem 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color .2s;
}
.contact-email-link:hover { border-color: var(--blue); }

.contact-meta { display: flex; flex-direction: column; gap: 1.25rem; margin-top: .5rem; }
