/* God's Heritage School — shared styles for the full-page portal screens
   (parent registration, parent login, student login). */

:root{
  --green-900:#0a5c33; --green-800:#0c6d3d; --green-700:#0F8A4B; --green-600:#159f58;
  --green-400:#3ecb84; --green-100:#e6f7ee; --gold:#d8ad4d;
  --ink:#0d1f16; --ink-soft:#3d4d45; --line:rgba(15,60,40,0.10);
  --page:#f6faf7; --card:#ffffff;
  --ease:cubic-bezier(.22,1,.36,1);
}

*{margin:0; padding:0; box-sizing:border-box;}
body{
  font-family:'Manrope',system-ui,-apple-system,'Segoe UI',sans-serif;
  background:var(--page); color:var(--ink); min-height:100vh;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4{font-family:'Fraunces',Georgia,serif; font-weight:600; line-height:1.2;}
a{color:inherit; text-decoration:none;}
button{font:inherit; border:none; background:none; cursor:pointer; color:inherit;}
.material-symbols-rounded{
  font-family:'Material Symbols Rounded'; font-weight:normal; font-style:normal; line-height:1;
  letter-spacing:normal; text-transform:none; display:inline-block; white-space:nowrap;
  direction:ltr; -webkit-font-feature-settings:'liga'; -webkit-font-smoothing:antialiased;
}

/* ---------- top bar ---------- */
.auth-top{
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding:16px 24px; border-bottom:1px solid var(--line); background:rgba(255,255,255,0.9);
  position:sticky; top:0; z-index:20; backdrop-filter:blur(12px); flex-wrap:wrap;
}
.auth-brand{display:flex; align-items:center; gap:11px; min-width:0;}
.auth-brand img{width:38px; height:38px; border-radius:11px; object-fit:cover; flex-shrink:0;}
.auth-brand-text strong{display:block; font-size:14.5px; font-weight:800; line-height:1.25;}
.auth-brand-text span{font-size:11.5px; color:var(--ink-soft); letter-spacing:0.04em;}
.auth-top-actions{display:flex; align-items:center; gap:8px; flex-wrap:wrap;}

.lang-select{
  padding:9px 12px; border-radius:11px; border:1px solid var(--line);
  background:#fff; font-size:13px; font-weight:600; color:var(--ink); cursor:pointer;
}
.lang-select:focus{outline:2px solid var(--green-400); outline-offset:1px;}

.voice-toggle{
  display:inline-flex; align-items:center; gap:7px; padding:9px 14px; border-radius:11px;
  border:1px solid var(--line); background:#fff; font-size:13px; font-weight:700; color:var(--ink-soft);
  transition:background .2s, color .2s, border-color .2s;
}
.voice-toggle .material-symbols-rounded{font-size:18px;}
.voice-toggle.on{background:var(--green-100); color:var(--green-700); border-color:rgba(15,138,75,0.25);}

.back-link{
  display:inline-flex; align-items:center; gap:6px; font-size:13px; font-weight:600; color:var(--ink-soft);
  padding:9px 12px; border-radius:11px; transition:background .2s;
}
.back-link:hover{background:var(--green-100); color:var(--green-700);}
.back-link .material-symbols-rounded{font-size:18px;}

/* ---------- layout ---------- */
.auth-wrap{
  max-width:1040px; margin:0 auto; padding:40px 24px 72px;
  display:grid; grid-template-columns:minmax(0,1fr) 340px; gap:32px; align-items:start;
}
.auth-card{
  background:var(--card); border:1px solid var(--line); border-radius:24px;
  padding:36px; box-shadow:0 14px 44px rgba(15,60,40,0.07);
}
.auth-head{margin-bottom:28px;}
.auth-head h1{font-size:clamp(26px,4vw,34px); margin-bottom:10px;}
.auth-head p{color:var(--ink-soft); font-size:15px; line-height:1.6;}

/* ---------- form ---------- */
.field{margin-bottom:18px;}
.field label{display:block; font-size:13.5px; font-weight:700; margin-bottom:7px;}
.field .req{color:#c0392b;}
.field .opt{font-weight:500; color:#8a978f;}
.field input{
  width:100%; padding:13px 15px; border-radius:13px; border:1.5px solid var(--line);
  font:inherit; font-size:15px; background:#fff; transition:border-color .2s;
}
.field input:focus{outline:none; border-color:var(--green-400);}
.field-2{display:grid; grid-template-columns:1fr 1fr; gap:14px;}

.pw-wrap{position:relative;}
.pw-wrap input{padding-right:52px;}
.pw-toggle{
  position:absolute; right:8px; top:50%; transform:translateY(-50%);
  width:38px; height:38px; border-radius:10px; display:flex; align-items:center; justify-content:center;
  color:var(--ink-soft);
}
.pw-toggle:hover{background:var(--green-100); color:var(--green-700);}
.pw-toggle .material-symbols-rounded{font-size:20px;}

.btn-main{
  width:100%; padding:15px 24px; border-radius:14px; font-size:15.5px; font-weight:800; color:#fff;
  background:linear-gradient(135deg,var(--green-600),var(--green-900));
  box-shadow:0 12px 26px rgba(15,138,75,0.26); transition:transform .2s var(--ease), opacity .2s;
  display:inline-flex; align-items:center; justify-content:center; gap:9px; margin-top:6px;
}
.btn-main:hover{transform:translateY(-2px);}
.btn-main:disabled{opacity:.6; transform:none; cursor:default;}

.auth-alt{margin-top:20px; font-size:14px; color:var(--ink-soft); text-align:center;}
.auth-alt a{color:var(--green-700); font-weight:700; text-decoration:underline;}
.forgot-row{text-align:center; margin-top:16px;}
.forgot-row button{font-size:13.5px; font-weight:700; color:var(--green-700); text-decoration:underline;}

.form-msg{display:none; padding:13px 15px; border-radius:13px; font-size:14px; margin-bottom:16px; line-height:1.5;}
.form-msg.show{display:block;}
.form-msg.error{background:#fdecea; border:1px solid #f5c6c0; color:#8c2f22;}
.form-msg.ok{background:var(--green-100); border:1px solid rgba(15,138,75,0.25); color:var(--green-800);}

/* ---------- guide ---------- */
.guide-card{
  background:#fff; border:1px solid var(--line); border-radius:22px; padding:24px;
  position:sticky; top:96px; box-shadow:0 10px 32px rgba(15,60,40,0.06);
}
.guide-card h2{font-size:19px; margin-bottom:6px;}
.guide-card > p{font-size:13.5px; color:var(--ink-soft); margin-bottom:16px;}
.guide-steps{list-style:none; counter-reset:step;}
.guide-steps li{
  counter-increment:step; position:relative; padding-left:38px; margin-bottom:16px;
  font-size:14px; line-height:1.6; color:var(--ink-soft);
}
.guide-steps li::before{
  content:counter(step); position:absolute; left:0; top:-1px;
  width:26px; height:26px; border-radius:9px; background:var(--green-100); color:var(--green-700);
  display:flex; align-items:center; justify-content:center; font-size:12.5px; font-weight:800;
  font-family:'Manrope',sans-serif;
}
.guide-listen{
  width:100%; margin-top:6px; padding:12px 16px; border-radius:12px; border:1px solid var(--line);
  background:var(--green-100); color:var(--green-700); font-size:13.5px; font-weight:700;
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
}
.guide-listen .material-symbols-rounded{font-size:19px;}
.guide-toggle{display:none;}

@media(max-width:900px){
  .auth-wrap{grid-template-columns:1fr; padding:26px 18px 60px;}
  /* Keep the top bar a single thin row: the brand shrinks and truncates
     rather than wrapping, and the back link keeps only its arrow. */
  .auth-top{flex-wrap:nowrap; padding:10px 12px; gap:8px;}
  .auth-brand{flex-shrink:1; min-width:0;}
  .auth-brand img{width:32px; height:32px; border-radius:9px;}
  .auth-brand-text{min-width:0; overflow:hidden;}
  .auth-brand-text strong{font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
  .auth-brand-text span{display:none;}
  .auth-top-actions{flex-wrap:nowrap; flex-shrink:0; gap:6px;}
  .lang-select{padding:7px 8px; font-size:12.5px;}
  .voice-toggle{padding:7px 9px;}
  .voice-toggle span:not(.material-symbols-rounded){display:none;}
  .back-link{padding:7px 8px;}
  .back-link span:not(.material-symbols-rounded){display:none;}
  .auth-card{padding:26px 20px; border-radius:20px;}
  .guide-card{position:static; order:-1; padding:20px;}
  /* On a phone the guide collapses so the form is reachable without scrolling. */
  .guide-toggle{
    display:inline-flex; align-items:center; justify-content:space-between; width:100%;
    font-size:14.5px; font-weight:800; color:var(--green-700);
  }
  .guide-toggle .material-symbols-rounded{transition:transform .25s var(--ease);}
  .guide-card:not(.open) .guide-body{display:none;}
  .guide-card:not(.open) h2, .guide-card:not(.open) > p{display:none;}
  .guide-card.open .guide-toggle .material-symbols-rounded{transform:rotate(180deg);}
  .field-2{grid-template-columns:1fr;}
  .auth-top{padding:12px 16px;}
}

/* ---------- input icons and the tick that confirms a filled field ---------- */
.input-wrap{position:relative;}
.input-wrap input{padding-left:42px;}
.field-icon{
  position:absolute; left:14px; top:50%; transform:translateY(-50%);
  color:var(--green-700); pointer-events:none; line-height:0;
}
.field-icon .material-symbols-rounded{font-size:19px;}
.input-wrap .tick{
  position:absolute; right:14px; top:50%; transform:translateY(-50%) scale(.4);
  color:var(--green-600); opacity:0; pointer-events:none; line-height:0;
  transition:opacity .25s, transform .25s var(--ease);
}
.input-wrap.valid .tick{opacity:1; transform:translateY(-50%) scale(1);}
.input-wrap .tick .material-symbols-rounded{font-size:20px; font-variation-settings:'FILL' 1;}
.pw-wrap .tick{right:52px;}
.pw-wrap input{padding-right:86px;}

/* ==========================================================================
   PORTAL STYLES
   Three different arrivals for the three roles, all in the school's white and
   green. The artwork is original SVG built for this site — the reference
   clips used licensed 3D characters we can't ship.
   ========================================================================== */

/* the non-drag styles keep their two-column grid: this wrapper is inert */
.plain-inner{display:contents;}
.auth-card.styled{padding:0; overflow:hidden; display:grid; grid-template-columns:280px minmax(0,1fr);}
.auth-card.styled .form-panel{padding:34px 34px 32px;}
@media(max-width:820px){
  .auth-card.styled{grid-template-columns:1fr;}
  .auth-card.styled .form-panel{padding:24px 20px 26px;}
}

/* ==========================================================================
   The portal artwork is deliberately still.
   These screens carried an animated arrival (the character walked on, hauled
   the form into place, the lamp switched itself on). It was dropped: it delayed
   people who log in every day, and on a phone there is no room for a figure to
   move across anything. The compositions below are the resting poses those
   sequences used to end on, so the pages look the same, minus the wait.
   ========================================================================== */

/* ==========================  STUDENT  ========================== */
.drag-stage{
  position:relative; min-height:auto; display:flex; justify-content:flex-end; align-items:flex-end;
}
.drag-stage .drag-card{
  position:relative; z-index:1; width:min(430px,100%);
  background:var(--card); border:1px solid var(--line); border-radius:24px;
  box-shadow:0 14px 44px rgba(15,60,40,0.09); padding:32px 30px;
}
.drag-stage .form-panel{padding:0;}
.drag-stage .drag-figure{
  position:absolute; left:34px; bottom:0; width:230px; z-index:2; pointer-events:none;
}
/* stands squarely, weight even */
.drag-stage .leg-back{transform:rotate(-6deg); transform-origin:111px 182px;}
.drag-stage .leg-front{transform:rotate(6deg); transform-origin:111px 182px;}
.drag-stage .shin-back{transform:rotate(3deg); transform-origin:111px 236px;}
.drag-stage .shin-front{transform:rotate(-3deg); transform-origin:111px 236px;}
.drag-stage .arm-near{transform:rotate(-8deg); transform-origin:136px 126px;}
.drag-stage .arm-far{transform:rotate(7deg); transform-origin:90px 126px;}

@media(max-width:900px){
  .drag-stage{flex-direction:column; align-items:center;}
  .drag-stage .drag-card{width:100%; order:1;}
  .drag-stage .drag-figure{position:relative; order:2; left:auto; width:132px; margin-top:16px;}
}

/* ==========================  PARENT  ========================== */
.style-greeting{background:linear-gradient(150deg, var(--green-700), var(--green-900));}
.style-greeting .greet-panel{position:relative; min-height:400px; overflow:hidden;}
.style-greeting .greet-figure{position:absolute; top:74px; left:calc(50% - 100px); width:200px;}
.style-greeting .leg-back{transform:rotate(-7deg); transform-origin:99px 170px;}
.style-greeting .leg-front{transform:rotate(7deg); transform-origin:99px 170px;}
.style-greeting .shin-back{transform:rotate(4deg); transform-origin:99px 220px;}
.style-greeting .shin-front{transform:rotate(-4deg); transform-origin:99px 220px;}
.style-greeting .arm-far{transform:rotate(6deg); transform-origin:78px 118px;}
/* hand raised in a settled wave rather than mid-swing */
.style-greeting .arm-wave{transform:rotate(-150deg); transform-origin:126px 118px;}
/* the bag rests on the ground beside her */
.style-greeting .bag{transform:translate(-14px, 74px) rotate(-6deg); transform-origin:55px 150px;}

.style-greeting .form-panel{background:transparent; color:#fff;}
.style-greeting .auth-head h1, .style-greeting .auth-head p{color:#fff;}
.style-greeting .auth-head p{opacity:.85;}
.style-greeting .field label{color:#eafff3;}
.style-greeting .field input{background:rgba(255,255,255,0.94); border-color:transparent;}
.style-greeting .field input:focus{border-color:var(--gold); background:#fff;}
.style-greeting .pw-toggle{color:var(--green-800);}
.style-greeting .btn-main{
  background:linear-gradient(135deg, var(--gold), #c1942f); color:#20180a;
  box-shadow:0 12px 26px rgba(216,173,77,0.35);
}
.style-greeting .auth-alt, .style-greeting .forgot-row button{color:#eafff3;}
.style-greeting .auth-alt a{color:#fff;}
.style-greeting .or-line{color:rgba(255,255,255,.7);}
.style-greeting .or-line::before, .style-greeting .or-line::after{background:rgba(255,255,255,.28);}
.style-greeting .btn-google{background:#fff; border-color:transparent;}
@media(max-width:820px){
  .style-greeting .greet-panel{min-height:186px;}
  .style-greeting .greet-figure{width:132px; top:28px; left:calc(50% - 66px);}
}

/* ==========================  TEACHER  ========================== */
/* the lamp is simply on */
.style-lamp .lamp-panel{
  position:relative; background:#f0fdf6; overflow:hidden;
  display:flex; align-items:flex-end; justify-content:center; min-height:400px;
}
.style-lamp .lamp-panel::before{
  content:""; position:absolute; inset:0; opacity:.5;
  background-image:radial-gradient(circle at 50% 50%, rgba(15,138,75,0.10) 1.5px, transparent 1.6px);
  background-size:18px 18px;
}
.style-lamp .lamp{position:absolute; top:0; left:50%; transform:translateX(-50%); z-index:2;}
.style-lamp .lamp-cord{
  display:block; width:2px; height:56px; margin:0 auto;
  background:linear-gradient(180deg, var(--green-700), var(--green-900));
}
.style-lamp .lamp-pull{display:none;}
.style-lamp .lamp-shade{
  display:block; width:0; height:0; margin:0 auto;
  border-left:34px solid transparent; border-right:34px solid transparent;
  border-bottom:30px solid var(--green-800); border-radius:4px;
  transform:rotate(180deg); filter:drop-shadow(0 4px 8px rgba(10,92,51,0.25));
}
.style-lamp .lamp-bulb{
  display:block; width:14px; height:14px; border-radius:50%; margin:-6px auto 0;
  background:#eafff3; box-shadow:0 0 22px 9px rgba(62,203,132,0.85);
}
.style-lamp .lamp-beam{
  position:absolute; top:86px; left:50%; transform:translateX(-50%);
  width:250px; height:330px; z-index:1;
  background:linear-gradient(180deg, rgba(62,203,132,0.42), rgba(62,203,132,0.10) 55%, transparent 85%);
  clip-path:polygon(42% 0, 58% 0, 100% 100%, 0 100%);
}
.style-lamp .mascot{position:relative; z-index:3; margin-bottom:34px; width:132px;}
@media(max-width:820px){
  .style-lamp .lamp-panel{min-height:200px;}
  .style-lamp .mascot{width:92px; margin-bottom:16px;}
  .style-lamp .lamp-beam{height:200px; width:190px;}
}

/* ==========================  Google / divider  ========================== */
.or-line{
  display:flex; align-items:center; gap:14px; margin:22px 0 16px;
  font-size:12.5px; font-weight:700; color:#8a978f; text-transform:lowercase;
}
.or-line::before, .or-line::after{content:""; flex:1; height:1px; background:var(--line);}
.btn-google{
  width:100%; display:inline-flex; align-items:center; justify-content:center; gap:10px;
  padding:13px 20px; border-radius:14px; border:1.5px solid var(--line); background:#fff;
  font-size:14.5px; font-weight:700; color:var(--ink); transition:border-color .2s, transform .2s var(--ease);
}
.btn-google:hover{border-color:var(--green-400); transform:translateY(-1px);}
.btn-google:disabled{opacity:.6; transform:none; cursor:default;}
.btn-google svg{width:19px; height:19px; flex-shrink:0;}

/* the "you registered with Google" explainer */
.form-msg.info{background:#eef6ff; border:1px solid #c8ddf5; color:#1d4e80;}

/* Policy links, kept quiet at the foot of every portal entry page. */
.portal-legal{
  display:flex; flex-wrap:wrap; justify-content:center; gap:6px 20px;
  padding:22px 20px 30px; font-size:12.5px;
}
.portal-legal a{color:var(--ink-soft); text-decoration:none;}
.portal-legal a:hover, .portal-legal a:focus-visible{color:var(--green-700); text-decoration:underline;}

/* Placeholders are hints, not content — keep them clearly lighter than a
   typed value so nobody mistakes one for a filled-in field. */
.field input::placeholder,
.field textarea::placeholder,
input::placeholder{
  color:#9aa8a0;
  opacity:1;              /* Firefox dims placeholders by default */
  font-weight:500;
}
