/* Mbarara Preparatory School — site styles */

:root {
    --blue: #1976D2;
    --blue-dark: #0D47A1;
    --blue-deep: #0A2F6B;
    --blue-soft: #E3F0FC;
    --blue-highlight: #60A5FA;
    --gradient: linear-gradient(135deg, #0D47A1 0%, #1976D2 100%);
    --gold: #F5C518;
    --gold-soft: #FEF6D8;
    --ink: #0F172A;
    --text: #334155;
    --muted: #64748B;
    --line: #E2E8F0;
    --surface: #FFFFFF;
    --surface-alt: #F1F5F9;
    --page: #F8FAFC;
    --radius: 20px;
    --radius-lg: 28px;
    --shadow: 0 18px 40px rgba(13, 71, 161, 0.10);
    --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.06);
    --serif: 'Fraunces', Georgia, serif;
    --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --wrap: 1180px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 84px;
}

body {
    margin: 0;
    background: var(--page);
    color: var(--text);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

a {
    color: var(--blue);
    text-decoration: none;
}

a:hover {
    color: var(--blue-dark);
}

h1,
h2,
h3,
h4 {
    font-family: var(--serif);
    color: var(--ink);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.01em;
    margin: 0 0 16px;
}

h1 {
    font-size: clamp(2.6rem, 5.6vw, 4.4rem);
}

h2 {
    font-size: clamp(2rem, 3.8vw, 3rem);
}

h3 {
    font-size: 1.35rem;
}

p {
    margin: 0 0 16px;
}

em.accent {
    font-style: italic;
    color: var(--blue);
    position: relative;
    white-space: nowrap;
}

em.accent::after {
    content: '';
    position: absolute;
    left: 2%;
    right: 2%;
    bottom: 0.02em;
    height: 0.16em;
    border-radius: 99px;
    background: var(--gold);
    opacity: 0.75;
    z-index: -1;
}

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 104px 0;
    position: relative;
}

.section-alt {
    background: var(--surface-alt);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 14px;
}

.eyebrow::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
}

.lead {
    font-size: 1.12rem;
    color: var(--muted);
    max-width: 560px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 40px;
    margin-bottom: 52px;
}

.section-head h2 {
    max-width: 560px;
    margin: 0;
}

.section-head .lead {
    margin: 0;
    max-width: 420px;
}

.section-head.center {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border-radius: 999px;
    padding: 14px 26px;
    font-family: var(--sans);
    font-weight: 600;
    font-size: 15px;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--blue);
    color: #fff;
    box-shadow: 0 10px 24px rgba(25, 118, 210, 0.28);
}

.btn-primary:hover {
    background: var(--blue-dark);
    color: #fff;
}

.btn-ghost {
    background: #fff;
    color: var(--ink);
    border-color: var(--line);
}

.btn-ghost:hover {
    color: var(--blue);
    border-color: var(--blue);
}

.btn-ghost .dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
}

.btn-light {
    background: #fff;
    color: var(--blue-dark);
}

.btn-light:hover {
    color: var(--blue);
}

.link-arrow {
    align-self: flex-start;
    font-weight: 600;
    font-size: 14.5px;
    border-bottom: 1.5px solid currentColor;
    padding-bottom: 2px;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(248, 250, 252, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-header.scrolled {
    border-color: var(--line);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
}

.brand img {
    width: 44px;
    height: 44px;
}

.brand span {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 18px;
    line-height: 1.1;
}

.brand small {
    display: block;
    font-family: var(--sans);
    font-weight: 500;
    font-size: 11.5px;
    color: var(--muted);
    letter-spacing: 0.04em;
}

.nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav a {
    color: var(--text);
    font-size: 14.5px;
    font-weight: 500;
}

.nav a:hover {
    color: var(--blue);
}

.nav .btn {
    color: #fff;
    padding: 11px 22px;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    font-size: 18px;
    cursor: pointer;
}

/* Hero */
.hero {
    padding: 56px 0 40px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 620px;
    height: 620px;
    right: -160px;
    top: -200px;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.22), transparent 65%);
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 56px;
    align-items: center;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 22px;
}

