/**
 * Royals Preparatory School - Public Homepage Stylesheet
 * Official Branding: Deep Navy Blue (#0f2744, #0a192f) & Royal Gold (#d4af37)
 */

:root {
  color-scheme: light;
  --navy: #0f2744;
  --navy-dark: #0a192f;
  --navy-light: #1b3d66;
  --navy-soft: #f0f4f8;
  --gold: #d4af37;
  --gold-dark: #b38f20;
  --gold-light: #fdfaf0;
  --gold-hover: #c59b27;
  
  --ink: #0f172a;
  --muted: #64748b;
  --paper: #ffffff;
  --canvas: #f8fafc;
  --line: #e2e8f0;
  
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body { min-width: 280px; margin: 0; background: var(--canvas); color: var(--ink); }
a { color: inherit; }
a:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }

.skip-link { 
  position: absolute; 
  z-index: 10; 
  top: 10px; 
  left: 10px; 
  padding: 10px 14px; 
  transform: translateY(-160%); 
  border-radius: 8px; 
  background: #fff; 
  color: var(--navy); 
  font-weight: 700; 
}
.skip-link:focus { transform: translateY(0); }

/* Header */
.site-header { 
  position: relative; 
  z-index: 2; 
  background: rgba(255, 255, 255, 0.96); 
  border-bottom: 1px solid var(--line); 
  backdrop-filter: blur(8px);
}
.header-inner, .section-wrap, .footer-inner, .footer-bottom { 
  width: min(1160px, calc(100% - 56px)); 
  margin: 0 auto; 
}
.header-inner { 
  min-height: 82px; 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  gap: 30px; 
}
.brand { 
  display: inline-flex; 
  align-items: center; 
  gap: 12px; 
  color: var(--navy); 
  text-decoration: none; 
}
.brand img { 
  width: 48px; 
  height: 48px; 
  border: 2px solid var(--gold); 
  border-radius: 50%; 
  background: #fff; 
  object-fit: cover; 
}
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { 
  font-size: 16px; 
  font-weight: 800; 
  letter-spacing: -0.02em; 
  color: var(--navy);
}
.brand-copy > span { 
  color: var(--gold-dark); 
  font-size: 11px; 
  font-weight: 700; 
  letter-spacing: .06em; 
  text-transform: uppercase;
}

