/* =========================================================
   CareerWorks Academy - styles
   Edit colours in :root. Sections: base, header, buttons,
   hero, sections, cards, forms, footer, animations.
   ========================================================= */

:root {
  /* Brand (from the logo) */
  --navy: #12233F;
  --blue: #0457D3;
  /* Palette built from the brand colours */
  --tint: #EAF1FD;
  --offwhite: #F7F9FC;
  --white: #fff;
  --text: #12233F;
  --muted: #5A6B85;
  --line: rgba(18, 35, 63, .10);
  --grad: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);

  --radius: 20px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(18, 35, 63, .06), 0 4px 12px rgba(18, 35, 63, .05);
  --shadow-md: 0 2px 4px rgba(18, 35, 63, .05), 0 12px 32px rgba(18, 35, 63, .09);
  --shadow-lg: 0 4px 8px rgba(18, 35, 63, .06), 0 24px 56px rgba(18, 35, 63, .16);

  --ease: cubic-bezier(.22, 1, .36, 1);
  --header-h: 72px;
  --font-head: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  overflow-x: hidden;
  animation: pageIn .6s var(--ease) backwards;
}
body.leaving { opacity: 0; transition: opacity .3s var(--ease); }
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }

img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-head); color: var(--navy); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.8rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; color: var(--muted); }
ol, ul { margin: 0; padding: 0; }

.container { width: min(1160px, 100% - 40px); margin-inline: auto; }
.center { text-align: center; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 200; }
.skip-link:focus { top: 12px; }

/* ---------- Header (liquid glass) ---------- */
.site-header { position: sticky; top: 0; z-index: 100; padding: 12px 0; }
.header-glass {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h);
  padding: 0 14px 0 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 6px 24px rgba(18, 35, 63, .08);
  transition: background .35s var(--ease), box-shadow .35s var(--ease);
}
.site-header.scrolled .header-glass {
  background: rgba(255, 255, 255, .8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 10px 32px rgba(18, 35, 63, .16);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--navy); }
.brand:hover { text-decoration: none; }
.brand img { height: 42px; width: auto; }
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: 1.1rem; letter-spacing: -.01em; line-height: 1; white-space: nowrap; }
.brand-name .blue { color: var(--blue); }
.brand-name small { display: block; margin-top: 3px; font-size: .62rem; font-weight: 700; letter-spacing: .32em; color: var(--navy); }

.site-nav { position: relative; display: flex; align-items: center; gap: 4px; }
.nav-link {
  position: relative; z-index: 1;
  padding: 10px 20px; border-radius: 999px;
  font-family: var(--font-head); font-weight: 600; font-size: .95rem;
  color: var(--navy);
  transition: color .25s var(--ease);
}
.nav-link:hover { text-decoration: none; }
.nav-link.active { color: var(--blue); }
/* Glass page indicator: glides behind the active / hovered link */
.nav-indicator {
  position: absolute; left: 0; top: 0; height: 100%; width: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(4, 87, 211, .12));
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: inset 0 1px 0 #fff, 0 4px 14px rgba(4, 87, 211, .18);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  backdrop-filter: blur(10px) saturate(160%);
  opacity: 0;
  transition: transform .45s var(--ease), width .45s var(--ease), opacity .3s;
  pointer-events: none;
}
.nav-indicator.ready { opacity: 1; }

