:root {
  /* Official EKAM Logo Palette: Warm Ivory, Deep Charcoal-Obsidian & Architectural Slate-Grey */
  --ekam-obsidian: #0e1520;
  --ekam-charcoal: #182130;
  --ekam-slate: #7d828a;
  --ekam-slate-dark: #525864;
  --ekam-slate-light: #d5d8de;
  --ekam-slate-tint: #f1f2f5;

  --ekam-ivory: #faf8f3;
  --ekam-ivory-deep: #f1ede4;
  --ekam-white: #ffffff;

  --text-primary: #0e1520;
  --text-secondary: #47505e;
  --border-color: #e4e1d8;
  --border-strong: #c8ccd4;

  --shadow-sm: 0 2px 8px rgba(14, 21, 32, 0.05);
  --shadow-md: 0 10px 28px -6px rgba(14, 21, 32, 0.1);
  --shadow-lg: 0 20px 48px -10px rgba(14, 21, 32, 0.18);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --font-sans: 'Plus Jakarta Sans', 'Noto Sans Telugu', system-ui, -apple-system, sans-serif;
  --font-telugu: 'Noto Sans Telugu', 'Plus Jakarta Sans', sans-serif;
}

html {
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
}

*,
*::before,
*::after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100%;
  overflow-x: hidden;
  background-color: var(--ekam-ivory);
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
}

/* Bilingual visibility helpers */
body[data-lang="te"] .lang-en {
  display: none !important;
}
body[data-lang="en"] .lang-te {
  display: none !important;
}
body[data-lang="both"] .lang-te,
body[data-lang="both"] .lang-en {
  display: block;
}
body[data-lang="both"] span.lang-te,
body[data-lang="both"] span.lang-en {
  display: inline;
}
body[data-lang="both"] span.lang-te::after {
  content: " • ";
  opacity: 0.6;
}

/* Viewport Shell: Single-screen desktop, fluid layout on mobile */
.viewport-app {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  justify-content: space-between;
}

@media (min-width: 900px) and (min-height: 600px) {
  body {
    overflow: hidden; /* Zero vertical scroll on desktop */
  }
  .viewport-app {
    height: 100vh;
    height: 100dvh;
  }
}

@media (max-width: 899px), (max-height: 599px) {
  body {
    overflow-y: auto;
    overflow-x: hidden;
  }
  .viewport-app {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
  }
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (max-width: 640px) {
  .container {
    padding: 0 0.85rem;
  }
}

/* =====================================================
   MINIMAL HEADER & BRAND MARK
   ===================================================== */
.site-header {
  background: rgba(250, 248, 243, 0.98);
  border-bottom: 1.5px solid var(--border-color);
  padding: 0.75rem 0;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ekam-obsidian);
  min-width: 0;
}

/* Vector Representation of EKAM Logo (| |  i  | |) */
.brand-mark {
  display: inline-flex;
  align-items: flex-end;
  gap: 3.5px;
  height: 40px;
  padding: 4px 6px;
  background: var(--ekam-ivory);
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  flex-shrink: 0;
}

.mark-bar {
  width: 4px;
  background: var(--ekam-slate);
  border-radius: 99px;
}
.mark-bar.b1 { height: 20px; }
.mark-bar.b2 { height: 14px; }
.mark-bar.b3 { height: 14px; }
.mark-bar.b4 { height: 20px; }

.mark-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  margin: 0 1px;
}

.mark-dot {
  width: 7px;
  height: 7px;
  background: var(--ekam-obsidian);
  border-radius: 50%;
}

.mark-stem {
  width: 7px;
  height: 22px;
  background: var(--ekam-obsidian);
  border-radius: 99px;
}

.brand-title-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-name {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--ekam-obsidian);
  line-height: 1;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.brand-slogan {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ekam-slate-dark);
  letter-spacing: 0.04em;
  margin-top: 0.2rem;
  white-space: nowrap;
}

