/* Eastmoor College, a made-up college (EASTMOOR_SITE_HANDOVER.md). Tokens from the design
   system sheet. Radius 4 everywhere, borders 2, no shadows (the focus ring is the one ring).
   Nothing is fixed, and nothing sticks to the bottom: both bottom corners stay clear for the
   Coursefinch launcher. */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("/eastmoor/fonts/bricolage-grotesque-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/eastmoor/fonts/source-sans-3-latin.woff2") format("woff2");
}

:root {
  --green: #0f4c3a;
  --green-2: #1f6b53;
  --peach: #ffb59a;
  --pale: #eaf3ee;
  --ink: #1c2421;
  --grey: #4b5753;
  --line: #c9d6cf;
  --strip: #f1f2f0;
  --white: #ffffff;
  --footer-soft: #cfe3d9;
  --radius: 4px;
  --heading: "Bricolage Grotesque", Arial, sans-serif;
  --body: "Source Sans 3", system-ui, Arial, sans-serif;
}

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

html {
  background: var(--white);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 28px;
}

h1,
h2,
h3 {
  font-family: var(--heading);
  font-weight: 700;
  margin: 0;
}

h1 {
  font-size: clamp(32px, 3vw + 14px, 46px);
  line-height: 1.13;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

h2 {
  font-size: 30px;
  line-height: 36px;
}

h3 {
  font-size: 22px;
  line-height: 28px;
}

p,
ul,
ol,
dl {
  margin: 0 0 16px;
}

ul,
ol {
  padding-left: 24px;
}

li + li {
  margin-top: 6px;
}

a {
  color: var(--green);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--ink);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--peach);
}

main:focus {
  outline: none;
}

input,
select,
button {
  font: inherit;
}

input[type="search"],
input[type="text"],
input[type="email"],
select {
  min-height: 44px;
  max-width: 100%;
  padding: 8px 12px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* The skip link shows when it has focus. */
.skip {
  position: absolute;
  left: 8px;
  top: -100px;
  z-index: 10;
  padding: 8px 16px;
  background: var(--white);
  color: var(--ink);
  font-weight: 600;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
}

.skip:focus {
  top: 8px;
}

.strip {
  /* The example strip sticks to the top of every page (handover, section 4). */
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0;
  padding: 6px 20px;
  background: var(--strip);
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  line-height: 22px;
  text-align: center;
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--line);
}

.header-top {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
}

.name-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}

.name-shape {
  display: block;
  width: 34px;
  height: 34px;
  background: var(--green);
  border-radius: 50% 50% var(--radius) 50%;
}

.name-text {
  font-family: var(--heading);
  font-weight: 700;
  font-size: 26px;
  line-height: 30px;
  letter-spacing: -0.01em;
}

.name-text span {
  font-weight: 500;
}

.header-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.header-search {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  margin: 0;
}

.header-search input {
  width: 190px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field label,
.filters legend {
  font-weight: 600;
}

.header-search .field label {
  font-size: 15px;
  line-height: 20px;
  font-weight: 400;
  color: var(--grey);
}

.button,
.button-peach,
.button-line,
.button-plain,
.menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 22px;
  border: 2px solid var(--green);
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.button {
  background: var(--green);
  color: var(--white);
}

.button:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

.button-peach {
  background: var(--peach);
  border-color: var(--peach);
  color: var(--ink);
}

.button-peach:hover {
  background: var(--white);
  border-color: var(--white);
  color: var(--ink);
}

.button-line {
  background: var(--white);
  color: var(--green);
}

.button-plain,
.menu-button {
  background: var(--white);
  border-color: var(--ink);
  color: var(--ink);
  padding: 8px 14px;
}

.menu-button[hidden] {
  display: none;
}

.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
  margin: 0 auto;
  padding-top: 8px;
  padding-bottom: 0;
  font-weight: 600;
}

.site-nav li + li {
  margin-top: 0;
}

.site-nav a {
  display: block;
  padding: 10px 0;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 3px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  border-bottom-color: var(--green);
}

/* Below 800 pixels the nav sits behind the Menu button. Without the script (no .js class) it
   stays visible. */
@media (max-width: 799px) {
  .js .site-nav {
    display: none;
  }

  .js .site-nav.open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    padding-bottom: 8px;
  }

  .header-search input {
    width: 150px;
  }
}

@media (min-width: 800px) {
  .menu-button {
    display: none;
  }
}

/* Page tops and shared blocks */

.tint {
  background: var(--pale);
}

.page-top {
  padding-top: 24px;
  padding-bottom: 40px;
}

.page-bottom {
  padding-bottom: 64px;
}

.crumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 0 0 16px;
  padding: 0;
  font-size: 16px;
}

.crumbs li + li {
  margin-top: 0;
}

.crumbs li + li::before {
  content: "›";
  margin-right: 8px;
  color: var(--grey);
}