.nav-toggle { display: none; }
.glass-btn {
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer; padding: 0;
  background: rgba(255, 255, 255, .7);
  border: 1px solid rgba(255, 255, 255, .85);
  box-shadow: inset 0 1px 0 #fff, 0 3px 10px rgba(18, 35, 63, .1);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.bars { position: relative; display: block; width: 20px; height: 14px; margin: auto; }
.bars i { position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: var(--navy); transition: transform .35s var(--ease), opacity .2s; }
.bars i:nth-child(1) { top: 0; } .bars i:nth-child(2) { top: 6px; } .bars i:nth-child(3) { top: 12px; }
.nav-open .bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-open .bars i:nth-child(2) { opacity: 0; }
.nav-open .bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 820px) {
  :root { --header-h: 64px; }
  .nav-toggle { display: grid; place-items: center; }
  .brand img { height: 36px; }
  .brand-name { font-size: 1rem; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: calc(100% + 10px);
    flex-direction: column; align-items: stretch; gap: 4px; padding: 12px;
    border-radius: var(--radius-lg);
    /* Nested backdrop-filter does not blur the page behind, so the panel is near-opaque */
    background: rgba(255, 255, 255, .95);
    border: 1px solid rgba(255, 255, 255, .75);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 16px 40px rgba(18, 35, 63, .18);
    opacity: 0; transform: translateY(-12px) scale(.98); visibility: hidden; pointer-events: none;
    transition: opacity .3s var(--ease), transform .35s var(--ease), visibility 0s .35s;
  }
  .nav-open .site-nav { opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition-delay: 0s; }
  .nav-link { padding: 14px 18px; text-align: left; }
  .nav-link.active { background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(4,87,211,.12)); box-shadow: inset 0 1px 0 #fff; }
  .nav-indicator { display: none; }
}
@media (max-width: 380px) { .brand-name small { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 28px; border-radius: 999px; border: 1.5px solid transparent;
  font-family: var(--font-head); font-weight: 700; font-size: .98rem; cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 22px rgba(4, 87, 211, .32); }
.btn-primary:hover { box-shadow: 0 12px 30px rgba(4, 87, 211, .42); }
.btn-ghost { background: rgba(255, 255, 255, .7); color: var(--navy); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-outline { background: var(--tint); color: var(--blue); width: 100%; }
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.center-row { justify-content: center; }

/* ---------- Hero & page hero ---------- */
.hero, .page-hero { position: relative; overflow: hidden; margin-top: calc(-1 * (var(--header-h) + 24px)); padding-top: calc(var(--header-h) + 24px); background: var(--offwhite); }
.hero { padding-bottom: 72px; }
.page-hero { padding-bottom: 56px; }
.hero > .container, .page-hero > .container { position: relative; z-index: 1; }
.page-hero > .container { padding-top: 56px; }
.hero-grid { display: grid; gap: 40px; align-items: center; padding-top: 48px; }
.eyebrow { font-family: var(--font-head); font-weight: 700; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); margin-bottom: 14px; }
.lead { font-size: 1.1rem; max-width: 56ch; }
.tagline { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: var(--navy); }
.hero-visual { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4 / 3; background: var(--tint); }
.hero-visual img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.1fr .9fr; gap: 64px; } }

/* Drifting blurred blobs */
.blobs { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .35; will-change: transform; }
.b1 { width: 420px; height: 420px; background: var(--blue); top: -120px; right: -80px; animation: drift1 22s ease-in-out infinite alternate; }
.b2 { width: 360px; height: 360px; background: var(--navy); bottom: -140px; left: -100px; opacity: .22; animation: drift2 26s ease-in-out infinite alternate; }
.b3 { width: 280px; height: 280px; background: var(--blue); bottom: 10%; right: 30%; opacity: .2; animation: drift3 30s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(-90px, 70px) scale(1.15); } }
@keyframes drift2 { to { transform: translate(110px, -60px) scale(1.1); } }
@keyframes drift3 { to { transform: translate(-70px, -50px) scale(.9); } }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section.tint { background: var(--tint); }
.section-head { max-width: 640px; margin-bottom: 40px; }
.stats { padding: 0; margin-top: -36px; position: relative; z-index: 2; }
.page-about .stats, .page-sustainability .stats, .stats.flat { margin-top: 0; padding: 72px 0; }

/* Glass cards */
.glass-card {
  background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 1px 0 #fff, var(--shadow-md);
}
.stats-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
.stat { padding: 28px 16px; text-align: center; }
.stat-num { font-family: var(--font-head); font-weight: 800; font-size: clamp(2rem, 6vw, 3rem); line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.stat-label { margin-top: 10px; color: var(--muted); font-weight: 500; font-size: .95rem; }
@media (min-width: 800px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }

/* Features */
.why-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .why-grid { grid-template-columns: repeat(4, 1fr); } }
.feature { padding: 28px; border-radius: var(--radius); background: var(--offwhite); border: 1px solid var(--line); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature p { margin: 0; }
.feature-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--tint); color: var(--blue); margin-bottom: 18px; }
.feature-icon .icon { width: 26px; height: 26px; }

