@font-face {
  font-family: Bricolage;
  src: url("assets/bricolage.ttf") format("truetype");
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --navy: #102643;
  --blue: #095bab;
  --deep-blue: #0d3e78;
  --gold: #ffd04f;
  --paper: #fcfaf3;
  --ink: #152b42;
  --muted: #435367;
  --line: #c8cfd8;
  --font: system-ui, sans-serif;
  --heading: Bricolage, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font);
  line-height: 1.55;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
p, h1, h2, h3 { margin: 0; }
h1, h2, h3 { font-family: var(--heading); line-height: 1.03; }
h2 { font-size: clamp(2.25rem, 5.5vw, 4.5rem); letter-spacing: -.055em; }
h3 { font-size: 1.6rem; letter-spacing: -.035em; }
:focus-visible { outline: 3px dashed currentColor; outline-offset: 5px; }
section[id] { scroll-margin-top: 24px; }

.wrap { width: min(calc(100% - 2 * clamp(18px, 6vw, 90px)), 1200px); margin-inline: auto; }
.skip-link { position: absolute; z-index: 4; top: .5rem; left: .5rem; padding: .65rem .85rem; background: #fff; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.header { background: var(--paper); position: relative; z-index: 2; }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 75px; gap: 20px; }
.brand { display: block; width: 115px; height: 50px; overflow: hidden; flex: 0 0 auto; background: var(--blue); }
.brand img { width: 100%; height: 100%; object-fit: cover; }
.desktop-nav { display: flex; align-items: center; gap: clamp(15px, 3.5vw, 54px); }
.desktop-nav a, .mobile-menu nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  font-size: .93rem;
  font-weight: 650;
}
.desktop-nav a:hover, .mobile-menu nav a:hover { text-decoration: underline; text-underline-offset: .25em; }
.button {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  min-height: 46px;
  gap: .62em;
  align-items: center;
  justify-content: center;
  padding: .55em 1em;
  text-decoration: none;
  border: 1px solid currentColor;
  font-weight: 730;
  line-height: 1.2;
  transition: background-color .2s, color .2s, transform .2s;
}
.button:hover { transform: translateY(-2px); }
.button:not(.button-gold):hover { background: var(--navy); color: white; }
.text-link {
  display: inline-flex;
  max-width: 100%;
  min-height: 44px;
  align-items: center;
  gap: .5em;
  width: fit-content;
  font-size: .96rem;
  font-weight: 700;
  text-underline-offset: .26em;
  text-decoration-thickness: 1px;
}
.text-link:hover { text-decoration-thickness: 2px; }
.mobile-menu { display: none; }