.lead {
  font-size: 20px;
  line-height: 30px;
  max-width: 720px;
  margin-bottom: 24px;
}

.hint {
  color: var(--grey);
}

.label-strong {
  font-weight: 600;
  margin: 0;
}

.strong-link,
.card-link,
.ink-link {
  font-weight: 600;
}

.ink-link {
  color: var(--ink);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  margin-top: 24px;
}

.actions-gap {
  margin: 0 0 48px;
}

.text-column {
  max-width: 720px;
}

.band {
  padding-top: 56px;
}

.band-last {
  padding-bottom: 64px;
}

.band-tight {
  margin-bottom: 48px;
}

.band h2,
.band-tight > h2 {
  margin-bottom: 16px;
}

.prose-section {
  margin-bottom: 32px;
}

.prose-section h2 {
  margin-bottom: 12px;
}

.question {
  border-top: 1px solid var(--line);
  padding: 4px 0;
  max-width: 720px;
}

.question:last-of-type {
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}

.question summary {
  font-weight: 600;
  padding: 12px 0;
  cursor: pointer;
}

.pairs {
  display: flex;
  flex-direction: column;
}

.pairs > div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.pairs > div:last-child {
  border-bottom: 1px solid var(--line);
}

.pairs dt {
  flex: 0 0 200px;
  font-weight: 600;
}

.pairs dd {
  flex: 1 1 200px;
  margin: 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 16px;
}

.cards-wide {
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  margin-bottom: 48px;
}

.card {
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card p:last-of-type {
  margin-bottom: 0;
}

.card-pale {
  background: var(--pale);
}

.card-heading {
  font-size: 26px;
  line-height: 32px;
}

.card-link {
  margin-top: auto;
}

.panel-peach,
.panel-line {
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.panel-peach {
  background: var(--peach);
}

.panel-peach a:not(.button) {
  color: var(--ink);
}

.panel-line {
  border: 2px solid var(--line);
}

.panel-peach p,
.panel-line p {
  margin: 0;
}

.aside h2,
.panel-line h2,
.panel-peach h2 {
  font-size: 22px;
  line-height: 28px;
}

.split {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 48px;
  align-items: flex-start;
}

.split > * {
  flex: 1 1 400px;
  min-width: 0;
}

.split > .panel-peach {
  padding: 32px;
}

.plain-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.plain-list a {
  display: inline-block;
  padding: 6px 0;
}

.plain-list a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

/* Shapes: decoration only, CSS shapes in the college's colours. */

.shapes {
  display: grid;
  gap: 12px;
}

.shapes span {
  display: block;
  aspect-ratio: 1;
  border-radius: var(--radius);
}

.shapes-hero {
  flex: 1 1 260px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 360px;
}

.shapes-hero span:nth-child(1) { background: var(--peach); border-radius: 50%; }
.shapes-hero span:nth-child(2) { background: var(--pale); }
.shapes-hero span:nth-child(3) { background: var(--green-2); border-radius: 0 50% 50% 0; }
.shapes-hero span:nth-child(4) { background: var(--green-2); }
.shapes-hero span:nth-child(5) { background: var(--peach); border-radius: 50% 50% 0 0; }
.shapes-hero span:nth-child(6) { background: var(--pale); border-radius: 50%; }

.shapes-small {
  flex: 1 1 220px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 260px;
}

.shapes-small span:nth-child(1) { background: var(--green); }
.shapes-small span:nth-child(2) { background: var(--peach); border-radius: 50% 50% 0 0; }
.shapes-small span:nth-child(3) { background: var(--peach); border-radius: 50%; }
.shapes-small span:nth-child(4) { background: var(--green); border-radius: 0 50% 50% 0; }

/* Home */

.hero {
  background: var(--green);
  color: var(--white);
}

.hero-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: center;
  padding-top: 56px;
  padding-bottom: 64px;
}

.hero-text {
  flex: 999 1 480px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero h1,
.hero .lead,
.hero form {
  margin: 0;
}

.hero .lead {
  max-width: 560px;
}

.hero-search {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 560px;
}

.hero-search label {
  font-weight: 600;
}

.hero-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-search input {
  flex: 1 1 220px;
  min-width: 0;
  border-color: var(--white);
}

.on-green {
  color: var(--white);
  font-weight: 600;
  align-self: flex-start;
}

.on-green:hover {
  color: var(--peach);
}

.area-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
  gap: 12px;
}

.area-links li + li {
  margin-top: 0;
}

.area-links a {
  display: block;
  height: 100%;
  padding: 16px 18px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.area-links a:hover {
  border-color: var(--green);
}

/* Course pages */

.key-facts {
  background: var(--white);
  border: 2px solid var(--green);
  border-radius: var(--radius);
  padding: 20px 24px;
}

.key-facts h2 {
  font-size: 22px;
  line-height: 28px;
  margin-bottom: 12px;
}

.key-facts dl,
.facts-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr));
  gap: 16px 24px;
  margin: 0;
}

