/*
Theme Name: Aram Special School
Author: Aram Special School
Description: Custom theme for Aram Special School, Aruppukkottai, Tamil Nadu. Home, Contact and 404 pages, contact enquiries dashboard with email delivery, and security hardening.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aram-special-school
*/

/* ============================================================
   Aram Special School — Concept D: "The Grove"
   Elevated boutique-luxury editorial design
   ============================================================ */
:root{
  --royal: #0C3892;
  --royal-deep: #082A6E;
  --royal-soft: #E8ECF6;
  --gold: #B9924D;
  --gold-deep: #9C7A38;
  --gold-soft: #F3E9D2;
  --ivory: #FBF7EF;
  --paper: #FFFFFF;
  --ink: #1A2233;
  --ink-soft: #565F6E;
  --line: #E4D9C2;

  --display: "Playfair Display", Georgia, serif;
  --sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --container: 1200px;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0; font-family:var(--sans); color:var(--ink); background:var(--ivory);
  -webkit-font-smoothing:antialiased; line-height:1.7;
}
body::before{
  content:""; position:fixed; inset:0; pointer-events:none; z-index:1000; opacity:.025; mix-blend-mode:multiply;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
ul{ margin:0; padding:0; list-style:none; }
h1,h2,h3,h4{ font-family:var(--display); font-weight:600; margin:0; color:var(--royal-deep); letter-spacing:-.005em; }
p{ margin:0; }
.wrap{ max-width:var(--container); margin:0 auto; padding:0 40px; position:relative; }
:focus-visible{ outline:2px solid var(--gold); outline-offset:3px; }

@media (prefers-reduced-motion: reduce){
  *{ animation-duration:.001ms !important; transition-duration:.001ms !important; scroll-behavior:auto !important; }
}

/* ---------- load-in + reveal ---------- */
.load-in{ opacity:0; transform:translateY(18px); }
html.has-js .load-in{ animation:loadIn .9s cubic-bezier(.16,.8,.24,1) forwards; }
html.has-js .load-in.d1{ animation-delay:.05s; }
html.has-js .load-in.d2{ animation-delay:.22s; }
html.has-js .load-in.d3{ animation-delay:.4s; }
html.has-js .load-in.d4{ animation-delay:.56s; }
@keyframes loadIn{ to{ opacity:1; transform:translateY(0); } }

.reveal{ opacity:1; transform:none; }
html.has-js .reveal{ opacity:0; transform:translateY(26px); transition:opacity .8s cubic-bezier(.16,.8,.24,1), transform .8s cubic-bezier(.16,.8,.24,1); }
html.has-js .reveal.in-view{ opacity:1; transform:translateY(0); }
.reveal-stagger > *{ opacity:1; transform:none; }
html.has-js .reveal-stagger > *{ opacity:0; transform:translateY(22px); transition:opacity .7s ease, transform .7s ease; }
html.has-js .reveal-stagger.in-view > *{ opacity:1; transform:translateY(0); }
.reveal-stagger.in-view > *:nth-child(1){ transition-delay:.05s; }
.reveal-stagger.in-view > *:nth-child(2){ transition-delay:.15s; }
.reveal-stagger.in-view > *:nth-child(3){ transition-delay:.25s; }
.reveal-stagger.in-view > *:nth-child(4){ transition-delay:.35s; }

/* ---------- gold ornament divider (used sparingly, twice) ---------- */
.ornament{ display:flex; align-items:center; justify-content:center; gap:14px; }
.ornament .line{ height:1px; width:56px; background:linear-gradient(90deg,transparent,var(--gold)); }
.ornament .line.right{ background:linear-gradient(90deg,var(--gold),transparent); }
.ornament svg{ width:16px; height:16px; color:var(--gold); }

/* ---------- buttons ---------- */
.btn{
  display:inline-flex; align-items:center; gap:10px; padding:17px 32px;
  font-family:var(--sans); font-weight:700; font-size:14.5px; letter-spacing:.2px;
  border-radius:3px; border:1px solid transparent; cursor:pointer; position:relative;
  transition:box-shadow .3s ease, background .3s ease, color .3s ease, border-color .3s ease;
  will-change:transform;
}
.btn-primary{ background:var(--royal); color:#fff; box-shadow:0 14px 30px -14px rgba(31,61,52,.55); }
.btn-primary:hover{ background:var(--royal-deep); box-shadow:0 18px 36px -12px rgba(31,61,52,.65); }
.btn-gold{ background:linear-gradient(135deg,#CBA35D,var(--gold-deep)); color:#fff; box-shadow:0 14px 30px -14px rgba(156,122,56,.6); }
.btn-gold:hover{ box-shadow:0 18px 36px -12px rgba(156,122,56,.7); }
.btn-line{ background:transparent; color:var(--royal-deep); border-color:var(--royal-deep); }
.btn-line:hover{ background:var(--royal-deep); color:#fff; }
.btn-line-light{ background:transparent; color:#fff; border-color:rgba(255,255,255,.45); }
.btn-line-light:hover{ background:rgba(255,255,255,.12); border-color:#fff; }
.btn-text{ display:inline-flex; align-items:center; gap:8px; font-weight:700; font-size:14.5px; color:var(--royal-deep); }
.btn-text .arrow{ transition:transform .25s ease; margin-left:8px; }
.btn-text:hover .arrow{ transform:translateX(4px); }

/* ---------- floating pill nav ---------- */
.site-header{ position:sticky; top:18px; z-index:100; padding:0 24px; }
.nav{
  max-width:var(--container); margin:0 auto; display:flex; align-items:center; justify-content:space-between;
  background:rgba(251,247,239,.78); -webkit-backdrop-filter:blur(16px); backdrop-filter:blur(16px); border:1px solid rgba(255,255,255,.6);
  border-radius:60px; padding:12px 14px 12px 26px; box-shadow:0 18px 40px -22px rgba(20,40,31,.35);
  transition:box-shadow .3s ease, background .3s ease;
}
.site-header.scrolled .nav{ box-shadow:0 22px 46px -20px rgba(20,40,31,.45); background:rgba(251,247,239,.92); }
.logo img{ height:30px; width:auto; }
.nav-links{ display:flex; align-items:center; gap:4px; }
.nav-links a{
  font-size:14.5px; font-weight:600; color:var(--ink-soft); padding:9px 18px; border-radius:30px;
  transition:background .2s ease, color .2s ease;
}
.nav-links a:hover{ background:var(--royal-soft); color:var(--royal-deep); }
.nav-links a.active{ background:var(--royal); color:#fff; }
.nav-cta{ display:flex; align-items:center; gap:10px; }
.nav-links a, .nav-cta .btn{ white-space:nowrap; }
.nav-toggle{ display:none; }

/* ---------- hero ---------- */
.hero{ position:relative; padding:76px 0 110px; overflow:hidden; }
.hero-glow{ position:absolute; top:-160px; right:-120px; width:560px; height:560px; border-radius:50%; background:radial-gradient(circle,rgba(185,146,77,.16),transparent 70%); pointer-events:none; z-index:0; }
.hero .wrap{ display:grid; grid-template-columns:1.1fr .9fr; gap:64px; align-items:center; z-index:1; }
.hero-eyebrow{ display:inline-flex; align-items:center; gap:10px; font-size:12.5px; letter-spacing:2px; text-transform:uppercase; color:var(--gold-deep); font-weight:700; margin-bottom:26px; }
.hero-eyebrow .dot{ width:5px; height:5px; border-radius:50%; background:var(--gold); margin-right:10px; }
.hero h1{
  font-size:clamp(38px,5vw,60px); line-height:1.1; font-weight:600; max-width:13ch;
}
.hero h1 em{ font-style:italic; font-weight:500; color:var(--royal); position:relative; }
.hero-sub{ margin-top:28px; font-size:18.5px; color:var(--ink-soft); max-width:46ch; line-height:1.8; }
.hero-actions{ display:flex; align-items:center; gap:24px; margin-top:40px; flex-wrap:wrap; }
.hero-actions > *{ margin-right:24px; }
.hero-actions > *:last-child{ margin-right:0; }

.hero-art{ position:relative; }
.hero-frame{
  position:relative; border-radius:24px; overflow:hidden; background:var(--royal-soft);
  border:1px solid var(--line); box-shadow:0 40px 80px -34px rgba(20,40,31,.35);
  padding:8px;
}
.hero-frame-inner{ border-radius:18px; overflow:hidden; aspect-ratio:5/6; }
.hero-frame-inner img{ width:100%; height:100%; object-fit:cover; display:block; }


/* ---------- section shell ---------- */
section{ padding:116px 0; position:relative; }
.section-ivory{ background:var(--ivory); }
.section-white{ background:var(--paper); }
.section-royal{ background:var(--royal-deep); }
.section-head{ max-width:600px; }
.section-head.center{ margin-left:auto; margin-right:auto; text-align:center; }
.section-head .kicker{ font-size:12.5px; letter-spacing:2px; text-transform:uppercase; color:var(--gold-deep); font-weight:700; }
.section-head h2{ font-size:clamp(28px,3.2vw,42px); margin-top:16px; line-height:1.25; }
.section-royal .section-head h2, .section-royal .section-head p{ color:#fff; }
.section-royal .section-head .kicker{ color:var(--gold); }
.section-head p{ color:var(--ink-soft); font-size:17px; margin-top:18px; }

/* ---------- about ---------- */
.about-grid{ display:grid; grid-template-columns:1fr 1fr; gap:80px; align-items:center; }
.about-copy p{ font-size:17.5px; color:var(--ink-soft); line-height:1.85; }
.about-copy p + p{ margin-top:18px; }
.about-art{ position:relative; background:var(--paper); border-radius:24px; padding:48px 44px; border:1px solid var(--line); box-shadow:0 30px 60px -30px rgba(20,40,31,.2); }
.about-art .quote-mark{ font-family:var(--display); font-size:80px; line-height:1; color:var(--gold-soft); position:absolute; top:14px; left:32px; }
.about-art p{ font-family:var(--display); font-style:italic; font-size:25px; color:var(--royal-deep); line-height:1.55; position:relative; z-index:1; }
.about-art cite{ display:block; margin-top:22px; font-style:normal; font-family:var(--sans); font-size:13px; letter-spacing:.4px; text-transform:uppercase; color:var(--ink-soft); font-weight:700; }

/* ---------- value grid: elevated tiles ---------- */
.value-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:24px; }
.value-card{
  background:var(--paper); border-radius:20px; padding:36px 28px; border:1px solid var(--line);
  transition:transform .3s cubic-bezier(.16,.8,.24,1), box-shadow .3s ease, border-color .3s ease;
}
.value-card:hover{ transform:translateY(-8px); box-shadow:0 30px 50px -24px rgba(20,40,31,.28); border-color:var(--gold-soft); }
.value-card .icon{
  width:54px; height:54px; border-radius:14px; background:linear-gradient(135deg,var(--royal-soft),#fff); color:var(--royal);
  display:flex; align-items:center; justify-content:center; margin-bottom:22px; border:1px solid var(--line);
}
.value-card .icon svg{ width:25px; height:25px; }
.value-card h3{ font-size:18.5px; font-weight:600; }
.value-card p{ margin-top:11px; font-size:14.5px; color:var(--ink-soft); line-height:1.65; }

/* ---------- motto statement ---------- */
.motto-wrap{ position:relative; overflow:hidden; }
.motto-dots{ position:absolute; inset:0; opacity:.5; background-image:radial-gradient(circle,rgba(185,146,77,.35) 1px,transparent 1.5px); background-size:26px 26px; }
.motto-statement{ text-align:center; padding:100px 0; position:relative; z-index:1; }
.motto-statement .icon{
  width:58px; height:58px; border-radius:50%; border:1px solid rgba(185,146,77,.5); color:var(--gold);
  display:flex; align-items:center; justify-content:center; margin:0 auto 32px; background:rgba(185,146,77,.08);
}
.motto-statement .icon svg{ width:26px; height:26px; }
.motto-words{
  font-family:var(--display); font-style:italic; font-weight:500; font-size:clamp(30px,4.4vw,54px); color:#F7F1E3;
  margin:0 auto; line-height:1.3; display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:24px;
}
.motto-words > *{ margin-right:24px; }
.motto-words > *:last-child{ margin-right:0; }
.motto-words .motto-sep{ display:inline-flex; align-items:center; color:var(--gold); }
.motto-words .motto-sep svg{ width:18px; height:18px; }
.motto-statement .byline{ margin-top:30px; font-family:var(--sans); font-style:normal; font-size:13px; letter-spacing:1px; text-transform:uppercase; color:#A6B1C0; font-weight:700; }

/* ---------- location ---------- */
.hl-grid{ display:grid; grid-template-columns:.85fr 1.15fr; gap:24px; align-items:start; }
.hl-panel{ background:var(--paper); border:1px solid var(--line); border-radius:22px; padding:46px; box-shadow:0 24px 50px -30px rgba(20,40,31,.18); }
.hl-panel h3{ font-size:20px; margin-bottom:26px; font-weight:600; }
.addr-line{ display:flex; gap:14px; font-size:15px; color:var(--ink-soft); margin-bottom:24px; }
.addr-line svg{ width:19px; height:19px; flex:none; color:var(--gold-deep); margin-top:2px; }
.map-embed{ border-radius:18px; overflow:hidden; height:280px; border:1px solid var(--line); }
.map-embed iframe{ width:100%; height:280px; border:0; display:block; filter:sepia(.08) saturate(.92); }

/* ---------- page hero (contact page) ---------- */
.page-hero{ position:relative; padding:84px 0 60px; overflow:hidden; }
.page-hero .wrap{ position:relative; z-index:1; }
.page-hero .hero-eyebrow{ margin-bottom:22px; }
.page-hero h1{ font-size:clamp(34px,4.4vw,50px); font-weight:600; max-width:16ch; }
.page-hero p{ margin-top:22px; font-size:18px; color:var(--ink-soft); max-width:52ch; line-height:1.8; }

/* ---------- contact form ---------- */
.contact-form{ background:var(--paper); border:1px solid var(--line); border-radius:22px; padding:46px; box-shadow:0 24px 50px -30px rgba(20,40,31,.18); }
.contact-form h3{ font-size:20px; margin-bottom:8px; font-weight:600; }
.contact-form .sub{ color:var(--ink-soft); font-size:14.5px; margin-bottom:30px; }
.field{ margin-bottom:22px; }
.field label{ display:block; font-size:13px; font-weight:700; letter-spacing:.2px; color:var(--royal-deep); margin-bottom:9px; }
.field input, .field select, .field textarea{
  width:100%; padding:14px 16px; border:1.5px solid var(--line); border-radius:10px;
  font-family:var(--sans); font-size:15px; background:var(--ivory); color:var(--ink);
  transition:border-color .2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus{ border-color:var(--gold); outline:none; }
.field-row{ display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.form-note{ font-size:12.5px; color:var(--ink-soft); margin-top:14px; }
.form-success{
  display:none; background:var(--royal-soft); border:1px solid var(--royal); color:var(--royal-deep);
  padding:16px 18px; border-radius:12px; font-size:14.5px; margin-top:18px; align-items:center; gap:10px;
}
.form-success.show{ display:flex; }
.form-success svg{ width:18px; height:18px; color:var(--royal); flex:none; }
.form-error{ display:none; background:#FBECEC; border:1px solid #B42318; color:#7A1A12; padding:16px 18px; border-radius:12px; font-size:14.5px; margin-top:18px; }
.form-error.show{ display:block; }
.form-error a{ text-decoration:underline; font-weight:700; }
.hp-field{ position:absolute !important; left:-9999px !important; width:1px; height:1px; overflow:hidden; }
.btn[disabled]{ opacity:.7; cursor:wait; }
.footer-contact a:hover{ color:var(--gold); }

/* ---------- CTA ---------- */
.cta-band{ background:var(--ivory); color:var(--ink); text-align:center; padding:104px 0; position:relative; overflow:hidden; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.cta-band .motto-dots{ opacity:0; }
.cta-band h2{ color:var(--royal-deep); font-size:clamp(30px,3.6vw,44px); max-width:18ch; margin:0 auto; position:relative; z-index:1; }
.cta-band .ornament{ margin-top:22px; position:relative; z-index:1; }
.cta-band p{ color:var(--ink-soft); margin-top:22px; font-size:17px; position:relative; z-index:1; }
.cta-band .hero-actions{ justify-content:center; margin-top:38px; position:relative; z-index:1; }

/* ---------- footer ---------- */
footer{ background:var(--royal-deep); color:#A6B1C0; padding:70px 0 30px; border-top:1px solid rgba(185,146,77,.25); }
.footer-grid{ display:grid; grid-template-columns:1.3fr 1fr 1fr; gap:48px; }
.footer-grid h4{ color:#fff; font-size:14px; font-weight:700; letter-spacing:.3px; margin-bottom:20px; }
.footer-about img{ height:28px; filter:brightness(0) invert(1); opacity:.95; }
.footer-about p{ font-size:14px; margin-top:18px; max-width:32ch; color:#8B96A3; line-height:1.7; }
.footer-links li{ margin-bottom:13px; font-size:14.5px; }
.footer-links a:hover{ color:var(--gold); }
.footer-contact li{ margin-bottom:16px; font-size:14.5px; display:flex; gap:11px; }
.footer-contact svg{ width:16px; height:16px; flex:none; color:var(--gold); margin-top:3px; }
.footer-bottom{
  margin-top:54px; padding-top:26px; border-top:1px solid rgba(255,255,255,.08);
  display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px; font-size:12.5px; color:#5E6878;
}

/* ---------- scroll progress + to-top ---------- */
.scroll-progress{ position:fixed; top:0; left:0; height:3px; background:linear-gradient(90deg,var(--gold),var(--royal)); z-index:200; width:0%; }
.to-top{
  position:fixed; bottom:28px; right:28px; width:50px; height:50px; border-radius:16px;
  background:var(--royal); color:#fff; display:flex; align-items:center; justify-content:center;
  box-shadow:0 16px 34px -12px rgba(20,40,31,.55); opacity:0; pointer-events:none; transform:translateY(10px) scale(.9);
  transition:opacity .3s ease, transform .3s ease; z-index:90; border:0; cursor:pointer;
}
.to-top.show{ opacity:1; pointer-events:auto; transform:translateY(0) scale(1); }
.to-top svg{ width:20px; height:20px; }

/* ---------- WordPress admin bar (logged-in only) ---------- */
@media screen and (min-width: 783px){ .admin-bar .site-header{ top:50px; } }
@media screen and (min-width: 601px) and (max-width: 782px){ .admin-bar .site-header{ top:64px; } }

/* ---------- responsive ---------- */
@media (max-width: 980px){ .value-grid{ grid-template-columns:repeat(2,1fr); } }
@media (max-width: 900px){
  .hero .wrap{ grid-template-columns:1fr; gap:50px; }
  .hero-art{ order:-1; max-width:420px; margin:0 auto 20px; }
  .about-grid{ grid-template-columns:1fr; gap:44px; }
  .hl-grid{ grid-template-columns:1fr; }
  .footer-grid{ grid-template-columns:1fr 1fr; }
}
/* tablet + phone: slide-in menu (inline menu needs >900px to fit) */
@media (max-width: 900px){
  .nav{ padding:10px 10px 10px 20px; border-radius:40px; -webkit-backdrop-filter:none; backdrop-filter:none; background:rgba(251,247,239,.96); }
  .site-header.scrolled .nav{ background:rgba(251,247,239,.98); }
  .nav-links{
    position:fixed; inset:0 0 0 auto; width:78%; max-width:320px; height:100vh;
    background:var(--paper); flex-direction:column; align-items:flex-start;
    padding:100px 32px 32px; gap:6px; transform:translateX(100%); transition:transform .3s ease;
    box-shadow:-8px 0 30px rgba(0,0,0,.15); border-radius:24px 0 0 24px;
    z-index:50; visibility:hidden; transition:transform .3s ease, visibility 0s linear .3s;
  }
  .nav-links.open{ transform:translateX(0); visibility:visible; transition:transform .3s ease, visibility 0s; }
  .nav-links a{ width:100%; color:var(--ink); }
  .nav-links a.active{ background:var(--royal); color:#fff; }
  .nav-toggle{ display:flex; flex-direction:column; gap:5px; background:none; border:0; cursor:pointer; padding:8px; z-index:60; }
  .nav-toggle span{ display:block; width:20px; height:1.5px; background:var(--royal-deep); transition:transform .25s ease, opacity .25s ease; }
  .nav-toggle.open span:nth-child(1){ transform:translateY(6.5px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2){ opacity:0; }
  .nav-toggle.open span:nth-child(3){ transform:translateY(-6.5px) rotate(-45deg); }
  .nav-scrim{ display:none; position:fixed; inset:0; background:rgba(20,40,31,.45); z-index:45; }
  .nav-scrim.show{ display:block; }
  .nav-cta .btn{ display:none; }
}
@media (max-width: 680px){
  .wrap{ padding:0 20px; }
  .site-header{ top:12px; padding:0 14px; }
  .logo img{ height:24px; }
  .value-grid{ grid-template-columns:1fr; }
  .footer-grid{ grid-template-columns:1fr; gap:32px; }
  section{ padding:72px 0; }
  .motto-statement{ padding:64px 0; }
  .field-row{ grid-template-columns:1fr; }
  .page-hero{ padding:56px 0 40px; }
  .to-top{ right:16px; bottom:16px; }
}
