/* ============================================
   APEX SERVICES — Shared Stylesheet
   Brand colors: charcoal, light blue, green
   ============================================ */

:root {
  --charcoal: #1F2937;
  --light-blue: #4FA3D6;
  --green: #4A9265;
  --bg: #FAFAF7;
  --surface: #FFFFFF;
  --border: #E5E1D8;
  --text-muted: #6B7280;
  --text-body: #4B5563;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--charcoal);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === Sticky Top Nav === */
.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 247, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 14px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.nav-logo svg {
  width: 36px;
  height: 36px;
}

.nav-logo .name {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--charcoal);
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--charcoal);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  position: relative;
  padding: 6px 0;
  transition: color 0.2s ease;
}

.nav-links a:hover { color: var(--light-blue); }

.nav-links a.active { color: var(--light-blue); }

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--light-blue);
  border-radius: 1px;
}

/* === Hero (Home) === */
.hero {
  min-height: calc(100vh - 70px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 32px 60px;
}

.hero-logo {
  width: 200px;
  height: 160px;
  margin-bottom: 24px;
}

.hero-name {
  font-size: 72px;
  font-weight: 700;
  letter-spacing: -2.5px;
  color: var(--charcoal);
  line-height: 1;
  margin-bottom: 8px;
}

.hero-name-sub {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 8px;
  color: var(--charcoal);
  margin-bottom: 48px;
}

.hero-motto {
  font-size: 36px;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 24px;
  letter-spacing: -1px;
  max-width: 800px;
  line-height: 1.2;
}

.hero-tagline {
  font-size: 18px;
  color: var(--text-body);
  max-width: 620px;
  line-height: 1.7;
  margin-bottom: 40px;
}

.scroll-indicator {
  margin-top: 56px;
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--text-muted);
  font-weight: 500;
  animation: bounce 2.5s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(8px); opacity: 1; }
}

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 16px 36px;
  background: var(--charcoal);
  color: var(--bg);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.5px;
  transition: all 0.25s ease;
  border: 2px solid var(--charcoal);
  cursor: pointer;
}

.btn:hover {
  background: var(--light-blue);
  border-color: var(--light-blue);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(79, 163, 214, 0.25);
}

.btn-outline {
  background: transparent;
  color: var(--charcoal);
}

.btn-outline:hover {
  background: var(--charcoal);
  color: var(--bg);
  border-color: var(--charcoal);
  box-shadow: 0 8px 20px rgba(31, 41, 55, 0.2);
}

/* === Sections === */
.section {
  padding: 100px 32px;
  max-width: 1100px;
  margin: 0 auto;
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -1.5px;
  color: var(--charcoal);
  margin-bottom: 12px;
  text-align: center;
}

.section-sub {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 5px;
  font-weight: 600;
  margin-bottom: 56px;
  text-transform: uppercase;
}

/* === Services Grid === */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.service-card {
  background: var(--surface);
  padding: 32px 28px;
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--light-blue);
  box-shadow: 0 12px 28px rgba(31, 41, 55, 0.08);
}

.service-card h3 {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--charcoal);
}

.service-card p {
  font-size: 15px;
  color: var(--text-body);
  line-height: 1.6;
}

.service-mark {
  width: 28px;
  height: 22px;
  margin-bottom: 18px;
}

/* === Centered prose === */
.prose-center {
  font-size: 19px;
  color: var(--text-body);
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.8;
  text-align: center;
}

/* === About Page === */
.page-hero {
  text-align: center;
  padding: 100px 32px 40px;
  max-width: 800px;
  margin: 0 auto;
}

.page-hero h1 {
  font-size: 60px;
  font-weight: 700;
  letter-spacing: -2px;
  margin-bottom: 16px;
  line-height: 1.1;
}

.page-hero p {
  font-size: 18px;
  color: var(--text-body);
  line-height: 1.7;
}

.brother {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 56px;
  align-items: center;
  padding: 64px 32px;
  max-width: 1000px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
}