.chip i {
    color: var(--blue);
}

.hero h1 {
    margin-bottom: 22px;
}

.hero .lead {
    margin-bottom: 32px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 40px;
}

.hero-proof {
    display: flex;
    align-items: center;
    gap: 16px;
}

.avatars {
    display: flex;
}

.avatars img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--page);
    margin-left: -10px;
}

.avatars img:first-child {
    margin-left: 0;
}

.hero-proof strong {
    display: block;
    color: var(--ink);
    font-size: 15px;
}

.hero-proof span {
    font-size: 13.5px;
    color: var(--muted);
}

.collage {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    position: relative;
}

.tile {
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow);
}

.tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tile.tall {
    aspect-ratio: 4 / 5;
}

.tile.square {
    aspect-ratio: 1 / 1;
}

.collage-col {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.collage-col.offset {
    padding-top: 56px;
}

.tile-blue {
    background: var(--blue);
}

.tile-gold {
    background: var(--gold);
}

.float-badge {
    position: absolute;
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--muted);
    z-index: 2;
}

.float-badge b {
    display: block;
    color: var(--ink);
    font-size: 15px;
}

.float-badge .icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--gold-soft);
    color: #B7791F;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.float-badge.one {
    left: -26px;
    top: 44%;
}

.float-badge.two {
    right: -18px;
    bottom: 6%;
}

.float-badge.two .icon {
    background: var(--blue-soft);
    color: var(--blue);
}

/* Pillars strip */
.pillars {
    background: #fff;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.pillars .wrap {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.pillar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 30px 24px;
    border-left: 1px solid var(--line);
}

.pillar:first-child {
    border-left: none;
}

.pillar i {
    font-size: 26px;
    color: var(--blue);
}

.pillar strong {
    display: block;
    font-family: var(--serif);
    font-size: 19px;
    color: var(--ink);
    font-weight: 600;
}

.pillar span {
    font-size: 13.5px;
    color: var(--muted);
}

/* Plus-grid decoration */
.plus-grid {
    position: absolute;
    width: 220px;
    height: 220px;
    background-image:
        linear-gradient(var(--line) 1.5px, transparent 1.5px),
        linear-gradient(90deg, var(--line) 1.5px, transparent 1.5px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(circle, #000 30%, transparent 72%);
    mask-image: radial-gradient(circle, #000 30%, transparent 72%);
    pointer-events: none;
    z-index: -1;
}

/* About */
.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 64px;
    align-items: center;
}

.about-visual {
    isolation: isolate;
    position: relative;
    min-height: 520px;
}

.about-card {
    position: absolute;
    left: 0;
    top: 0;
    width: 62%;
    background: var(--gradient);
    color: #fff;
    border-radius: var(--radius);
    padding: 30px 30px 34px;
    z-index: 2;
    box-shadow: var(--shadow);
}

.about-card .eyebrow {
    color: #BFDBFE;
}

.about-card h3 {
    color: #fff;
    font-size: 1.7rem;
    margin: 0;
}

.about-photo {
    position: absolute;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.about-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-photo.main {
    right: 0;
    top: 70px;
    width: 64%;
    height: 330px;
}

.about-photo.small {
    left: 6%;
    bottom: 0;
    width: 44%;
    height: 220px;
    border: 6px solid var(--page);
}

.about-visual .plus-grid {
    right: -40px;
    bottom: -40px;
}

.about-text p {
    color: var(--muted);
}

.about-text .lead {
    color: var(--text);
}

.facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 30px 0 34px;
}

.fact {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
}

.fact b {
    display: block;
    font-family: var(--serif);
    font-size: 1.9rem;
    color: var(--blue-dark);
    line-height: 1.1;
}

.fact > span {
    font-size: 13px;
    color: var(--muted);
}

/* Programs */
.programs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.program {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.program:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.program-img {
    aspect-ratio: 16 / 11;
    overflow: hidden;
    position: relative;
}

.program-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.program-tag {
    position: absolute;
    left: 14px;
    top: 14px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--blue-dark);
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
}

.program-body {
    padding: 24px 24px 26px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.program-body p {
    color: var(--muted);
    font-size: 15px;
    flex: 1;
}

.program-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.program-meta span {
    font-size: 12.5px;
    background: var(--blue-soft);
    color: var(--blue-dark);
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 500;
}

/* Welfare (dark block) */
.welfare {
    background: var(--gradient);
    color: #DBEAFE;
    overflow: hidden;
}

.welfare h2 {
    color: #fff;
}

.welfare .eyebrow {
    color: #BFDBFE;
}

.welfare .lead {
    color: #DBEAFE;
}

.welfare-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 56px;
    align-items: center;
}

.welfare-photos {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 14px;
    height: 460px;
}

.welfare-photos .tile {
    box-shadow: 0 20px 40px rgba(2, 18, 54, 0.35);
}

.welfare-photos .tile:first-child {
    grid-row: span 2;
}

.care-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 30px;
}

.care {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    padding: 18px;
}

.care i {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--gold);
    color: var(--blue-deep);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    margin-bottom: 10px;
}