.key-facts dt,
.facts-row dt,
.course-card dt {
  font-size: 15px;
  line-height: 20px;
  color: var(--grey);
}

.key-facts dd,
.facts-row dd {
  margin: 0;
  font-weight: 600;
  font-size: 20px;
  line-height: 28px;
}

.facts-row {
  max-width: 640px;
}

.with-aside {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: flex-start;
  padding-top: 40px;
  padding-bottom: 64px;
}

.with-aside-flush {
  padding-top: 0;
  padding-bottom: 0;
}

.article {
  flex: 999 1 560px;
  min-width: 0;
  max-width: 720px;
}

.aside {
  flex: 1 1 260px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.side-nav {
  background: var(--pale);
  border-radius: var(--radius);
  padding: 24px;
  gap: 8px;
}

.hero-split {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: center;
}

.hero-split > div:first-child {
  flex: 999 1 520px;
  min-width: 0;
}

.level-group {
  margin-bottom: 40px;
}

.level-group h2 {
  margin-bottom: 12px;
}

.course-rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.course-rows li {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  justify-content: space-between;
  margin: 0;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.course-rows li:last-child {
  border-bottom: 1px solid var(--line);
}

.course-rows a {
  font-weight: 600;
}

.course-rows span {
  color: var(--grey);
}

/* Course listing */

.listing {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: flex-start;
  margin-top: 32px;
}

.filters {
  flex: 1 1 250px;
  background: var(--pale);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.filters h2,
.results h2 {
  font-size: 22px;
  line-height: 28px;
}

.filters fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.filters legend {
  padding: 0;
  margin-bottom: 4px;
}

.filters input[type="search"],
.filters select {
  width: 100%;
}

.check {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 32px;
}

.check input {
  width: 24px;
  height: 24px;
  margin: 0;
  flex: none;
  accent-color: var(--green);
}

.filters .actions {
  margin-top: 0;
}

.results {
  flex: 999 1 520px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.course-card {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.course-card h3 {
  font-size: 24px;
  line-height: 30px;
}

.course-card dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr));
  gap: 8px 16px;
  margin: 0;
}

.course-card dd {
  margin: 0;
  font-weight: 600;
}

/* Fees */

.cta-band {
  background: var(--green);
  color: var(--white);
}

.cta-band a:not(.button-peach) {
  color: var(--white);
}

.cta-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: center;
  justify-content: space-between;
  padding-top: 40px;
  padding-bottom: 40px;
}

.cta-inner > div {
  flex: 1 1 380px;
  min-width: 0;
}

.cta-inner h2 {
  margin-bottom: 4px;
}

.cta-inner p {
  margin: 0;
}

/* Apply */

.steps {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 16px;
}

.steps li {
  margin: 0;
  background: var(--pale);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.steps p {
  margin: 0;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  font-family: var(--heading);
  font-weight: 700;
  font-size: 22px;
}

/* Open days */

.day-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.day {
  margin: 0;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
}

.day-list li + li {
  margin-top: 0;
}

.day > div {
  flex: 1 1 320px;
  min-width: 0;
}

.day h3 {
  font-size: 24px;
  line-height: 30px;
}

.day p {
  margin: 0;
}

.day-next {
  border-color: var(--green);
}

.tag {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 10px;
  background: var(--peach);
  border-radius: var(--radius);
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
}

.booking {
  background: var(--pale);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.booking .button {
  align-self: flex-start;
}

.booking p {
  margin: 0;
}

.input-short {
  width: 90px;
}

/* Student support */

.safety {
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 48px;
  max-width: 880px;
}

.safety h2 {
  font-size: 26px;
  line-height: 32px;
  margin-bottom: 8px;
}

.safety p:last-child {
  margin-bottom: 0;
}

/* Contact */

.table-scroll {
  overflow-x: auto;
  max-width: 100%;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
  text-align: left;
}

th,
td {
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

thead th {
  border-bottom: 2px solid var(--ink);
}

tbody th {
  font-weight: 600;
}

/* Footer: 120 pixels at the bottom, so the floating launcher never covers its text. */

.site-footer {
  background: var(--ink);
  color: var(--white);
  padding-top: 48px;
  padding-bottom: 120px;
}

.site-footer a {
  color: var(--white);
}

.site-footer a:hover {
  color: var(--peach);
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.footer-columns p {
  margin: 0 0 6px;
}

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

.footer-columns li + li {
  margin-top: 6px;
}

.footer-name {
  font-family: var(--heading);
  font-weight: 700;
  font-size: 22px;
}

.footer-heading {
  font-weight: 600;
  color: var(--footer-soft);
}

.footer-note {
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid var(--grey);
  color: var(--footer-soft);
}

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