/* =========================================================
   Manomaya Counselling & Coaching Centre
   Design tokens
   ========================================================= */
:root{
  --bg:            #F6F4EC;
  --bg-alt:        #EEEADC;
  --deep:          #23483C;
  --deep-2:        #16302688;
  --deep-solid:    #16302A;
  --accent:        #C79A4B;
  --accent-soft:   #E7CE9C;
  --ink:           #24302A;
  --muted:         #6C776E;
  --line:          #DEDACB;
  --white:         #FFFFFF;
  --surface:       #FFFFFF;
  --text:          #24302A;
  --text-muted:    #6C776E;
  --nav-cta-text:  #ffffff;
  --navbar-bg:     rgba(246, 244, 236, 0.85);
  --hero-bg:       radial-gradient(circle at 50% 20%, #2C5647 0%, var(--deep-solid) 60%, #102019 100%);
  --hero-text:     #F4F1E6;
  --hero-border:   rgba(244, 241, 230, 0.3);
  --glass-border:  rgba(244, 241, 230, 0.35);
  --glass-bg:      rgba(244, 241, 230, 0.08);
  --glass-hover-bg: rgba(244, 241, 230, 0.16);
  --solid-btn-text: #1C2A20;
  --highlight-bg:  #16302A;
  --highlight-text: #F4F1E6;
  --highlight-subtext: rgba(244, 241, 230, 0.78);
  --highlight-icon-bg: rgba(244, 241, 230, 0.1);
  --pill-bg:       rgba(244, 241, 230, 0.1);
  --pill-border:   rgba(244, 241, 230, 0.2);
  --zoom-bg:       rgba(255, 255, 255, 0.85);
  --lightbox-bg:   rgba(16, 32, 25, 0.94);
  --lightbox-btn-bg: rgba(244, 241, 230, 0.1);
  --lightbox-btn-border: rgba(244, 241, 230, 0.25);
  --footer-bg:     var(--deep-solid);
  --footer-color:  rgba(244, 241, 230, 0.8);
  --footer-text:   #F4F1E6;
  --footer-muted:  rgba(244, 241, 230, 0.6);
  --call-bg:       var(--deep-solid);
  --call-color:    #fff;
  --toggle-bg:     rgba(255, 255, 255, 0.9);
  --toggle-border: rgba(196, 154, 75, 0.2);
  --toggle-icon:   var(--deep-solid);

  --font-display: "Fraunces", "Noto Sans Malayalam", serif;
  --font-body:    "Inter", "Noto Sans Malayalam", sans-serif;

  --radius-s: 10px;
  --radius-m: 18px;
  --radius-l: 28px;

  --shadow-soft: 0 12px 40px rgba(22, 48, 38, 0.10);
  --shadow-card: 0 8px 24px rgba(22, 48, 38, 0.08);
}

:root[data-theme="dark"]{
  --bg:            #0E161A;
  --bg-alt:        #172027;
  --deep:          #E8E4D6;
  --deep-2:        rgba(232, 228, 214, 0.18);
  --deep-solid:    #FFFFFF;
  --accent:        #DBB26E;
  --accent-soft:   #D8C8A1;
  --ink:           #F4F1E6;
  --muted:         #A7B1B0;
  --line:          #2A3840;
  --white:         #1D272E;
  --surface:       #1D272E;
  --text:          #F4F1E6;
  --text-muted:    #A7B1B0;
  --navbar-bg:     rgba(16, 22, 26, 0.88);
  --hero-bg:       radial-gradient(circle at 50% 20%, #264B45 0%, #0E241F 60%, #04110A 100%);
  --hero-text:     #F4F1E6;
  --hero-border:   rgba(255, 255, 255, 0.12);
  --glass-border:  rgba(255, 255, 255, 0.12);
  --glass-bg:      rgba(255, 255, 255, 0.05);
  --glass-hover-bg: rgba(255, 255, 255, 0.10);
  --solid-btn-text: #10181C;
  --highlight-bg:  #1F3231;
  --highlight-text: #F4F1E6;
  --highlight-subtext: rgba(244, 241, 230, 0.78);
  --highlight-icon-bg: rgba(244, 241, 230, 0.08);
  --pill-bg:       rgba(255, 255, 255, 0.06);
  --pill-border:   rgba(255, 255, 255, 0.12);
  --zoom-bg:       rgba(255, 255, 255, 0.12);
  --lightbox-bg:   rgba(1, 8, 12, 0.94);
  --lightbox-btn-bg: rgba(255, 255, 255, 0.08);
  --lightbox-btn-border: rgba(255, 255, 255, 0.16);
  --footer-bg:     #081012;
  --footer-color:  rgba(244, 241, 230, 0.8);
  --footer-text:   #F4F1E6;
  --footer-muted:  rgba(244, 241, 230, 0.6);
  --call-bg:       #F4F1E6;
  --call-color:    #10181C;
  --toggle-bg:     rgba(255, 255, 255, 0.12);
  --nav-cta-text:  #10181C;
  --toggle-border: rgba(255, 255, 255, 0.16);
  --toggle-icon:   var(--deep-solid);
  --notfound-bg:   #081012;
  --notfound-text: #F4F1E6;
  --shadow-soft:   0 12px 40px rgba(0, 0, 0, 0.22);
  --shadow-card:   0 8px 24px rgba(0, 0, 0, 0.22);
}

[lang="ml"]{ font-family: "Noto Sans Malayalam", var(--font-body); }

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; scroll-padding-top: 84px; }

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3{
  font-family: var(--font-display);
  color: var(--deep-solid);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
}

p{ margin: 0 0 1em; color: var(--ink); }

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

.skip-link{
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--deep-solid);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 999;
}
.skip-link:focus{ left: 0; }