.hero {
  position: relative;
  isolation: isolate;
  color: white;
  background: var(--navy);
  border-bottom: 5px solid var(--gold);
}
.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: end;
  align-items: end;
  gap: 20px;
  min-height: clamp(620px, calc(100svh - 120px), 900px);
  padding-block: 60px 40px;
}
.hero-copy, .hero-controls {
  position: relative;
  z-index: 1;
}
.hero-gallery, .hero-visual, .hero-gallery::after {
  position: absolute;
  inset: 0;
}
.hero-gallery {
  pointer-events: none;
}
.hero-gallery::after {
  content: "";
  background:
    linear-gradient(90deg, rgba(10, 26, 46, .97) 5%, rgba(10, 26, 46, .87) 28%, rgba(10, 26, 46, .22) 58%, transparent 80%),
    linear-gradient(0deg, rgba(10, 26, 46, .72), transparent 58%);
}
.hero-visual {
  margin: 0;
}
.hero-visual[hidden], .hero-controls[hidden] {
  display: none;
}
.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-visual-drawing img {
  object-position: center 43%;
}
.hero-visual-exhibit img {
  object-position: center 60%;
}
.hero-controls {
  display: flex;
  width: max-content;
  max-width: 100%;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: #102643;
}
.hero-progress {
  padding-inline: 4px;
  color: #d9e8fb;
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.hero-controls button {
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: white;
  cursor: pointer;
  font: inherit;
  font-size: .81rem;
  font-weight: 700;
  white-space: nowrap;
}
.hero-controls button:hover {
  background: #ffffff15;
}
.hero-controls button[aria-pressed="true"] {
  border-bottom-color: var(--gold);
  color: var(--gold);
}
.hero-controls button:focus-visible {
  outline: 2px solid white;
  outline-offset: -3px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.overline {
  display: flex;
  gap: .62em;
  align-items: center;
  font-weight: 700;
  font-size: .85rem;
}
.overline span { width: .75em; height: .75em; flex: 0 0 auto; background: var(--gold); transform: rotate(-8deg); }
h1 {
  max-width: 10ch;
  margin-top: 18px;
  font-size: clamp(3rem, 6.75vw, 6.7rem);
  letter-spacing: -.065em;
  line-height: .91;
}
h1 em { color: var(--gold); font-style: normal; }
.intro { max-width: 34ch; margin-block: 25px 27px; font-size: clamp(1rem, 1.9vw, 1.2rem); }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; }
.button-gold { color: var(--navy); background: var(--gold); border-color: var(--gold); }
.button-gold:hover { background: #ffe48d; border-color: #ffe48d; }
.hero .button:focus-visible, .contact .button:focus-visible { outline-color: white; }

.section { padding-block: clamp(54px, 8.3vw, 110px); }
.section-heading { display: grid; grid-template-columns: 1.65fr 1fr; align-items: end; gap: 14px 48px; margin-bottom: clamp(26px, 4vw, 52px); }
.section-heading p, .school p, .workshops p { color: var(--muted); }
.section-heading p { max-width: 36ch; padding-bottom: .15em; }
.course-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 3vw, 35px); }
.course { border: 1px solid var(--line); background: white; }
.course-art {
  display: grid;
  place-items: center;
  position: relative;
  isolation: isolate;
  min-height: 150px;
  height: clamp(150px, 17vw, 230px);
  overflow: hidden;
}
.course-art span, .course-art span::before, .course-art span::after { position: absolute; display: block; }
.course-art span::before, .course-art span::after { content: ""; }
.manga .course-art { background: #d9eaff; }
.manga span {
  width: 105px;
  height: 63px;
  border: 4px solid var(--navy);
  border-radius: 75% 20% 75% 20%;
  transform: rotate(11deg);
  background: #fff;
  box-shadow: 13px 19px 0 -7px #a1c9f4;
}
.manga span::before { width: 38px; aspect-ratio: 1; top: 7px; left: 36%; border-radius: 50%; background: radial-gradient(circle at 62% 36%, white 0 13%, var(--navy) 15% 31%, var(--blue) 33% 65%, var(--navy) 67%); }
.manga span::after { width: 45px; height: 3px; left: -18px; top: 51px; background: var(--navy); transform: rotate(-18deg); }
.comics .course-art { background: var(--gold); }
.comics span {
  width: 125px;
  aspect-ratio: 1.2;
  background: var(--navy);
  clip-path: polygon(50% 0%, 65% 25%, 100% 12%, 81% 46%, 100% 61%, 72% 70%, 81% 100%, 49% 83%, 29% 99%, 28% 76%, 0 70%, 20% 49%, 2% 20%, 34% 26%);
}
.comics span::before { inset: 6px; background: #fff6d9; clip-path: inherit; }
.comics span::after { width: 30%; height: 8px; inset: 48% auto auto 35%; transform: rotate(-20deg); background: var(--navy); }
.cartoon .course-art { background: #b8d8fc; }
.cartoon span {
  width: 82px;
  height: 91px;
  border-radius: 48% 49% 54% 47%;
  border: 4px solid var(--navy);
  transform: rotate(-13deg);
  background: var(--paper);
  box-shadow: 13px 11px var(--blue);
}
.cartoon span::before { width: 9px; height: 15px; border-radius: 50%; background: var(--navy); top: 28px; left: 20px; box-shadow: 24px -2px var(--navy); }
.cartoon span::after { width: 27px; height: 12px; border: 3px solid var(--navy); border-width: 0 0 3px; border-radius: 50%; top: 43px; left: 25px; }
.course-copy { padding: 21px clamp(14px, 2vw, 27px) 15px; }
.course p { margin-top: 9px; color: var(--muted); }
.course .text-link { margin-top: 9px; }

.school { background: #e7f0fb; }
.school-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px clamp(24px, 7vw, 105px);
  align-items: center;
}
.school h2 { margin-top: 11px; }
.school .overline { color: var(--deep-blue); }
.school p + p { margin-top: 11px; }
.school .text-link { margin-top: 8px; }
.workshops { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 35px; }
.workshops article { border-top: 1px solid var(--line); padding-top: 18px; }
.workshops p { margin-block: 8px; }
.workshop-photo { grid-column: 1 / -1; margin: 0; }
.workshop-photo img {
  width: 100%;
  max-height: 490px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.contact { background: var(--navy); color: white; padding-block: clamp(47px, 7vw, 96px); }
.contact-grid { display: grid; grid-template-columns: 1fr .7fr; gap: 37px clamp(24px, 6vw, 80px); align-items: center; }
.contact p { margin: 12px 0 20px; color: #d9e8fb; }
.address { border-left: 1px solid #7891af; padding-left: clamp(18px, 4vw, 53px); }
.address address { margin: 12px 0 5px; font-style: normal; color: #d9e8fb; }
.footer { padding-block: 12px; background: #0b1b30; color: white; font-size: .86rem; }
.footer .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0 20px; }

@media (max-width: 790px) {
  .topbar { min-height: 65px; }
  .desktop-nav, .header-contact { display: none; }
  .mobile-menu { display: block; }
  .mobile-menu summary {
    display: flex;
    align-items: center;
    gap: .7rem;
    min-height: 46px;
    list-style: none;
    cursor: pointer;
    padding-inline: .6em;
    font-weight: 700;
  }
  .mobile-menu summary::-webkit-details-marker { display: none; }
  .mobile-menu summary span {
    width: 17px;
    height: 9px;
    border-top: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
  }

  .mobile-menu nav {
    position: absolute;
    inset: 100% 0 auto;
    display: grid;
    padding: 8px 6vw 17px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    box-shadow: 0 8px 12px #10264312;
  }
  .hero-layout {
    min-height: clamp(568px, calc(100svh - 122px), 736px);
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding-block: 148px 20px;
  }
  .hero-gallery::after {
    background: linear-gradient(0deg, #0a1a2e 4%, rgba(10, 26, 46, .94) 26%, rgba(10, 26, 46, .77) 52%, transparent 88%);
  }
  .hero-visual-exhibit img { object-position: 55% center; }
  h1 { font-size: clamp(3rem, 9.3vw, 5.4rem); }
  .section-heading { grid-template-columns: 1fr; }
  .intro { margin-block: 20px; }
}

@media (max-width: 560px) {
  .course-grid, .school-grid, .contact-grid, .workshops { grid-template-columns: 1fr; }
  .course-art { height: 154px; }
  .course-copy { padding-inline: 17px; }
  .address { border-left: 0; border-top: 1px solid #7891af; padding: 22px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