.brother:last-of-type { border-bottom: none; }

.brother:nth-of-type(even) {
  grid-template-columns: 1fr 280px;
}

.brother:nth-of-type(even) .brother-img { order: 2; }

.brother:nth-of-type(even) .brother-bio { order: 1; }

.brother-img {
  width: 280px;
  aspect-ratio: 1;
  background: var(--border);
  border-radius: 14px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-align: center;
  overflow: hidden;
}

.brother-bio h2 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--charcoal);
  margin-bottom: 6px;
  line-height: 1.1;
}

.brother-bio .role {
  font-size: 12px;
  letter-spacing: 4px;
  color: var(--light-blue);
  font-weight: 600;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.brother-bio p {
  font-size: 17px;
  color: var(--text-body);
  line-height: 1.75;
}

/* === Contact Form Page === */
.contact-form {
  max-width: 640px;
  margin: 0 auto 100px;
  padding: 48px 40px;
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid var(--border);
}

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

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--charcoal);
  margin-bottom: 10px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  background: var(--bg);
  color: var(--charcoal);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--light-blue);
  background: var(--surface);
}

.form-group textarea {
  min-height: 110px;
  resize: vertical;
  font-family: inherit;
}

.form-group .help {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
}

.submit-btn {
  width: 100%;
  padding: 18px;
  background: var(--charcoal);
  color: var(--bg);
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
  margin-top: 8px;
}

.submit-btn:hover {
  background: var(--light-blue);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(79, 163, 214, 0.25);
}

/* === Footer === */
.footer {
  padding: 36px 32px;
  text-align: center;
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 14px;
}

.footer .footer-name {
  color: var(--charcoal);
  font-weight: 700;
}

/* === Mobile === */
@media (max-width: 768px) {
  .topnav { padding: 12px 18px; }
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 14px; }
  .nav-logo .name { font-size: 17px; }

  .hero { padding: 60px 20px 40px; }
  .hero-logo { width: 150px; height: 120px; margin-bottom: 18px; }
  .hero-name { font-size: 50px; }
  .hero-name-sub { font-size: 12px; letter-spacing: 6px; margin-bottom: 32px; }
  .hero-motto { font-size: 26px; }
  .hero-tagline { font-size: 16px; }

  .section { padding: 60px 20px; }
  .section-title { font-size: 32px; }

  .page-hero { padding: 70px 20px 30px; }
  .page-hero h1 { font-size: 40px; }

  .brother {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 40px 20px;
    gap: 24px;
  }

  .brother:nth-of-type(even) { grid-template-columns: 1fr; }
  .brother:nth-of-type(even) .brother-img,
  .brother:nth-of-type(even) .brother-bio { order: initial; }

  .brother-img { width: 220px; margin: 0 auto; }
  .brother-bio h2 { font-size: 28px; }

  .contact-form { padding: 32px 20px; margin: 0 16px 80px; }
}

/* === Success Modal === */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(31, 41, 55, 0.55);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 20px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeIn 0.25s ease;
}

.modal-overlay.show { display: flex; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 48px 40px;
  max-width: 500px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-logo {
  width: 100px;
  height: 80px;
  margin: 0 auto 24px;
  display: block;
}

.modal-title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--charcoal);
  margin-bottom: 16px;
  line-height: 1.2;
}

.modal-text {
  font-size: 17px;
  color: var(--text-body);
  line-height: 1.6;
  margin-bottom: 32px;
}

.modal-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.modal-buttons .btn {
  flex: 1;
  min-width: 180px;
  text-align: center;
  font-size: 14px;
  padding: 14px 20px;
}

@media (max-width: 540px) {
  .modal-card { padding: 36px 24px; }
  .modal-title { font-size: 24px; }
  .modal-text { font-size: 15px; }
  .modal-buttons { flex-direction: column; }
  .modal-buttons .btn { width: 100%; min-width: 0; }
}