.main-nav { display: flex; align-items: center; gap: 30px; }
.main-nav > a:not(.nav-cta) { 
  color: var(--muted); 
  font-size: 13px; 
  font-weight: 600; 
  text-decoration: none; 
  transition: color .18s ease; 
}
.main-nav > a:not(.nav-cta):hover { color: var(--navy); }
.nav-cta { 
  display: inline-flex; 
  align-items: center; 
  gap: 10px; 
  padding: 10px 18px; 
  border: 1.5px solid var(--gold); 
  border-radius: 8px; 
  background: var(--gold-light); 
  color: var(--navy); 
  font-size: 12px; 
  font-weight: 700; 
  text-decoration: none; 
  transition: all .2s ease; 
}
.nav-cta:hover { 
  transform: translateY(-1px); 
  background: var(--gold); 
  color: #fff; 
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

/* Hero Section */
.hero { 
  position: relative; 
  overflow: hidden; 
  background: linear-gradient(135deg, #0a192f 0%, #0f2744 60%, #1b3d66 100%); 
  color: #ffffff;
}
.hero-inner { 
  width: min(1160px, calc(100% - 56px)); 
  min-height: 574px; 
  display: grid; 
  grid-template-columns: 1fr .94fr; 
  align-items: center; 
  gap: 70px; 
  margin: 0 auto; 
  padding: 58px 0 70px; 
}
.hero-copy { position: relative; z-index: 1; padding: 4px 0 16px; }
.eyebrow { 
  display: flex; 
  align-items: center; 
  gap: 10px; 
  margin: 0 0 18px; 
  color: var(--gold); 
  font-size: 11px; 
  font-weight: 700; 
  letter-spacing: .16em; 
  text-transform: uppercase; 
}
.eyebrow-line { width: 24px; height: 2px; background: var(--gold); }
.hero h1 { 
  margin: 0; 
  font-size: clamp(38px, 4.8vw, 58px); 
  font-weight: 800; 
  letter-spacing: -.04em; 
  line-height: 1.12; 
  color: #ffffff;
}
.hero h1 span { color: var(--gold); }
.hero-description { 
  max-width: 470px; 
  margin: 22px 0 0; 
  color: #cbd5e1; 
  font-size: 15px; 
  line-height: 1.8; 
}
.hero-actions { 
  display: flex; 
  align-items: center; 
  flex-wrap: wrap; 
  gap: 20px; 
  margin-top: 32px; 
}
.button { 
  min-height: 48px; 
  display: inline-flex; 
  align-items: center; 
  justify-content: center; 
  gap: 12px; 
  padding: 0 24px; 
  border-radius: 8px; 
  font-size: 13px; 
  font-weight: 700; 
  text-decoration: none; 
  transition: all .2s ease; 
}
.button-primary { 
  background: var(--gold); 
  color: var(--navy-dark); 
  box-shadow: 0 7px 18px rgba(212, 175, 55, 0.25); 
}
.button-primary:hover { 
  transform: translateY(-2px); 
  background: var(--gold-hover); 
  box-shadow: 0 10px 24px rgba(212, 175, 55, 0.35); 
}
.text-link { 
  display: inline-flex; 
  align-items: center; 
  gap: 9px; 
  color: #ffffff; 
  font-size: 13px; 
  font-weight: 600; 
  text-decoration: none; 
  opacity: 0.9;
}
.text-link:hover { color: var(--gold); opacity: 1; }

.hero-note { 
  display: flex; 
  align-items: center; 
  gap: 14px; 
  margin-top: 40px; 
  color: #94a3b8; 
  font-size: 12px; 
  line-height: 1.6; 
}
.hero-note strong { color: #ffffff; font-size: 13px; }
.note-mark { 
  width: 40px; 
  height: 40px; 
  display: grid; 
  flex: 0 0 auto; 
  place-items: center; 
  border: 1.5px solid var(--gold); 
  border-radius: 50%; 
  background: rgba(255, 255, 255, 0.08); 
  color: var(--gold); 
}
.note-mark svg { width: 20px; height: 20px; }

.hero-visual { position: relative; min-width: 0; padding: 0 14px 18px 0; }
.hero-photo { 
  position: relative; 
  min-height: 388px; 
  overflow: hidden; 
  border-radius: 20px; 
  background: #0f2744 url("../images/school-background.jpg") center/cover no-repeat; 
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4); 
  border: 3px solid rgba(212, 175, 55, 0.3);
}
.hero-photo::after { 
  position: absolute; 
  inset: 0; 
  background: linear-gradient(180deg, transparent 40%, rgba(10, 25, 47, 0.75)); 
  content: ""; 
}
.photo-caption { 
  position: absolute; 
  z-index: 1; 
  right: 15px; 
  bottom: 15px; 
  display: flex; 
  align-items: center; 
  gap: 11px; 
  min-width: 220px; 
  padding: 12px 16px; 
  border: 1px solid rgba(255, 255, 255, 0.15); 
  border-radius: 10px; 
  background: rgba(10, 25, 47, 0.9); 
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); 
  color: #94a3b8; 
  font-size: 11px; 
  line-height: 1.5; 
}
.photo-caption strong { color: #ffffff; font-size: 12px; }

.hero-bottom { 
  position: absolute; 
  bottom: 0; 
  left: 50%; 
  width: min(1160px, calc(100% - 56px)); 
  display: flex; 
  align-items: center; 
  gap: 14px; 
  padding: 16px 0; 
  border-top: 1px solid rgba(255, 255, 255, 0.08); 
  color: var(--gold); 
  font-size: 10px; 
  font-weight: 700; 
  letter-spacing: .18em; 
  text-transform: uppercase; 
  transform: translateX(-50%); 
}
.hero-bottom i { width: 4px; height: 4px; border-radius: 50%; background: var(--gold); }

.about-copy h2 { 
  margin: 0; 
  font-size: clamp(28px, 3.2vw, 38px); 
  font-weight: 800; 
  letter-spacing: -.03em; 
  line-height: 1.2; 
  color: var(--navy);
}

/* Portal sign-in */
.portal-access-section { padding-top: 72px; padding-bottom: 78px; }
.portal-access-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 26px;
}
.portal-access-head h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.2;
  color: var(--navy);
}
.portal-access-head > p {
  max-width: 410px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}