/* Language Switcher */
.lang-switcher {
  display: inline-flex;
  background: var(--ekam-ivory-deep);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  padding: 0.15rem;
  flex-shrink: 0;
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--ekam-charcoal);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.76rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.lang-btn.active {
  background: var(--ekam-obsidian);
  color: var(--ekam-ivory);
}

@media (max-width: 640px) {
  .site-header {
    padding: 0.5rem 0;
  }
  .navbar {
    gap: 0.4rem;
  }
  .brand {
    gap: 0.5rem;
  }
  .brand-mark {
    height: 34px;
    padding: 3px 4px;
    gap: 2.5px;
    border-radius: 8px;
  }
  .mark-bar { width: 3px; }
  .mark-bar.b1 { height: 16px; }
  .mark-bar.b2 { height: 11px; }
  .mark-bar.b3 { height: 11px; }
  .mark-bar.b4 { height: 16px; }
  .mark-center { gap: 2px; }
  .mark-dot { width: 6px; height: 6px; }
  .mark-stem { width: 6px; height: 17px; }

  .brand-name {
    font-size: 1.15rem;
  }
  .brand-slogan {
    font-size: 0.64rem;
    margin-top: 0.1rem;
  }
  .lang-switcher {
    padding: 2px;
  }
  .lang-btn {
    font-size: 0.68rem;
    padding: 0.22rem 0.45rem;
  }
}

@media (max-width: 380px) {
  .brand-slogan {
    display: none;
  }
  .brand-name {
    font-size: 1.08rem;
  }
}

/* =====================================================
   MAIN VIEWPORT & HERO CARD
   ===================================================== */
.main-viewport {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 0;
  width: 100%;
}

@media (max-width: 899px) {
  .main-viewport {
    padding: 1rem 0;
  }
}

.hero-card {
  background: var(--ekam-white);
  border: 2px solid var(--ekam-obsidian);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2.75rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  max-width: 840px;
  margin: 0 auto;
  width: 100%;
}

.hero-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--ekam-obsidian);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--ekam-obsidian);
  color: var(--ekam-ivory);
  padding: 0.35rem 1.15rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 800;
  margin-bottom: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  color: var(--ekam-obsidian);
  line-height: 1.08;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
}

.hero-tagline {
  font-size: clamp(1.05rem, 2.4vw, 1.5rem);
  font-weight: 700;
  color: var(--ekam-slate-dark);
  margin-bottom: 2rem;
  line-height: 1.45;
}

@media (max-width: 768px) {
  .hero-card {
    padding: 1.6rem 1.15rem;
    border-radius: var(--radius-md);
    border-width: 1.5px;
    box-shadow: var(--shadow-md);
  }
  .hero-kicker {
    font-size: 0.72rem;
    padding: 0.24rem 0.8rem;
    margin-bottom: 0.65rem;
  }
  .hero-title {
    font-size: clamp(1.95rem, 8vw, 2.6rem);
    letter-spacing: 0.02em;
    margin-bottom: 0.3rem;
  }
  .hero-tagline {
    font-size: clamp(0.95rem, 3.8vw, 1.18rem);
    margin-bottom: 1.35rem;
  }
}

@media (max-width: 480px) {
  .hero-card {
    padding: 1.35rem 0.85rem;
    border-radius: 14px;
  }
}

/* =====================================================
   CANDIDATE APPLICATION DECK (BUTTON + QR CODE)
   ===================================================== */
.application-deck {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.25rem;
  background: var(--ekam-ivory);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.65rem 2rem;
  margin: 0 auto;
  max-width: 780px;
  width: 100%;
}

/* Action Box */
.cta-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 0.85rem;
  flex: 1;
  min-width: 0;
}

.cta-headline {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--ekam-obsidian);
  line-height: 1.35;
}

/* Primary Candidate Button */
.btn-apply-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  background: var(--ekam-obsidian);
  color: var(--ekam-ivory);
  font-size: 1.12rem;
  font-weight: 800;
  padding: 1.05rem 2rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(14, 21, 32, 0.25);
  border: 2px solid var(--ekam-obsidian);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 100%;
}

.btn-apply-main:hover,
.btn-apply-main:active {
  background: var(--ekam-charcoal);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(14, 21, 32, 0.32);
}

