@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;550;600;650;700&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  --paper: #faf9f6;
  --ink: #292b2c;
  --muted: #656768;
  --accent: #6553bd;
  --accent-dark: #4d3e98;
  --lilac: #eeebf7;
  --line: #e2e1dc;
  --radius: 18px;
  --page: 1180px;
  --sans: 'DM Sans', system-ui, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
body.menu-open { overflow: hidden; }
::selection { background: #dcd5f4; color: var(--ink); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 6px; }
button { border: 0; }
img { max-width: 100%; display: block; }
svg { display: block; flex-shrink: 0; }
[hidden] { display: none !important; }
.container { width: min(var(--page), calc(100% - 96px)); margin-inline: auto; }
.skip-link { position: fixed; top: -70px; left: 16px; z-index: 50; background: var(--ink); color: white; padding: 10px 20px; border-radius: 8px; }
.skip-link:focus { top: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(250,249,246,.94); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.header-inner { height: 90px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-size: 19px; font-weight: 650; letter-spacing: -.6px; }
.monogram { display: grid; place-items: center; height: 38px; width: 38px; color: var(--accent); border: 1px solid #d9d3eb; border-radius: 50%; font: 30px/1 var(--serif); }
.desktop-nav { display: flex; align-items: center; gap: 32px; font-size: 13px; font-weight: 550; }
.nav-link { position: relative; color: var(--muted); padding-block: 8px; }
.nav-link::after { content: ''; position: absolute; left: 0; right: 0; bottom: 1px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .2s; }
.nav-link:hover, .nav-link[aria-current] { color: var(--accent); }
.nav-link:hover::after, .nav-link[aria-current]::after { transform: scaleX(1); }
.menu-button { display: flex; align-items: center; gap: 10px; padding: 10px 0 10px 18px; border-left: 1px solid var(--line); background: transparent; font-size: 13px; }
.progress { position: absolute; bottom: -1px; left: 0; height: 2px; background: var(--accent); width: 0; transition: width .1s linear; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 11px; font-weight: 650; letter-spacing: 1.8px; text-transform: uppercase; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.hero { display: grid; grid-template-columns: 1.35fr 1fr; gap: 26px; padding-block: 30px 24px; align-items: center; }
.hero-copy { min-width: 0; }
.hero h1 { font-size: clamp(44px, 4.5vw, 60px); font-weight: 450; line-height: 1.07; letter-spacing: -2.8px; margin: 14px 0 16px; }
.hero h1 em { color: var(--accent); font: italic 1.2em/.92 var(--serif); letter-spacing: -2px; display: block; margin-top: 4px; }
.hero-greeting { color: var(--muted); font-size: 15px; margin: 0 0 18px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 25px; }
.button { display: inline-flex; gap: 18px; align-items: center; justify-content: space-between; border-radius: 50px; padding: 14px 22px; font-size: 13px; font-weight: 550; transition: background .2s, transform .2s; }
.button-primary { background: var(--accent); color: #fff; }
.button-primary:hover { background: var(--accent-dark); transform: translateY(-2px); }
.text-link { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 550; }
.text-link:hover { color: var(--accent); }
.hero-collage { position: relative; width: 100%; height: 240px; margin: 0; }
.collage-glow { position: absolute; width: 225px; height: 180px; top: 30px; right: 35px; border-radius: 50%; background: url('assets/original-banner.png') 20% 50% / 390% auto; opacity: .5; filter: blur(30px); }
.photo { position: absolute; margin: 0; background: #fff; padding: 8px; border-radius: 5px; box-shadow: 0 14px 36px rgba(50,41,73,.09); transition: transform .5s; }
.photo img { height: 100%; width: 100%; object-fit: cover; border-radius: 2px; }
.photo-sailing { width: 150px; height: 185px; right: 32px; top: 4px; transform: rotate(7deg); }
.photo-music { width: 125px; height: 142px; left: 55px; bottom: 4px; transform: rotate(-9deg); }
.hero-collage:hover .photo-sailing { transform: rotate(3deg) translateY(-5px); }
.hero-collage:hover .photo-music { transform: rotate(-5deg) translateY(-3px); }
.collage-star { color: var(--accent); position: absolute; width: 56px; top: 18px; left: 46px; transform: rotate(-8deg); }
.collage-note { position: absolute; bottom: 12px; right: 10px; font: italic 20px/1.05 var(--serif); color: var(--accent); transform: rotate(-5deg); max-width: 115px; }
.section { padding-block: 90px; }
#chapters { padding-top: 16px; border-top: 1px solid var(--line); }
#chapters .filters { margin-bottom: 18px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
h2 { font-size: clamp(34px, 4.4vw, 52px); font-weight: 450; letter-spacing: -2.2px; line-height: 1.12; margin: 16px 0 0; }
h2 em { font-family: var(--serif); font-weight: 400; font-size: 1.17em; color: var(--accent); }
.section-count { color: var(--muted); font-size: 12px; padding-bottom: 5px; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-bottom: 30px; }
.filter { padding: 8px 17px; border: 1px solid var(--line); border-radius: 30px; font-size: 12px; background: transparent; transition: background .2s, border-color .2s; }
.filter:hover { border-color: #bcb1df; background: var(--lilac); }
.filter[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: white; }
.chapter-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 28px 24px; }
.chapter { min-width: 0; }
.chapter-image { position: relative; aspect-ratio: 1.42; border-radius: var(--radius); overflow: hidden; background: #e6e5df; }
.chapter-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s cubic-bezier(.2,.8,.2,1); }
.chapter:hover .chapter-image img { transform: scale(1.055); }
.chapter-number { position: absolute; top: 15px; left: 15px; font-size: 10px; font-weight: 600; color: #353437; background: rgba(250,249,246,.93); border-radius: 50%; width: 29px; height: 29px; display: grid; place-items: center; }
.chapter-caption { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 16px 2px 7px; }
.chapter h3 { font-weight: 550; font-size: 17px; line-height: 1.35; margin: 0; letter-spacing: -.4px; }
.chapter-arrow { flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: background .2s, color .2s, border-color .2s; }
.chapter:hover .chapter-arrow { background: var(--accent); border-color: var(--accent); color: white; }
.chapter:focus-visible { display: block; border-radius: var(--radius); }
.chapter[data-category='work'] .chapter-image { background: #e1e6df; }
.about { border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1.65fr; gap: 90px; }
.about-heading h2 { max-width: 300px; }
.about-heading .about-flower { margin-top: 45px; color: #a79acb; }
.about-copy { color: #55585a; font-size: 16px; line-height: 1.9; }
.about-copy p { margin: 0 0 20px; }
.about-copy p:last-child { margin: 0; }
.project-section { padding-block: 0 84px; }
.project-feature { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 32px; position: relative; overflow: hidden; border-radius: 24px; padding: 42px 46px; background: var(--lilac); border: 1px solid #e3deef; }
.project-feature .eyebrow { color: var(--accent-dark); }
.project-feature h2 { font-size: clamp(28px, 3.8vw, 42px); margin-block: 14px 8px; letter-spacing: -1.5px; }
.project-url { color: var(--accent-dark); font-size: 13px; display: inline-flex; align-items: center; gap: 8px; }
.project-feature .button { background: var(--paper); border: 1px solid #ded7ee; color: var(--accent-dark); white-space: nowrap; }
.project-feature .button:hover { background: var(--accent); color: white; transform: translateY(-2px); }
.waveform { display: flex; align-items: center; gap: 4px; height: 29px; color: var(--accent); }
.waveform span { display: block; width: 3px; border-radius: 4px; height: var(--height); background: currentColor; }
.site-footer { border-top: 1px solid var(--line); padding-block: 32px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 25px; }
.footer-brand { font: 25px var(--serif); }
.footer-inner p { color: var(--muted); font-size: 11px; margin: 7px 0 0; }
.footer-links { display: flex; align-items: center; gap: 25px; color: var(--muted); font-size: 12px; }
.footer-links a:hover { color: var(--accent); }
.menu-dialog { max-width: 1000px; width: calc(100% - 48px); max-height: calc(100dvh - 48px); margin: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 38px; color: var(--ink); opacity: 0; transform: translateY(18px) scale(.985); transition: opacity 220ms ease, transform 320ms cubic-bezier(.22,1,.36,1); box-shadow: 0 24px 80px rgba(37,33,49,.12); overscroll-behavior: contain; }
.menu-dialog.is-visible { opacity: 1; transform: translateY(0) scale(1); }
.menu-dialog.is-closing { pointer-events: none; }
.menu-dialog::backdrop { background: rgba(37,33,49,.3); backdrop-filter: blur(8px); opacity: 0; transition: opacity 260ms ease; }
.menu-dialog.is-visible::backdrop { opacity: 1; }
.menu-button svg path { transform-origin: center; transition: transform 220ms ease; }
.menu-button[aria-expanded='true'] svg path { transform: rotate(90deg); }
.menu-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 34px; }
.menu-heading h2 { font-size: 34px; margin: 0; }
.close-menu { display: grid; place-items: center; border: 1px solid var(--line); background: transparent; border-radius: 50%; width: 42px; height: 42px; flex-shrink: 0; transition: background 180ms ease, transform 220ms ease; }
.close-menu:hover { background: var(--lilac); transform: rotate(90deg); }
.menu-shortcuts { display: flex; gap: 24px; padding-bottom: 20px; margin-bottom: 28px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--accent); }
.all-navigation > ul { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 28px; }
.all-navigation ul { padding: 0; margin: 0; list-style: none; }
.all-navigation > ul > li > a { display: inline-block; font-size: 15px; font-weight: 650; margin-bottom: 9px; }
.all-navigation > ul > li > ul > li a { display: inline-block; font-size: 12px; color: var(--muted); padding-block: 4px; }
.all-navigation ul ul ul { border-left: 1px solid var(--line); padding-left: 12px; }
.all-navigation a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.all-navigation a[href*='hearinglossimulator.com'] { color: var(--accent); }
.all-navigation a[href*='hearinglossimulator.com']::after { content: ' ↗'; }
@media (max-width: 1100px) {
  .hero h1 { font-size: clamp(42px, 4.7vw, 52px); letter-spacing: -2.6px; }
  .hero { grid-template-columns: 1.35fr 1fr; padding-block: 28px 22px; }
  .hero-collage { height: 220px; }
  .photo-sailing { width: 140px; height: 170px; right: 8px; }
  .photo-music { width: 120px; height: 138px; left: 15px; }
  .collage-star { left: 14px; width: 50px; }
  .collage-note { bottom: 12px; right: -4px; font-size: 19px; }
  .collage-glow { width: 200px; right: 0; }
  .about { gap: 45px; }
}
@media (max-width: 800px) {
  .container { width: calc(100% - 48px); }
  .header-inner { height: 76px; }
  .desktop-nav { gap: 22px; }
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 26px; gap: 12px; }
  .hero h1 { font-size: clamp(42px, 6.2vw, 50px); }
  .hero-collage { width: min(300px, 100%); height: 175px; margin: 0 auto; }
  .photo-sailing { right: 22px; height: 150px; width: 125px; }
  .photo-music { left: 22px; width: 108px; height: 124px; }
  .collage-star { left: 34px; width: 40px; top: 10px; }
  .collage-note { right: 0; bottom: 4px; font-size: 17px; max-width: 103px; }
  .section { padding-block: 64px; }
  #chapters { padding-top: 20px; }
  .chapter-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 26px 20px; }
  .chapter h3 { font-size: 16px; }
  .about { grid-template-columns: 1fr; gap: 28px; }
  .about-heading { display: flex; align-items: center; justify-content: space-between; }
  .about-heading .about-flower { margin: 0; width: 64px; }
  .project-feature { padding: 32px; }
  .project-section { padding-bottom: 64px; }
  .all-navigation > ul { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 480px) {
  .container { width: calc(100% - 40px); }
  html { scroll-padding-top: 90px; }
  .header-inner { height: 72px; }
  .brand { font-size: 17px; gap: 9px; }
  .monogram { height: 33px; width: 33px; font-size: 26px; }
  .desktop-nav > .nav-link { display: none; }
  .hero { padding-block: 22px 18px; }
  .hero h1 { font-size: clamp(34px, 9.5vw, 42px); letter-spacing: -1.9px; }
  .hero h1 em { letter-spacing: -1.2px; }
  .hero-actions { gap: 12px 14px; }
  .button { padding: 13px 19px; font-size: 12px; }
  .hero-greeting { font-size: 14px; }
  .hero-collage { height: 155px; width: 260px; max-width: 100%; }
  .photo-sailing { width: 108px; height: 132px; right: 20px; }
  .photo-music { width: 95px; height: 110px; left: 12px; bottom: 6px; }
  .collage-star { top: 10px; left: 22px; width: 35px; }
  .collage-note { font-size: 16px; max-width: 93px; right: 0; bottom: 1px; }
  .section-heading { align-items: flex-start; }
  .section-count { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  h2 { font-size: 36px; letter-spacing: -1.5px; }
  .chapter-grid { gap: 22px 14px; }
  .chapter-image { border-radius: 12px; aspect-ratio: 1.06; }
  .chapter-number { top: 9px; left: 9px; width: 24px; height: 24px; font-size: 9px; }
  .chapter h3 { font-size: 14px; letter-spacing: -.3px; }
  .chapter-caption { padding-top: 13px; align-items: flex-start; }
  .chapter-arrow { width: 24px; height: 24px; }
  .chapter-arrow svg { width: 12px; height: 12px; }
  .filter { padding: 8px 13px; font-size: 11px; }
  .about-copy { font-size: 15px; }
  .project-feature { grid-template-columns: 1fr; padding: 28px 24px; gap: 20px; border-radius: 18px; }
  .project-feature h2 { font-size: 31px; }
  .project-feature .button { justify-self: start; }
  .footer-inner { align-items: flex-start; }
  .footer-links { gap: 16px; }
  .footer-links a:first-child { display: none; }
  .menu-dialog { padding: 24px; width: calc(100% - 24px); max-height: calc(100dvh - 24px); border-radius: 16px; }
  .menu-heading h2 { font-size: 28px; }
  .all-navigation > ul { grid-template-columns: 1fr; gap: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