.portal-access-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.portal-access-card {
  --portal-accent: linear-gradient(135deg, #1b3d66, #0f2744);
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 104px;
  padding: 24px 20px 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(15, 39, 68, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.portal-access-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--portal-accent);
  content: "";
}
.portal-access-card:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: 0 18px 34px rgba(15, 39, 68, 0.14);
}
.portal-access-student { --portal-accent: linear-gradient(135deg, #1b3d66, #0f2744); }
.portal-access-teacher { --portal-accent: linear-gradient(135deg, #12897e, #0f5f58); }
.portal-access-parent { --portal-accent: linear-gradient(135deg, #b94a7c, #8e2f5d); }
.portal-access-admin { --portal-accent: linear-gradient(135deg, #e0bd4a, #b38f20); }
.portal-access-icon {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--portal-accent);
  color: #fff;
  font-size: 19px;
  box-shadow: 0 6px 14px rgba(15, 39, 68, 0.16);
}
.portal-access-copy {
  flex: 1;
  min-width: 0;
}
.portal-access-card strong {
  display: block;
  color: var(--navy);
  font-size: 14.5px;
  line-height: 1.3;
}
.portal-access-copy > span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
}
.portal-access-go {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--canvas);
  color: var(--navy);
  font-size: 11px;
  transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease;
}
.portal-access-card:hover .portal-access-go {
  transform: translateX(2px);
  background: var(--portal-accent);
  color: #fff;
}

/* About section */
.about-section { 
  padding: 80px 0; 
  background: var(--navy-soft); 
}
.about-inner { 
  display: grid; 
  grid-template-columns: .92fr 1fr; 
  align-items: center; 
  gap: clamp(45px, 8vw, 100px); 
}
.about-image { position: relative; padding: 0 0 18px 18px; }
.about-image::before { 
  position: absolute; 
  top: -13px; 
  left: 0; 
  width: 80px; 
  height: 80px; 
  border-top: 2px solid var(--gold); 
  border-left: 2px solid var(--gold); 
  content: ""; 
}
.about-image img { 
  position: relative; 
  z-index: 1; 
  width: 100%; 
  height: 310px; 
  display: block; 
  border-radius: 12px; 
  object-fit: cover; 
  object-position: center 45%; 
  box-shadow: 0 18px 40px rgba(15, 39, 68, 0.12); 
}
.image-label { 
  position: absolute; 
  z-index: 2; 
  right: -12px; 
  bottom: 0; 
  display: flex; 
  align-items: center; 
  gap: 9px; 
  padding: 12px 18px; 
  border: 1px solid var(--line); 
  border-radius: 8px; 
  background: #fff; 
  color: var(--navy); 
  font-size: 11px; 
  font-weight: 700; 
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}
.image-label span { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.about-copy .eyebrow { margin-bottom: 13px; }
.about-copy h2 { max-width: 440px; color: var(--navy); }
.about-copy > p:not(.eyebrow) { 
  max-width: 480px; 
  margin: 18px 0 20px; 
  color: var(--muted); 
  font-size: 14px; 
  line-height: 1.8; 
}
.about-link { 
  max-width: 480px; 
  padding-bottom: 6px; 
  border-bottom: 2px solid var(--gold); 
  color: var(--navy); 
  font-size: 13px; 
  font-weight: 600;
  line-height: 1.8; 
}
.values-list { 
  display: grid; 
  grid-template-columns: repeat(3, 1fr); 
  gap: 16px; 
  margin-top: 32px; 
  padding-top: 20px; 
  border-top: 1px solid var(--line); 
}
.values-list span { display: grid; gap: 6px; color: var(--navy); font-size: 11px; font-weight: 600; }
.values-list b { color: var(--gold-dark); font-size: 12px; font-weight: 800; }

/* Footer */
.site-footer { 
  padding: 36px 0 20px; 
  background: var(--navy-dark); 
  color: #fff; 
  border-top: 3px solid var(--gold);
}
.footer-inner { 
  min-height: 54px; 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  gap: 24px; 
  padding-bottom: 24px; 
}
.footer-brand { color: #fff; text-decoration: none; }
.footer-brand img { width: 44px; height: 44px; border: 2px solid var(--gold); border-radius: 50%; }
.footer-brand .brand-copy > strong { color: #ffffff; }
.footer-brand .brand-copy > span { color: var(--gold); }
.footer-inner > p { margin: 0; color: #94a3b8; font-size: 12px; }
.footer-top { color: var(--gold); font-size: 12px; font-weight: 700; text-decoration: none; }
.footer-top:hover { color: #ffffff; }
.footer-bottom { 
  display: flex; 
  justify-content: space-between; 
  gap: 15px; 
  padding-top: 16px; 
  border-top: 1px solid rgba(255, 255, 255, 0.1); 
  color: #64748b; 
  font-size: 11px; 
}

@media (max-width: 1099px) {
  .portal-access-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
  .header-inner, .section-wrap, .footer-inner, .footer-bottom, .hero-inner { width: min(100% - 40px, 620px); }
  .hero-inner { grid-template-columns: 1fr; gap: 35px; min-height: auto; }
  .portal-access-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .about-inner { grid-template-columns: 1fr; gap: 35px; }
}

@media (max-width: 560px) {
  .header-inner, .section-wrap, .footer-inner, .footer-bottom, .hero-inner, .hero-bottom { width: min(100% - 32px, 620px); }
  .header-inner { min-height: 68px; gap: 12px; }
  .brand img { width: 40px; height: 40px; }
  .brand-copy strong { font-size: 14px; }
  .brand-copy > span { font-size: 9.5px; }
  .main-nav { gap: 14px; }
  .main-nav > a:not(.nav-cta) { font-size: 12px; padding: 10px 0; }
  .nav-cta { padding: 9px 13px; font-size: 11px; }
  .hero-inner { padding: 36px 0 54px; }
  .hero h1 { font-size: 33px; letter-spacing: -.03em; }
  .hero-description { margin-top: 16px; font-size: 14px; line-height: 1.7; }
  .hero-actions { gap: 14px; margin-top: 24px; }
  .hero-actions .button { width: 100%; }
  .text-link { min-height: 40px; }
  .hero-note { margin-top: 26px; }
  .hero-visual { padding: 0 0 14px; }
  .hero-photo { min-height: 260px; }
  .photo-caption { left: 12px; right: 12px; bottom: 12px; min-width: 0; }
  .hero-bottom { gap: 9px; font-size: 9px; letter-spacing: .12em; }
  .portal-access-section { padding-top: 46px; padding-bottom: 46px; }
  .portal-access-grid { gap: 11px; }
  .portal-access-card { gap: 11px; min-height: 88px; padding: 18px 13px 14px; border-radius: 15px; }
  .portal-access-icon { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 11px; font-size: 16px; }
  .portal-access-card strong { font-size: 13px; }
  .portal-access-copy > span { font-size: 10.5px; }
  .portal-access-go { display: none; }
  .about-section { padding: 52px 0; }
  .about-image { padding: 0 0 14px 14px; }
  .about-image img { height: 240px; }
  .image-label { right: 0; }
  .values-list { grid-template-columns: 1fr; gap: 12px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-bottom { flex-direction: column; gap: 8px; }
  .footer-top { min-height: 40px; display: inline-flex; align-items: center; }
}

@media (max-width: 380px) {
  .hero h1 { font-size: 29px; }
  .brand-copy > span { display: none; }
  .main-nav > a:not(.nav-cta) { display: none; }
  .portal-access-grid { grid-template-columns: 1fr; gap: 10px; }
  .portal-access-card { min-height: 76px; padding: 17px 13px 13px; }
}
