/*
Theme Name: Top of the Class
Theme URI: https://example.com/top-of-the-class
Author: Top of the Class
Description: A custom, responsive WordPress theme for Top of the Class, built around its origin story, education opportunity model, and student-centered mission.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: top-of-the-class
Tags: education, custom-logo, featured-images, responsive-layout, accessibility-ready
*/

:root {
  --ink: #2d2d2d;
  --muted: #5f6468;
  --paper: #ffffff;
  --soft: #f7fafb;
  --line: #e7ecef;
  --cyan: #4bb9df;
  --cyan-dark: #188cb5;
  --yellow: #ffe812;
  --red: #ed1c24;
  --orange: #f7941d;
  --teal: #4f9496;
  --green: #bfd9b4;
  --shadow: 0 24px 70px rgba(29, 57, 73, .12);
  --radius: 28px;
  --radius-sm: 18px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.container { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.skip-link { position: absolute; left: -999px; top: 0; z-index: 999; background: var(--ink); color: #fff; padding: 10px 14px; }
.skip-link:focus { left: 12px; top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(231,236,239,.85);
}
.nav-wrap { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.brand img { width: 172px; height: 62px; object-fit: contain; object-position: left center; }
.site-nav { display: flex; align-items: center; gap: 30px; font-size: .95rem; font-weight: 650; }
.site-nav a { text-decoration: none; transition: color .2s ease; }
.site-nav a:hover { color: var(--cyan-dark); }
.nav-cta { border: 1px solid var(--ink); border-radius: 999px; padding: 11px 18px; }
.nav-cta:hover { background: var(--ink); color: #fff !important; }
.menu-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; padding: 10px; cursor: pointer; }
.menu-toggle span { display: block; height: 2px; background: var(--ink); margin: 5px 0; }

.hero {
  position: relative;
  min-height: 720px;
  display: grid;
  align-items: center;
  overflow: hidden;
  background: radial-gradient(circle at 80% 10%, rgba(75,185,223,.13), transparent 28%), linear-gradient(180deg,#fff 0%,#fbfdfe 100%);
}
.hero-grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: 72px; align-items: center; padding: 88px 0 96px; position: relative; z-index: 2; }
.eyebrow { margin: 0 0 14px; text-transform: uppercase; letter-spacing: .14em; font-weight: 800; font-size: .78rem; color: var(--cyan-dark); }
h1,h2,h3 { line-height: 1.06; margin-top: 0; letter-spacing: -.035em; }
h1 { font-size: clamp(3.3rem, 6.2vw, 6.1rem); margin-bottom: 26px; max-width: 870px; }
h1 span { color: var(--cyan-dark); }
h2 { font-size: clamp(2.25rem, 4vw, 4.2rem); margin-bottom: 22px; }
h3 { font-size: 1.45rem; margin-bottom: 12px; }
p { margin-top: 0; }
.hero-lede { font-size: 1.22rem; color: var(--muted); max-width: 720px; margin-bottom: 34px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 22px; border-radius: 999px; text-decoration: none; font-weight: 800; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--ink); color: #fff; box-shadow: 0 12px 30px rgba(45,45,45,.18); }
.btn-secondary { border: 1px solid var(--ink); background: #fff; }
.btn-light { background: #fff; color: var(--ink); }

.hero-card { background: rgba(255,255,255,.95); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow); transform: rotate(1.2deg); }
.hero-logo { width: 100%; max-height: 235px; object-fit: contain; margin-bottom: 24px; }
.promise { display: grid; gap: 7px; font-size: 1.1rem; }
.promise strong { margin-top: 5px; color: var(--cyan-dark); font-size: 1.27rem; }
.hero-shape { position: absolute; border-radius: 48% 52% 60% 40% / 48% 43% 57% 52%; opacity: .9; filter: saturate(.95); }
.shape-cyan { width: 390px; height: 390px; background: var(--cyan); right: -170px; top: 110px; transform: rotate(20deg); }
.shape-yellow { width: 250px; height: 250px; background: var(--yellow); right: 150px; bottom: -150px; transform: rotate(-18deg); }
.shape-red { width: 120px; height: 120px; background: var(--red); left: -70px; top: 230px; transform: rotate(32deg); }

.section { padding: 112px 0; }
.two-col { display: grid; grid-template-columns: .9fr 1.1fr; gap: 86px; align-items: start; }
.section-heading .eyebrow { margin-bottom: 18px; }
.section-heading p:last-child { color: var(--muted); font-size: 1.08rem; max-width: 780px; }
.section-heading.centered { text-align: center; max-width: 900px; margin: 0 auto 54px; }
.section-heading.centered p:last-child { margin-inline: auto; }
.story-copy { font-size: 1.08rem; color: #454a4d; }
.story-copy .lead { font-size: 1.5rem; font-weight: 800; color: var(--ink); }
blockquote { margin: 34px 0 0; padding: 26px 0 26px 28px; border-left: 6px solid var(--yellow); color: var(--ink); font-size: 1.42rem; font-weight: 800; line-height: 1.35; }

.collaboration { padding-top: 0; }
.collab-card { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 56px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.collab-card::after { content:""; position:absolute; width:280px; height:280px; border-radius:50%; background:var(--yellow); right:-110px; top:-140px; opacity:.95; }
.collab-card .eyebrow { color: #8ed7f0; }
.collab-card p { max-width: 900px; color: #dce2e5; font-size: 1.08rem; }
.partner-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; position: relative; z-index: 2; }
.partner-chips span { border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.06); border-radius: 999px; padding: 10px 14px; font-size: .9rem; }

.evolution { background: var(--soft); }
.evolution-grid { display: grid; grid-template-columns: 1fr 110px 1fr; align-items: stretch; gap: 24px; }
.evolution-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 38px; box-shadow: 0 16px 40px rgba(37,62,74,.07); }
.evolution-card.now { border-top: 8px solid var(--cyan); }
.evolution-card.then { border-top: 8px solid var(--orange); }
.card-kicker { display: inline-flex; margin-bottom: 16px; border-radius: 999px; padding: 6px 11px; font-size: .78rem; font-weight: 900; text-transform: uppercase; letter-spacing: .12em; background: #eef3f5; }
.evolution-card ol { margin: 24px 0 0; padding-left: 22px; }
.evolution-card li { margin: 12px 0; padding-left: 6px; }
.evolution-arrow { display: grid; place-items: center; }
.evolution-arrow span { font-size: 4.5rem; color: var(--cyan-dark); font-weight: 300; }

.belief-grid { display: grid; grid-template-columns: 1fr .92fr; gap: 74px; align-items: center; }
.belief-copy p:not(.eyebrow) { color: var(--muted); font-size: 1.08rem; }
.quote-panel { min-height: 380px; display: grid; place-items: center; border-radius: var(--radius); background: linear-gradient(135deg, var(--cyan) 0 55%, var(--yellow) 55% 100%); padding: 44px; }
.quote-panel p { font-size: clamp(2rem,3.4vw,3.4rem); font-weight: 900; line-height: 1.08; letter-spacing: -.04em; margin: 0; color: #10232c; }

.model { background: #132129; color: #fff; }
.model .eyebrow { color: #7ad0ed; }
.model .section-heading p:last-child { color: #c9d4d9; }
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.step { min-height: 330px; padding: 28px 24px; border-radius: var(--radius-sm); background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.11); }
.step:nth-child(2) { transform: translateY(20px); }
.step:nth-child(3) { transform: translateY(40px); }
.step:nth-child(4) { transform: translateY(20px); }
.step-number { display: block; font-weight: 900; font-size: .82rem; color: #7ad0ed; margin-bottom: 50px; letter-spacing: .1em; }
.step p { color: #c9d4d9; font-size: .96rem; }

.serve { padding-bottom: 90px; }
.serve-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 38px; }
.serve-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 28px; min-height: 210px; transition: transform .2s ease, box-shadow .2s ease; }
.serve-card:hover { transform: translateY(-5px); box-shadow: 0 18px 38px rgba(30,65,78,.08); }
.serve-card span { display: block; font-size: 1.25rem; font-weight: 900; margin-bottom: 14px; }
.serve-card p { color: var(--muted); }
.serve-card:nth-child(1) { border-top: 6px solid var(--cyan); }
.serve-card:nth-child(2) { border-top: 6px solid var(--yellow); }
.serve-card:nth-child(3) { border-top: 6px solid var(--red); }
.serve-card:nth-child(4) { border-top: 6px solid var(--orange); }
.serve-card:nth-child(5) { border-top: 6px solid var(--teal); }
.serve-card:nth-child(6) { border-top: 6px solid var(--green); }

.possibility { padding-top: 30px; }
.possibility-card { border-radius: var(--radius); padding: 58px; background: #f4fbfd; border: 1px solid #d7edf4; }
.possibility-flow { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.possibility-flow span, .possibility-flow strong { display: inline-flex; align-items: center; min-height: 48px; border-radius: 999px; padding: 0 16px; background: #fff; border: 1px solid var(--line); }
.possibility-flow strong { background: var(--cyan); border-color: var(--cyan); color: #0d2630; }
.possibility-flow b { color: var(--cyan-dark); }

.partner { background: var(--cyan); color: #10242d; }
.partner-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 70px; align-items: center; }
.partner .eyebrow { color: #123f50; }
.partner-grid > div:first-child p:last-child { font-size: 1.1rem; max-width: 720px; }
.partner-panel { border-radius: var(--radius); background: #15232a; color: #fff; padding: 40px; box-shadow: var(--shadow); }
.partner-panel h3 { color: #8bd8ef; }
.north-star { font-size: 1.5rem; line-height: 1.35; font-weight: 800; }

.site-footer { background: #fff; padding: 42px 0; border-top: 1px solid var(--line); }
.footer-grid { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.footer-brand img { width: 150px; height: 80px; object-fit: contain; object-position: left center; }
.footer-brand p, .footer-note { color: var(--muted); font-size: .9rem; margin: 8px 0 0; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .serve-card { transition: none; }
}

@media (max-width: 980px) {
  .menu-toggle { display: block; }
  .site-nav { position: absolute; top: 84px; left: 20px; right: 20px; padding: 18px; border-radius: 18px; background: #fff; box-shadow: var(--shadow); border: 1px solid var(--line); display: none; flex-direction: column; align-items: stretch; gap: 6px; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 10px; }
  .nav-cta { text-align: center; }
  .hero-grid, .two-col, .belief-grid, .partner-grid { grid-template-columns: 1fr; }
  .hero-grid { gap: 38px; }
  .hero-card { max-width: 620px; }
  .two-col, .belief-grid, .partner-grid { gap: 38px; }
  .evolution-grid { grid-template-columns: 1fr; }
  .evolution-arrow { min-height: 50px; }
  .evolution-arrow span { transform: rotate(90deg); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step:nth-child(n) { transform: none; min-height: 260px; }
  .serve-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .container { width: min(calc(100% - 28px), var(--max)); }
  .nav-wrap { min-height: 74px; }
  .brand img { width: 135px; height: 52px; }
  .site-nav { top: 74px; left: 14px; right: 14px; }
  .hero { min-height: auto; }
  .hero-grid { padding: 62px 0 76px; }
  h1 { font-size: clamp(2.7rem, 13vw, 4.2rem); }
  h2 { font-size: clamp(2rem, 10vw, 3rem); }
  .hero-lede { font-size: 1.08rem; }
  .hero-actions .btn { width: 100%; }
  .hero-card { padding: 24px; }
  .section { padding: 78px 0; }
  .collab-card, .possibility-card { padding: 34px 24px; }
  .steps, .serve-grid { grid-template-columns: 1fr; }
  .quote-panel { min-height: 300px; padding: 28px; }
  .footer-grid { flex-direction: column; align-items: flex-start; }
  .partner-chips { flex-direction: column; align-items: flex-start; }
}

/* WordPress integration */
body.admin-bar .site-header { top: 32px; }
.custom-logo-link { display: inline-flex; align-items: center; }
.custom-logo-link img { width: 160px; height: 62px; object-fit: contain; object-position: left center; }
.wp-caption, .gallery-caption { max-width: 100%; }
.wp-caption-text { color: var(--muted); font-size: .9rem; }
.sticky { position: relative; }
.bypostauthor { position: relative; }
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }

.content-shell { padding: 80px 0 110px; }
.content-shell .entry-header { margin-bottom: 34px; }
.content-shell .entry-meta { color: var(--muted); font-size: .9rem; margin-top: 10px; }
.content-shell .entry-content { max-width: 860px; font-size: 1.06rem; line-height: 1.8; }
.content-shell .entry-content a { color: var(--cyan-dark); text-decoration: underline; text-underline-offset: 3px; }
.content-shell .entry-content img { max-width: 100%; height: auto; border-radius: 12px; }
.content-shell article + article { margin-top: 64px; padding-top: 64px; border-top: 1px solid var(--line); }
.posts-navigation { margin-top: 50px; }
.posts-navigation .nav-links { display: flex; justify-content: space-between; gap: 24px; }
.page-title { max-width: 880px; }

@media screen and (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
}