.btn-icon {
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
}

.btn-arrow {
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.btn-apply-main:hover .btn-arrow {
  transform: translate(2px, -2px);
}

.btn-text-block {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-line-en {
  font-weight: 800;
  letter-spacing: 0.01em;
}

.btn-line-slash {
  opacity: 0.6;
}

.btn-line-te {
  font-family: var(--font-telugu);
  font-weight: 700;
}

.cta-subtext {
  font-size: 0.8rem;
  color: var(--ekam-slate-dark);
  font-weight: 600;
  line-height: 1.45;
}

/* Scannable QR Code Box */
.qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.qr-frame {
  width: 135px;
  height: 135px;
  background: #ffffff;
  padding: 8px;
  border-radius: var(--radius-md);
  border: 2px solid var(--ekam-obsidian);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-frame svg,
.qr-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.qr-caption {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--ekam-slate-dark);
  text-align: center;
  line-height: 1.3;
}

.deck-divider {
  width: 1.5px;
  height: 120px;
  background: var(--border-strong);
  flex-shrink: 0;
}

/* MOBILE RESPONSIVE TWEAKS FOR APPLICATION DECK */
@media (max-width: 768px) {
  .application-deck {
    flex-direction: column;
    padding: 1.25rem 0.95rem;
    gap: 1.15rem;
  }

  .deck-divider {
    display: none;
  }

  /* Priority 1: Candidate Action Box */
  .cta-box {
    width: 100%;
    align-items: center;
    text-align: center;
    gap: 0.7rem;
  }

  .cta-headline {
    font-size: 0.96rem;
    line-height: 1.35;
  }

  .btn-apply-main {
    width: 100%;
    padding: 1rem 1.1rem;
    border-radius: 14px;
    gap: 0.65rem;
  }

  .btn-text-block {
    flex-direction: column;
    gap: 0.15rem;
    line-height: 1.25;
  }

  .btn-line-slash {
    display: none;
  }

  .btn-line-en {
    font-size: 0.95rem;
  }

  .btn-line-te {
    font-size: 1.05rem;
    color: #f7f4ed;
  }

  .cta-subtext {
    font-size: 0.76rem;
    line-height: 1.35;
  }

  /* Priority 2: Compact Scannable QR Frame below */
  .qr-box {
    width: 100%;
    align-items: center;
    padding: 0.65rem;
    background: rgba(14, 21, 32, 0.03);
    border: 1px dashed var(--border-strong);
    border-radius: 12px;
  }

  .qr-frame {
    width: 105px;
    height: 105px;
    padding: 6px;
    border-radius: 10px;
  }

  .qr-caption {
    font-size: 0.72rem;
  }
}

/* =====================================================
   MINIMAL FOOTER
   ===================================================== */
.site-footer {
  background: var(--ekam-obsidian);
  color: var(--ekam-slate-light);
  font-size: 0.78rem;
  padding: 0.75rem 0;
  border-top: 1.5px solid var(--ekam-slate-dark);
  flex-shrink: 0;
  width: 100%;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-desks {
  color: var(--ekam-slate-light);
  display: flex;
  gap: 0.85rem;
}

@media (max-width: 640px) {
  .site-footer {
    padding: 0.7rem 0 max(0.7rem, env(safe-area-inset-bottom));
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 0.35rem;
  }

  .footer-desks {
    font-size: 0.72rem;
    justify-content: center;
    gap: 0.45rem;
  }
}

/* Responsive adjustments for short viewport heights on desktop */
@media (max-height: 700px) and (min-width: 900px) {
  .hero-card {
    padding: 1.75rem 2.25rem;
  }
  .hero-tagline {
    margin-bottom: 1.35rem;
  }
  .application-deck {
    padding: 1.25rem 1.5rem;
    gap: 1.75rem;
  }
  .qr-frame {
    width: 115px;
    height: 115px;
  }
  .btn-apply-main {
    padding: 0.85rem 1.75rem;
    font-size: 1rem;
  }
}