.care strong {
    display: block;
    color: #fff;
    font-size: 15.5px;
    margin-bottom: 4px;
}

.care span {
    font-size: 13.5px;
    color: #BFDBFE;
    line-height: 1.5;
    display: block;
}

/* School life list */
.life-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 64px;
    align-items: start;
}

.life-intro {
    isolation: isolate;
    position: sticky;
    top: 110px;
}

.life-intro .plus-grid {
    left: -30px;
    top: 160px;
}

.life-list {
    border-top: 1px solid var(--line);
}

.life-item {
    display: grid;
    grid-template-columns: 150px 1fr auto;
    gap: 24px;
    align-items: center;
    padding: 22px 0;
    border-bottom: 1px solid var(--line);
}

.life-item img {
    width: 150px;
    height: 104px;
    object-fit: cover;
    border-radius: 14px;
}

.life-item h3 {
    font-size: 1.25rem;
    margin-bottom: 6px;
}

.life-item p {
    margin: 0;
    font-size: 14.5px;
    color: var(--muted);
}

.life-item .when {
    display: flex;
    gap: 6px;
    align-items: center;
    font-size: 13px;
    color: var(--blue);
    margin-bottom: 4px;
    font-weight: 500;
}

/* Parent app */
.app-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 56px;
    align-items: center;
}

.app-features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 0;
    margin: 28px 0;
    list-style: none;
}

.app-feature {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px;
}

.app-feature i {
    flex: 0 0 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 15px;
}

.app-feature strong {
    display: block;
    color: var(--ink);
    font-size: 15px;
}

.app-feature span {
    display: block;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.45;
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    counter-reset: step;
    padding: 0;
    margin: 0 0 28px;
    list-style: none;
}

.steps li {
    counter-increment: step;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px;
    font-size: 14px;
    color: var(--text);
}

.steps li::before {
    content: '0' counter(step);
    display: block;
    font-family: var(--serif);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--blue);
    margin-bottom: 4px;
}

.app-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
}

.play-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--ink);
    color: #fff;
    border-radius: 14px;
    padding: 10px 20px;
    transition: transform 0.2s ease;
}

.play-badge:hover {
    color: #fff;
    transform: translateY(-2px);
}

.play-badge i {
    font-size: 24px;
}

.play-badge small {
    display: block;
    font-size: 10.5px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.75;
}

.play-badge b {
    display: block;
    font-size: 18px;
    line-height: 1.1;
}

