/* ==========================================================
   AEC Apply • Pro UI (LIGHT / WHITE) — v2026-01-27 (FULL)
   File: public_apply/css/aec-apply-pro.css
   Includes: White theme + Clean cards + Service grid + Splash + Logo clamp
   ========================================================== */

/* ------------------------------
   Tokens
-------------------------------- */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface2: #f7f8fb;
  --stroke: #e6eaf2;

  --text: #0b1220;
  --muted: #516074;
  --muted2: #6b7b90;

  --brand: #0ea75a; /* green */
  --brand2: #ffb020; /* amber */
  --danger: #d92d20; /* red */
  --ok: #0ea75a;

  --shadow: 0 14px 40px rgba(16, 24, 40, 0.1);
  --shadow2: 0 10px 22px rgba(16, 24, 40, 0.08);

  --radius: 18px;
  --radius2: 26px;
  --max: 1120px;

  --font: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* ------------------------------
   Base reset
-------------------------------- */
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(
      1200px 550px at 10% 0%,
      rgba(14, 167, 90, 0.1),
      transparent 55%
    ),
    radial-gradient(
      900px 500px at 95% 10%,
      rgba(255, 176, 32, 0.1),
      transparent 55%
    ),
    #ffffff;
}

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

/* ✅ Hard clamp so logos/crests NEVER blow up */
.brand img,
.side-brand img,
.mbrand img,
.splash-logo {
  width: 44px !important;
  height: 44px !important;
  max-width: 44px !important;
  max-height: 44px !important;
  object-fit: contain !important;
  display: block !important;
}

a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font-family: inherit;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 18px;
}

/* ------------------------------
   Topbar
-------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--stroke);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 14px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 260px;
}
.brand img {
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: #fff;
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.06);
}
.brand .t1 {
  font-weight: 900;
  letter-spacing: 0.2px;
  line-height: 1.1;
}
.brand .t2 {
  display: inline-block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.nav {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* ------------------------------
   Pills / Tags
-------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: #f2f4f8;
  font-weight: 900;
  font-size: 13px;
  box-shadow: 0 10px 18px rgba(16, 24, 40, 0.05);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    background 0.12s ease;
}
.pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(16, 24, 40, 0.08);
}
.pill.primary {
  background: var(--brand);
  color: #fff;
  border-color: transparent;
}
.pill.primary:hover {
  background: #0b7f46;
}
.pill.secondary {
  background: rgba(11, 18, 32, 0.92);
  color: #fff;
  border-color: transparent;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: #ffffff;
  font-weight: 900;
  font-size: 12px;
  color: var(--muted);
}

/* ------------------------------
   Typography helpers
-------------------------------- */
.section {
  padding: 18px 0 44px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(14, 167, 90, 0.1);
  color: #0b3b22;
  border: 1px solid rgba(14, 167, 90, 0.18);
  font-weight: 900;
  font-size: 12px;
}

.h1 {
  margin: 12px 0 8px;
  font-size: 36px;
  line-height: 1.08;
  letter-spacing: -0.8px;
  font-weight: 900;
}
@media (max-width: 520px) {
  .h1 {
    font-size: 30px;
  }
}

.lead {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.55;
}

.note {
  border: 1px solid var(--stroke);
  background: #ffffff;
  border-radius: 18px;
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  box-shadow: 0 10px 18px rgba(16, 24, 40, 0.05);
}
.note b {
  color: var(--text);
}

.foot {
  margin-top: 18px;
  padding: 16px 6px 30px;
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}

/* ------------------------------
   Panels / cards
-------------------------------- */
.panel {
  padding: 18px;
  border-radius: var(--radius2);
  border: 1px solid var(--stroke);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.sep {
  border: 0;
  border-top: 1px solid var(--stroke);
  margin: 14px 0;
}

/* ------------------------------
   Video
-------------------------------- */
.video {
  border: 1px solid var(--stroke);
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow2);
}
.video video,
.video iframe {
  width: 100%;
  height: 320px;
  display: block;
  background: #000;
}
@media (max-width: 980px) {
  .video video,
  .video iframe {
    height: 260px;
  }
}