:focus-visible{
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.eyebrow{
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 1.2rem !important;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 0.6em;
}

/* =========================================================
   Navbar
   ========================================================= */
.navbar{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 6vw;
  background: var(--navbar-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.navbar.scrolled{
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px rgba(22,48,38,0.06);
}

.logo{
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--text);
}
.logo img{ width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }

.nav-links{
  list-style: none;
  display: flex;
  gap: 30px;
  margin: 0; padding: 0;
}
nav#nav-menu{
  display: flex;
  align-items: center;
  gap: 18px;
}
.nav-links a{
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text);
  position: relative;
  padding-bottom: 4px;
}
.nav-links a::after{
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width .2s ease;
}
.nav-links a:hover::after{ width: 100%; }
.nav-links .nav-cta{
  background: var(--deep-solid);
  color: var(--nav-cta-text);
  padding: 8px 18px;
  border-radius: 999px;
}
.nav-links .nav-cta::after{ display: none; }

.menu-toggle{
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.menu-toggle span{
  width: 24px; height: 2px;
  background: var(--deep-solid);
  transition: transform .2s ease, opacity .2s ease;
}
.theme-toggle{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--toggle-border);
  border-radius: 50%;
  background: var(--toggle-bg);
  color: var(--toggle-icon);
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, color .18s ease;
  margin-left: 12px;
}
.theme-toggle:hover{
  transform: translateY(-1px);
}
.theme-toggle i{
  font-size: 1rem;
}

/* =========================================================
   Hero
   ========================================================= */
.hero{
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px 6vw 80px;
  overflow: hidden;
  background: var(--hero-bg);
  color: var(--hero-text);
}

.hero-breath{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.hero-breath .ring{
  position: absolute;
  border: 1px solid rgba(231, 206, 156, 0.28);
  border-radius: 50%;
  animation: breathe 7s ease-in-out infinite;
}
.ring.r1{ width: 320px; height: 320px; animation-delay: 0s; }
.ring.r2{ width: 520px; height: 520px; animation-delay: 1.2s; }
.ring.r3{ width: 760px; height: 760px; animation-delay: 2.4s; }

@keyframes breathe{
  0%, 100%{ transform: scale(0.92); opacity: 0.35; }
  50%{ transform: scale(1.05); opacity: 0.75; }
}
@media (prefers-reduced-motion: reduce){
  .hero-breath .ring{ animation: none; }
}

.hero-content{ position: relative; z-index: 2; max-width: 720px; }

.hero h1{
  font-size: clamp(3rem, 9vw, 5.5rem);
  color: #FBF8EF;
  letter-spacing: 0.01em;
  margin-bottom: 0.15em;
}
.hero-tagline{
  font-size: clamp(1rem, 2.4vw, 1.25rem);
  color: var(--accent-soft);
  max-width: 560px;
  margin: 0 auto 1.4em;
}

.location-link{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--hero-text);
  border: 1px solid var(--hero-border);
  padding: 8px 16px;
  border-radius: 999px;
  margin-bottom: 2.2em;
}
.location-link i{ color: var(--accent); }
.location-link:hover{ border-color: var(--accent); }