.app-help {
    font-size: 14px;
    color: var(--muted);
    margin: 0;
    max-width: 300px;
}

.phone-stage {
    position: relative;
    display: flex;
    justify-content: center;
    padding: 30px 0;
}

.phone-stage::before {
    content: '';
    position: absolute;
    inset: 8% 6%;
    border-radius: 40px;
    background: var(--gradient);
    transform: rotate(-5deg);
}

.phone {
    position: relative;
    width: 290px;
    max-width: 100%;
    border-radius: 40px;
    background: var(--ink);
    padding: 12px;
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.28);
}

.phone-screen {
    border-radius: 30px;
    background: var(--page);
    overflow: hidden;
    font-size: 12.5px;
}

.phone-bar {
    background: var(--blue);
    color: #fff;
    padding: 20px 16px 14px;
}

.phone-bar small {
    opacity: 0.8;
    font-size: 11px;
}

.phone-bar div {
    font-weight: 600;
    font-size: 15px;
}

.phone-card {
    background: #fff;
    margin: 10px;
    border-radius: 14px;
    padding: 12px;
    box-shadow: var(--shadow-sm);
    color: var(--text);
}

.phone-card h6 {
    margin: 0 0 8px;
    font-size: 11px;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.phone-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px dashed var(--line);
}

.phone-row:last-child {
    border-bottom: none;
}

.phone-meter {
    height: 8px;
    border-radius: 4px;
    background: var(--line);
    overflow: hidden;
    margin: 6px 0 4px;
}

.phone-meter span {
    display: block;
    height: 100%;
    background: #22C55E;
}

.phone-note {
    text-align: center;
    font-size: 12.5px;
    color: var(--muted);
    margin-top: 6px;
}

/* Testimonials */
.voices {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.voice {
    margin: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
    display: flex;
    flex-direction: column;
}

.voice.featured {
    background: var(--gradient);
    border: none;
    color: #DBEAFE;
}

.voice .stars {
    color: var(--gold);
    font-size: 13px;
    letter-spacing: 2px;
    margin-bottom: 14px;
}

.voice blockquote {
    margin: 0 0 22px;
    font-family: var(--serif);
    font-size: 1.15rem;
    line-height: 1.5;
    color: var(--ink);
    flex: 1;
}

.voice.featured blockquote {
    color: #fff;
}

.voice cite {
    font-style: normal;
    font-size: 14px;
}

.voice cite b {
    display: block;
    color: var(--ink);
}

.voice.featured cite b {
    color: #fff;
}

.voice cite span {
    color: var(--muted);
}

.voice.featured cite span {
    color: #BFDBFE;
}

/* Partner */
.partner {
    margin-top: 56px;
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.partner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 280px;
}

.partner-body {
    padding: 40px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.partner-body h3 {
    font-size: 1.7rem;
}

.partner-body p {
    color: var(--muted);
}

/* Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 210px;
    gap: 16px;
}

.gallery figure {
    margin: 0;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
}

.gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery figure:hover img {
    transform: scale(1.05);
}

.gallery figcaption {
    position: absolute;
    left: 12px;
    bottom: 12px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--ink);
    font-size: 12.5px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
}

.g-wide {
    grid-column: span 2;
}

.g-tall {
    grid-row: span 2;
}

/* Admissions */
.admit-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 56px;
    align-items: start;
}

.admit-steps {
    list-style: none;
    padding: 0;
    margin: 28px 0 0;
}

.admit-steps li {
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
}

.admit-steps i {
    flex: 0 0 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--blue-soft);
    color: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
}

.admit-steps strong {
    display: block;
    color: var(--ink);
}

.admit-steps span {
    font-size: 14.5px;
    color: var(--muted);
}

.form-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow);
}