/* ------------------------------
   Clean service picker grid
-------------------------------- */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
@media (max-width: 820px) {
  .svc-grid {
    grid-template-columns: 1fr;
  }
}
.svc {
  display: block;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: #ffffff;
  box-shadow: 0 10px 18px rgba(16, 24, 40, 0.05);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease;
}
.svc:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(16, 24, 40, 0.08);
}
.svc-title {
  font-weight: 900;
  letter-spacing: -0.2px;
}
.svc-sub {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.45;
}

/* ==========================================================
   Splash Overlay (Apply Portal) — CLEAN / PREMIUM
   ========================================================== */

.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background:
    radial-gradient(
      1200px 550px at 10% 0%,
      rgba(14, 167, 90, 0.12),
      transparent 55%
    ),
    radial-gradient(
      900px 500px at 95% 10%,
      rgba(255, 176, 32, 0.12),
      transparent 55%
    ),
    rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
}

.splash-card {
  width: min(520px, 100%);
  border: 1px solid var(--stroke);
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 22px 65px rgba(16, 24, 40, 0.14);
  padding: 18px 18px 16px;
  text-align: center;
}

/* splash logo slightly bigger (but still clamped) */
.splash-logo {
  width: 64px !important;
  height: 64px !important;
  max-width: 64px !important;
  max-height: 64px !important;
  margin: 6px auto 10px;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: #fff;
  box-shadow: 0 10px 18px rgba(16, 24, 40, 0.06);
}

.splash-title {
  font-weight: 900;
  letter-spacing: -0.3px;
  font-size: 18px;
  color: var(--text);
}

.splash-sub {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}

.splash-bar {
  height: 10px;
  border-radius: 999px;
  background: #f2f4f8;
  border: 1px solid var(--stroke);
  overflow: hidden;
  margin: 14px 0 12px;
}

.splash-bar span {
  display: block;
  height: 100%;
  width: 38%;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(14, 167, 90, 0.82),
    rgba(255, 176, 32, 0.82)
  );
  animation: splashMove 1.15s ease-in-out infinite;
}

@keyframes splashMove {
  0% {
    transform: translateX(-15%);
    width: 32%;
  }
  50% {
    transform: translateX(110%);
    width: 46%;
  }
  100% {
    transform: translateX(-15%);
    width: 32%;
  }
}

.splash-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 6px;
}

.splash-btn {
  border: 1px solid var(--stroke);
  background: #ffffff;
  color: var(--text);
  font-weight: 900;
  padding: 10px 14px;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(16, 24, 40, 0.05);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    background 0.12s ease;
}
.splash-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(16, 24, 40, 0.08);
}
.splash-btn.primary {
  background: var(--brand);
  color: #fff;
  border-color: transparent;
}

.splash-note {
  margin-top: 10px;
  color: var(--muted);
  font-weight: 800;
  font-size: 12.5px;
  line-height: 1.45;
}

.splash.hide {
  opacity: 0;
  transform: scale(0.99);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
  pointer-events: none;
}

/* Mobile tightening */
@media (max-width: 520px) {
  .splash {
    padding: 14px;
  }
  .splash-card {
    padding: 16px;
    border-radius: 20px;
  }
  .splash-logo {
    width: 56px !important;
    height: 56px !important;
    max-width: 56px !important;
    max-height: 56px !important;
  }
}
.portal {
  margin-top: 16px;
  border: 1px solid var(--stroke);
  background: #fff;
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 14px;
}
.portal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.portal-title {
  font-weight: 900;
  letter-spacing: -0.2px;
}
.portal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.portal-frame {
  width: 100%;
  height: 840px;
  border: 1px solid var(--stroke);
  border-radius: 18px;
  background: #fff;
}
@media (max-width: 820px) {
  .portal-frame {
    height: 920px;
  }
}