.service-buttons{
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

.glass-btn{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(6px);
  color: var(--hero-text);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.glass-btn:hover{
  transform: translateY(-2px);
  background: var(--glass-hover-bg);
  border-color: var(--accent);
}
.glass-btn-solid{
  background: var(--accent);
  color: var(--solid-btn-text);
  border-color: var(--accent);
  font-weight: 600;
}
.glass-btn-solid:hover{
  background: var(--accent-soft);
}

.hero-rotator{
  position: relative;
  z-index: 2;
  margin-top: 3em;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--accent-soft);
  min-height: 1.6em;
}
#typing.fade{ opacity: 0; transition: opacity .5s ease; }
#typing{ transition: opacity .5s ease; opacity: 1; }

/* =========================================================
   Section shell
   ========================================================= */
.section{
  padding: 100px 6vw;
  max-width: 1180px;
  margin: 0 auto;
}
.section-head{
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}
.section-head h2{ font-size: clamp(1.8rem, 4vw, 2.6rem); }
.section-intro{ color: var(--text-muted); }

/* =========================================================
   About
   ========================================================= */
.about-wrap{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.about-card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 34px 28px;
  box-shadow: var(--shadow-card);
}
.about-card .icon{
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--bg-alt);
  color: var(--deep);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 18px;
}
.about-card h3{ font-size: 1.15rem; margin-bottom: 0.5em; }
.about-card p{ color: var(--text-muted); font-size: 0.96rem; }

/* =========================================================
   Services
   ========================================================= */
.service-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin-bottom: 56px;
}
.service-item{
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 16px 18px;
  font-size: 0.94rem;
}
.service-item .dot{
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--deep-solid);
  color: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
}

.highlight-row{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.highlight-card{
  background: var(--highlight-bg);
  color: var(--highlight-text);
  border-radius: var(--radius-l);
  padding: 40px;
}
.highlight-card .icon{
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--highlight-icon-bg);
  color: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 18px;
}
.highlight-card h3{ color: var(--highlight-text); font-size: 1.2rem; }
.highlight-card p{ color: var(--highlight-subtext); font-size: 0.95rem; }

.tag-row{ display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.tag-pill{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  font-size: 0.85rem;
}
.tag-pill i{ color: var(--accent-soft); }

/* =========================================================
   Gallery
   ========================================================= */
.gallery-status{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  padding: 40px 0;
  text-align: center;
}
.gallery-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.gallery-item{
  position: relative;
  border-radius: var(--radius-m);
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
  background: var(--bg-alt);
}
.gallery-item img{
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s ease, opacity .3s ease;
}
.gallery-item.loading img{ opacity: 0; }
.gallery-item:hover img{ transform: scale(1.06); }
.gallery-item .overlay{
  position: absolute; inset: auto 0 0 0;
  padding: 14px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
  color: var(--hero-text);
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity .25s ease;
}
.gallery-item:hover .overlay{ opacity: 1; }
.gallery-item .zoom-icon{
  position: absolute; top: 12px; right: 12px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--zoom-bg);
  color: var(--deep-solid);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity .25s ease;
}
.gallery-item:hover .zoom-icon{ opacity: 1; }