.form-card h3 {
    font-size: 1.6rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-row.three {
    grid-template-columns: 1fr 1fr 1fr;
}

.field {
    margin-bottom: 16px;
}

.field label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    font: inherit;
    font-size: 15px;
    color: var(--ink);
    background: var(--page);
    border: 1.5px solid var(--line);
    border-radius: 12px;
    padding: 12px 14px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--blue);
    background: #fff;
}

.field input[type="file"] {
    padding: 10px 14px;
    cursor: pointer;
}

.field-hint {
    display: block;
    font-size: 12.5px;
    color: var(--muted);
    margin-top: 6px;
}

.form-state {
    text-align: center;
    padding: 30px 10px;
    color: var(--muted);
}

.form-state i {
    font-size: 28px;
    color: var(--blue);
    margin-bottom: 12px;
}

.form-state .btn {
    margin-top: 8px;
}

.form-state .btn i {
    font-size: inherit;
    color: inherit;
    margin-bottom: 0;
}

.alert {
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14.5px;
}

.alert-success {
    background: #DCFCE7;
    color: #166534;
}

.alert-error {
    background: #FEE2E2;
    color: #991B1B;
}

.form-card .btn {
    width: 100%;
    justify-content: center;
    margin-top: 4px;
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.contact-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 34px;
}

.contact-lines {
    list-style: none;
    padding: 0;
    margin: 0 0 26px;
}

.contact-lines li {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.contact-lines li:last-child {
    border-bottom: none;
}

.contact-lines i {
    flex: 0 0 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--blue-soft);
    color: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-lines small {
    display: block;
    color: var(--muted);
    font-size: 12.5px;
}

.contact-lines b,
.contact-lines a {
    color: var(--ink);
    font-weight: 600;
}

.map {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--line);
}

.map iframe {
    display: block;
    width: 100%;
    height: 260px;
    border: 0;
}

/* CTA band */
.cta-band {
    background: var(--gradient);
    border-radius: var(--radius-lg);
    padding: 56px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    position: relative;
    overflow: hidden;
}

.cta-band::after {
    content: '';
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    right: -80px;
    top: -140px;
    background: rgba(96, 165, 250, 0.35);
}

.cta-band h2 {
    color: #fff;
    margin: 0 0 8px;
    position: relative;
    z-index: 1;
}

.cta-band p {
    color: #DBEAFE;
    margin: 0;
    position: relative;
    z-index: 1;
}

.cta-band .btn {
    position: relative;
    z-index: 1;
}

/* Footer */
.site-footer {
    background: var(--blue-deep);
    color: #BFDBFE;
    padding: 72px 0 30px;
    font-size: 14.5px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 48px;
}

.site-footer .brand img {
    border-radius: 10px;
}

.site-footer .brand {
    color: #fff;
    margin-bottom: 16px;
}

.site-footer .brand small {
    color: #93C5FD;
}

.site-footer h4 {
    font-family: var(--sans);
    color: #fff;
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer li {
    margin-bottom: 10px;
}

.site-footer a {
    color: #DBEAFE;
}

.site-footer a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(191, 219, 254, 0.18);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13.5px;
    color: #93C5FD;
}

/* Reveal on scroll */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Legal pages */
.legal-hero {
    background: var(--gradient);
    color: #DBEAFE;
    padding: 56px 0 80px;
}

.legal-hero h1 {
    color: #fff;
    font-size: clamp(2.2rem, 4.4vw, 3.2rem);
    margin-bottom: 8px;
}

.legal-hero p {
    margin: 0;
}

.legal-body {
    max-width: 800px;
    margin: -44px auto 72px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 44px 48px;
    font-size: 15.5px;
    position: relative;
}

.legal-body h2 {
    font-size: 1.45rem;
    margin: 34px 0 10px;
}

.legal-body h2:first-child {
    margin-top: 0;
}

.legal-body ul {
    padding-left: 22px;
}

.legal-body li {
    margin-bottom: 6px;
}

.legal-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0 18px;
    font-size: 14.5px;
}