/* Split / mission */
.split { display: grid; gap: 40px; align-items: center; }
.split-media { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4 / 3; background: var(--tint); }
.split-media img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 64px; } }
.mv-grid { display: grid; gap: 20px; }
.mv { padding: 36px; }
.mv p { margin: 0; }
@media (min-width: 800px) { .mv-grid { grid-template-columns: 1fr 1fr; } }

/* Checklist + call-to-action banner (Home) */
.checklist { list-style: none; display: grid; gap: 12px; margin: 20px 0 28px; }
.checklist li { display: flex; align-items: center; gap: 12px; color: var(--navy); font-weight: 500; }
.checklist .icon { flex: none; width: 26px; height: 26px; padding: 5px; border-radius: 50%; background: var(--blue); color: #fff; stroke-width: 2.6; }
.cta-banner { position: relative; overflow: hidden; text-align: center; padding: 56px 24px; border-radius: var(--radius-lg); background: var(--grad); box-shadow: var(--shadow-lg); }
.cta-banner > *:not(.blobs) { position: relative; z-index: 1; }
.cta-banner h2 { color: #fff; }
.cta-banner p { color: rgba(255, 255, 255, .85); max-width: 52ch; margin-inline: auto; margin-bottom: 24px; }
.cta-banner .blob { opacity: .35; background: #fff; }
.btn-light { background: #fff; color: var(--navy); box-shadow: 0 8px 22px rgba(0, 0, 0, .18); }
.btn-glass { background: rgba(255, 255, 255, .15); color: #fff; border-color: rgba(255, 255, 255, .45); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
@media (max-width: 520px) { .cta-banner { padding: 44px 20px; } .cta-banner .btn { width: 100%; } }

/* Home: FAQ accordion + contact list */
.faq-wrap { max-width: 820px; }
.faq { display: grid; gap: 12px; }
.faq details { background: var(--offwhite); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 22px; transition: box-shadow .3s var(--ease), background .3s; }
.faq details[open] { background: #fff; box-shadow: var(--shadow-md); }
.faq summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; font-family: var(--font-head); font-weight: 700; color: var(--navy); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--tint); color: var(--blue); font-size: 1.2rem; line-height: 1; transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 20px; }
.contact-list { list-style: none; display: grid; gap: 14px; margin: 20px 0 28px; }
.contact-list li { display: flex; align-items: flex-start; gap: 12px; color: var(--navy); overflow-wrap: anywhere; }
.contact-list .icon { flex: none; width: 36px; height: 36px; padding: 8px; border-radius: 12px; background: #fff; color: var(--blue); box-shadow: var(--shadow-sm); }
.contact-list li > span, .contact-list li > a { padding-top: 6px; }

/* Sustainability page: flipped split, timeline, directors */
@media (min-width: 900px) { .split.flip .split-media { order: -1; } }
.section-head p:last-child { margin-bottom: 0; }
.timeline { list-style: none; position: relative; max-width: 760px; margin-inline: auto; padding-left: 34px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--blue), rgba(4, 87, 211, .15)); }
.timeline li { position: relative; padding-bottom: 32px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline .dot { position: absolute; left: -34px; top: 4px; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 5px solid var(--blue); box-shadow: 0 0 0 5px var(--tint); }
.timeline h3 { margin-bottom: 6px; }
.timeline p { margin: 0; }

.directors .section-head { margin-bottom: 56px; }
.director { display: grid; gap: 28px; align-items: center; margin-bottom: 64px; }
.director:last-child { margin-bottom: 0; }
.director-photo { order: -1; width: min(100%, 360px); margin-inline: auto; aspect-ratio: 5 / 6; border-radius: var(--radius-lg); overflow: hidden; background: linear-gradient(160deg, var(--tint), #d6e4fb); box-shadow: var(--shadow-lg); display: grid; place-items: end center; }
.director-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.director-photo svg { width: 78%; fill: var(--blue); opacity: .35; }
.director-text h3 { font-size: clamp(1.5rem, 3.5vw, 2rem); margin-bottom: 4px; }
.director-text .role { color: var(--blue); font-weight: 600; margin-bottom: 16px; }
@media (min-width: 900px) {
  .director { grid-template-columns: 1.15fr .85fr; gap: 64px; }
  .director-photo { order: 0; width: 100%; max-width: 380px; margin: 0 0 0 auto; }   /* photo on the right */
  .director.photo-left { grid-template-columns: .85fr 1.15fr; }
  .director.photo-left .director-photo { order: -1; margin: 0 auto 0 0; }         /* photo on the left */
}

/* Process steps */
.steps { list-style: none; display: grid; gap: 20px; counter-reset: s; position: relative; }
.step { padding: 28px; border-radius: var(--radius); background: var(--offwhite); border: 1px solid var(--line); position: relative; }
.step p { margin: 0; }
.step-num { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--grad); color: #fff; font-family: var(--font-head); font-weight: 800; margin-bottom: 16px; box-shadow: 0 6px 16px rgba(4, 87, 211, .3); }
@media (min-width: 600px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
  .step:not(:last-child)::after { content: ""; position: absolute; top: 50px; left: calc(100% - 4px); width: 28px; height: 2px; background: var(--blue); opacity: .35; }
}

/* ---------- Course cards ---------- */
.course-grid { display: grid; gap: 24px; grid-template-columns: 1fr; margin-bottom: 32px; }
@media (min-width: 640px) { .course-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .course-grid { grid-template-columns: repeat(3, 1fr); } }
.section > .container.course-grid { margin-bottom: 0; }
.course-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--white); border-radius: var(--radius-lg); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.course-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.course-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--grad); }
.course-media img { width: 100%; height: 100%; object-fit: cover; }
.course-icon {
  position: absolute; left: 18px; bottom: -22px; z-index: 1;
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px;
  background: rgba(255, 255, 255, .9); color: var(--blue);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  transition: transform .5s var(--ease);
}
.course-media { overflow: visible; }
.course-media img { position: absolute; inset: 0; height: 100%; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.course-icon .icon { width: 26px; height: 26px; }
.course-card:hover .course-icon { transform: translateY(-5px) rotate(-8deg) scale(1.08); }
.course-body { display: flex; flex-direction: column; flex: 1; padding: 36px 24px 24px; }
.course-body p { flex: 1; }
.badge { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; margin-bottom: 12px; border-radius: 999px; background: var(--tint); color: var(--blue); font-size: .78rem; font-weight: 600; }
.badge .icon { width: 14px; height: 14px; stroke-width: 2.6; }

/* ---------- Contact ---------- */
.info-grid { display: grid; gap: 20px; }
@media (min-width: 800px) { .info-grid { grid-template-columns: repeat(3, 1fr); } }
.info { padding: 28px; }
.info p { margin: 0; overflow-wrap: anywhere; }
.contact-grid { display: grid; gap: 32px; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: 1fr 1fr; align-items: stretch; } }
.contact-form { background: var(--white); padding: 32px; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.field { margin-bottom: 16px; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--navy); }
input, select, textarea {
  width: 100%; padding: 13px 16px; font: inherit; color: var(--navy);
  background: var(--offwhite); border: 1.5px solid var(--line); border-radius: 14px;
  transition: border-color .25s, box-shadow .25s, background .25s;
}
textarea { resize: vertical; min-height: 130px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(4, 87, 211, .15); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #C73A3A; }
.error { margin: 6px 0 0; font-size: .85rem; color: #B42727; min-height: 0; }
.error:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form .btn { width: 100%; }
.spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: spin .7s linear infinite; }
.loading .spinner { display: inline-block; }
.loading { pointer-events: none; opacity: .85; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-status { margin: 16px 0 0; padding: 0 16px; border-radius: 14px; font-weight: 500; max-height: 0; overflow: hidden; opacity: 0; transform: translateY(6px); transition: opacity .4s var(--ease), transform .4s var(--ease), max-height .4s var(--ease), padding .4s var(--ease); }
.form-status.show { max-height: 120px; padding: 14px 16px; opacity: 1; transform: none; }
.form-status.ok { background: #E6F6EC; color: #17633A; }
.form-status.err { background: #FDECEC; color: #9B2222; }
.map { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); min-height: 360px; background: var(--tint); }
.map iframe { width: 100%; height: 100%; min-height: 360px; border: 0; display: block; }

/* ---------- 404 ---------- */
.notfound { padding: calc(var(--header-h) + 24px + 40px) 0 100px; }
.big-404 { font-family: var(--font-head); font-weight: 800; font-size: clamp(5rem, 22vw, 11rem); line-height: 1; margin: 0 0 8px; }
.notfound .lead { margin-inline: auto; }

/* ---------- Footer ---------- */
.site-footer { background: var(--grad); color: rgba(255, 255, 255, .85); padding: 64px 0 0; margin-top: 0; }
.site-footer p, .site-footer li { color: rgba(255, 255, 255, .85); }
.site-footer a { color: #fff; }
.site-footer h3 { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .1em; }
.site-footer ul { list-style: none; display: grid; gap: 10px; }
.footer-grid { display: grid; gap: 36px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.3fr .7fr 1.3fr; gap: 56px; } }
.footer-logo { display: inline-block; background: #fff; padding: 12px 18px; border-radius: 16px; box-shadow: var(--shadow-md); }
.footer-logo img { height: 52px; width: auto; }
.footer-brand p { margin-top: 18px; font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; color: #fff; }
.footer-bottom { margin-top: 48px; padding: 20px 0; border-top: 1px solid rgba(255, 255, 255, .18); font-size: .9rem; }
.footer-bottom p { margin: 0; }

/* ---------- Footer admin link ---------- */
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.admin-link { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; font-size: .8rem; font-weight: 600; color: rgba(255, 255, 255, .9) !important; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25); transition: background .25s, transform .25s var(--ease); }
.admin-link:hover { background: rgba(255, 255, 255, .22); transform: translateY(-1px); text-decoration: none; }
.admin-link .icon { width: 14px; height: 14px; }

/* ---------- Admin panel ---------- */
.admin-section { position: relative; overflow: hidden; padding: 40px 0 88px; background: var(--offwhite); min-height: 70vh; }
.admin-section > .container { position: relative; z-index: 1; }
.admin-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.admin-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 6px; }
.admin-sub { margin: 0; }
.btn-sm { padding: 10px 18px; font-size: .88rem; }
.btn-sm .icon { width: 18px; height: 18px; }
.btn-danger { background: #FDECEC; color: #B42727; border-color: #F6CACA; }
.btn-danger:hover { background: #C73A3A; color: #fff; border-color: #C73A3A; }

.admin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 28px; }
.astat { padding: 18px 12px; text-align: center; }
.astat-num { display: block; font-family: var(--font-head); font-weight: 800; font-size: clamp(1.6rem, 5vw, 2.4rem); line-height: 1.1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.astat-label { color: var(--muted); font-size: .85rem; font-weight: 500; }

.admin-tabs { display: inline-flex; gap: 4px; padding: 5px; margin-bottom: 24px; border-radius: 999px; background: rgba(255, 255, 255, .8); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.admin-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 999px; font-family: var(--font-head); font-weight: 700; font-size: .92rem; color: var(--navy); transition: background .25s, color .25s; }
.admin-tabs a:hover { text-decoration: none; background: var(--tint); }
.admin-tabs a.on { background: var(--grad); color: #fff; box-shadow: 0 6px 16px rgba(4, 87, 211, .3); }
.admin-tabs .icon { width: 18px; height: 18px; }
.admin-tabs span { min-width: 24px; padding: 1px 8px; border-radius: 999px; background: rgba(18, 35, 63, .08); font-size: .78rem; text-align: center; }
.admin-tabs a.on span { background: rgba(255, 255, 255, .25); }

.sub-list { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .sub-list { grid-template-columns: repeat(2, 1fr); } }
.sub-card { display: flex; flex-direction: column; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); transition: box-shadow .3s var(--ease), transform .3s var(--ease); }
.sub-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.sub-top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.avatar { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--grad); color: #fff; font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; }
.sub-who { flex: 1; min-width: 0; }
.sub-who h3 { margin: 0; font-size: 1.1rem; overflow-wrap: anywhere; }
.sub-who time { font-size: .82rem; color: var(--muted); }
.status-pill { flex: none; padding: 4px 12px; border-radius: 999px; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.status-pill.new { background: var(--tint); color: var(--blue); }
.status-pill.done { background: #E6F6EC; color: #17633A; }
.sub-meta { list-style: none; display: grid; gap: 8px; margin: 0 0 16px; padding: 14px 16px; background: var(--offwhite); border-radius: 14px; font-size: .92rem; color: var(--navy); }
.sub-meta li { display: flex; align-items: center; gap: 10px; overflow-wrap: anywhere; }
.sub-meta .icon { flex: none; width: 18px; height: 18px; color: var(--blue); }
.sub-msg { flex: 1; margin: 0 0 16px; padding: 0 2px; color: var(--navy); white-space: pre-wrap; overflow-wrap: anywhere; }
.sub-done-at { margin: -6px 0 14px; font-size: .82rem; color: #17633A; }
.sub-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.sub-actions form { margin: 0; }
.admin-empty { text-align: center; padding: 64px 20px; background: #fff; border: 1px dashed rgba(18, 35, 63, .18); border-radius: var(--radius-lg); }
.admin-empty .feature-icon { margin-inline: auto; }
.admin-empty h2 { font-size: 1.4rem; }
.admin-empty p { margin: 0; }

/* Login */
.login-section { display: grid; align-items: center; padding: 56px 0 96px; }
.login-card { max-width: 430px; margin-inline: auto; padding: 40px 32px; text-align: center; }
.login-card h1 { font-size: 1.9rem; }
.login-sub { margin-bottom: 24px; }
.lock-badge { display: grid; place-items: center; width: 68px; height: 68px; margin: 0 auto 18px; border-radius: 22px; background: var(--grad); color: #fff; box-shadow: 0 10px 26px rgba(4, 87, 211, .35); }
.lock-badge .icon { width: 32px; height: 32px; }
.login-card .field { text-align: left; }
.login-card .btn { width: 100%; }
.login-error { margin: 0 0 18px; padding: 12px 14px; border-radius: 12px; background: #FDECEC; color: #9B2222; font-weight: 500; font-size: .92rem; }
.login-back { display: inline-block; margin-top: 18px; font-size: .9rem; color: var(--muted); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 52px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); cursor: pointer; }
.pw-toggle:hover, .pw-toggle[aria-pressed="true"] { color: var(--blue); background: var(--tint); }
.pw-toggle .icon { width: 22px; height: 22px; }

/* Delete confirmation dialog */
.confirm-dialog { width: min(400px, calc(100% - 32px)); padding: 32px 28px; border: 0; border-radius: var(--radius-lg); text-align: center; color: var(--navy); box-shadow: var(--shadow-lg); }
.confirm-dialog::backdrop { background: rgba(18, 35, 63, .45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.confirm-dialog form { margin: 0; }
.confirm-dialog h2 { font-size: 1.3rem; }
.confirm-dialog p { margin-bottom: 22px; }
.dialog-icon { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 18px; background: #FDECEC; color: #C73A3A; }
.dialog-icon .icon { width: 28px; height: 28px; }
.dialog-actions { display: flex; justify-content: center; gap: 10px; }
@media (max-width: 520px) {
  .admin-stats { gap: 10px; }
  .admin-tabs { display: flex; }
  .admin-tabs a { flex: 1; justify-content: center; padding-inline: 10px; }
  .sub-actions .btn, .sub-actions form { flex: 1 1 100%; }
  .sub-actions .btn { width: 100%; }
}

/* ---------- Scroll-to-top ---------- */
.scroll-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 90;
  width: 44px; height: 44px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  display: grid; place-items: center; color: #fff; background: var(--navy);
  opacity: 0; transform: scale(.8); visibility: hidden; pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s .3s;
}
.scroll-top.show { opacity: .25; transform: none; visibility: visible; pointer-events: auto; transition-delay: 0s; }
.scroll-top.show:hover, .scroll-top.show:focus-visible { opacity: .6; }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease) var(--d, 0ms), transform .8s var(--ease) var(--d, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }
/* After revealing, hover transforms should be snappy */
.js .reveal.in.done { transition-delay: 0ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