.lightbox{
  position: fixed; inset: 0;
  background: var(--lightbox-bg);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.lightbox.open{ display: flex; }
.lightbox-inner{ max-width: 88vw; max-height: 82vh; }
.lightbox-inner img{ max-width: 88vw; max-height: 82vh; border-radius: 8px; }
.lightbox-close, .lightbox-prev, .lightbox-next{
  position: absolute;
  background: var(--lightbox-btn-bg);
  border: 1px solid var(--lightbox-btn-border);
  color: var(--hero-text);
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1.05rem;
}
.lightbox-close{ top: 24px; right: 24px; }
.lightbox-prev{ left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next{ right: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-counter{
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* =========================================================
   Contact
   ========================================================= */
.contact-wrap{
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: start;
}
.contact-info{ display: flex; flex-direction: column; gap: 14px; }
.contact-link{
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 16px 18px;
  font-weight: 500;
}
.contact-link i{
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--bg-alt);
  color: var(--deep);
  display: flex; align-items: center; justify-content: center;
}
.contact-link:hover{ border-color: var(--accent); }

.glass-paper.contact-form-card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 36px;
  box-shadow: var(--shadow-soft);
}
.contact-form-card form{ display: flex; flex-direction: column; gap: 6px; }
.contact-form-card label{
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--deep-solid);
  margin-top: 12px;
}
.contact-form-card input,
.contact-form-card textarea{
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--bg);
  color: var(--text);
  resize: vertical;
}
.contact-form-card input:focus,
.contact-form-card textarea:focus{
  border-color: var(--accent);
  background: var(--surface);
}
.submit-btn{
  margin-top: 20px;
  justify-content: center;
  width: 100%;
  color: var(--solid-btn-text);
}
.form-status{
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}
.form-status.success{ color: #2E7D4F; }
.form-status.error{ color: #B4432F; }

/* =========================================================
   Service modal
   ========================================================= */
.glass-modal{
  display: none;
  position: fixed; inset: 0;
  z-index: 900;
  align-items: center;
  justify-content: center;
  background: rgba(16,32,25,0.55);
  backdrop-filter: blur(4px);
  padding: 24px;
}
.glass-modal .glass-paper{
  position: relative;
  background: var(--surface);
  max-width: 560px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  border-radius: var(--radius-l);
  padding: 40px 34px;
  box-shadow: var(--shadow-soft);
}
.glass-modal h2{ font-size: 1.4rem; margin-bottom: 0.6em; }
.glass-modal pre{
  white-space: pre-wrap;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  line-height: 1.9;
  margin: 0;
}
.close-btn{
  position: absolute; top: 18px; right: 18px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* =========================================================
   Footer
   ========================================================= */
.footer{
  background: var(--footer-bg);
  color: var(--footer-color);
  padding: 60px 6vw 30px;
}
.footer-inner{
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.footer .logo{ color: var(--footer-text); }
.footer-tagline{ color: var(--footer-muted); font-size: 0.9rem; }
.footer-links{ display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; }
.footer-links a{ font-size: 0.9rem; color: var(--footer-text); }
.footer-links a:hover{ color: var(--accent-soft); }
.footer-copy{ font-size: 0.8rem; color: var(--footer-muted); margin-top: 18px; }

/* =========================================================
   Floating buttons
   ========================================================= */
.call-float, .whatsapp-float{
  position: fixed;
  right: 24px;
  width: 54px; height: 54px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--call-color);
  font-size: 1.3rem;
  box-shadow: var(--shadow-soft);
  z-index: 400;
}
.call-float{ bottom: 92px; background: var(--call-bg); }
.whatsapp-float{ bottom: 24px; background: #25D366; }
.call-float:hover, .whatsapp-float:hover{ filter: brightness(1.08); }

/* =========================================================
   404 page
   ========================================================= */
.notfound{
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  background: var(--notfound-bg);
  color: var(--notfound-text);
}
.notfound h1{ font-size: clamp(4rem, 14vw, 7rem); color: var(--accent-soft); }
.notfound h2{ color: var(--notfound-text); }
.notfound p{ color: var(--text-muted); max-width: 420px; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px){
  .about-wrap{ grid-template-columns: 1fr; }
  .highlight-row{ grid-template-columns: 1fr; }
  .contact-wrap{ grid-template-columns: 1fr; }
}

@media (max-width: 760px){
  .menu-toggle{ display: flex; }
  nav#nav-menu{
    position: fixed;
    top: 68px; right: 0;
    width: 76vw; max-width: 320px;
    height: calc(100svh - 68px);
    background: var(--surface);
    border-left: 1px solid var(--line);
    transform: translateX(100%);
    transition: transform .25s ease;
  }
  nav#nav-menu.active{ transform: translateX(0); }
  .nav-links{
    flex-direction: column;
    padding: 30px;
    gap: 22px;
  }
  .menu-toggle.active span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
  .menu-toggle.active span:nth-child(2){ opacity: 0; }
  .menu-toggle.active span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

  .section{ padding: 72px 6vw; }
}