.legal-body th,
.legal-body td {
    border-bottom: 1px solid var(--line);
    padding: 10px;
    vertical-align: top;
    text-align: left;
}

.legal-body th {
    color: var(--ink);
    background: var(--surface-alt);
}

.legal-body code {
    background: var(--surface-alt);
    padding: 1px 6px;
    border-radius: 6px;
    font-size: 0.92em;
}

.note {
    background: var(--blue-soft);
    border-left: 4px solid var(--blue);
    border-radius: 10px;
    padding: 14px 18px;
    margin: 20px 0;
}

.table-wrap {
    overflow-x: auto;
}

/* Responsive */
@media (max-width: 1080px) {
    .nav {
        gap: 20px;
    }

    .pillars .wrap {
        grid-template-columns: repeat(2, 1fr);
    }

    .pillar:nth-child(3) {
        border-left: none;
    }

    .pillar:nth-child(n+3) {
        border-top: 1px solid var(--line);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 920px) {
    .section {
        padding: 76px 0;
    }

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav {
        position: absolute;
        left: 0;
        right: 0;
        top: 76px;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: #fff;
        border-bottom: 1px solid var(--line);
        box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
        padding: 8px 24px 20px;
        display: none;
    }

    .nav.open {
        display: flex;
    }

    .nav a {
        padding: 12px 0;
        border-bottom: 1px solid var(--line);
    }

    .nav .btn {
        margin-top: 14px;
        justify-content: center;
        border-bottom: none;
    }

    .hero-grid,
    .about-grid,
    .welfare-grid,
    .life-grid,
    .app-grid,
    .admit-grid,
    .contact-grid,
    .partner {
        grid-template-columns: 1fr;
    }

    .hero-grid {
        gap: 44px;
    }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .programs,
    .voices {
        grid-template-columns: 1fr;
    }

    .life-intro {
        position: static;
    }

    .gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 170px;
    }

    .cta-band {
        flex-direction: column;
        align-items: flex-start;
        padding: 40px 32px;
    }

    .float-badge.one {
        left: 8px;
    }

    .float-badge.two {
        right: 8px;
    }
}

@media (max-width: 600px) {
    .wrap {
        padding: 0 16px;
    }

    .brand small {
        display: none;
    }

    .collage {
        gap: 12px;
    }

    .collage-col {
        gap: 12px;
    }

    .collage-col.offset {
        padding-top: 32px;
    }

    .float-badge {
        display: none;
    }

    .pillars .wrap {
        grid-template-columns: 1fr;
    }

    .pillar {
        border-left: none;
        border-top: 1px solid var(--line);
        padding: 20px 4px;
    }

    .pillar:first-child {
        border-top: none;
    }

    .about-visual {
        min-height: 470px;
    }

    .about-card {
        width: 80%;
        padding: 22px;
    }

    .about-photo.main {
        width: 78%;
        height: 260px;
        top: 110px;
    }

    .about-photo.small {
        width: 54%;
        height: 170px;
        left: 0;
    }

    .facts {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 8px;
    }

    .fact {
        padding: 12px 10px;
    }

    .fact b {
        font-size: 1.45rem;
    }

    .welfare-photos {
        height: 340px;
    }

    .care-cards,
    .app-features,
    .steps,
    .form-row,
    .form-row.three {
        grid-template-columns: 1fr;
    }

    .life-item {
        grid-template-columns: 96px 1fr;
        gap: 14px;
    }

    .life-item img {
        width: 96px;
        height: 80px;
    }

    .life-item .link-arrow {
        display: none;
    }

    .gallery {
        grid-auto-rows: 130px;
        gap: 10px;
    }

    .form-card,
    .contact-card {
        padding: 24px 18px;
    }

    .partner-body {
        padding: 28px 22px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .legal-body {
        margin: -40px 12px 56px;
        padding: 28px 20px;
    }
}
