/* Swing Lab — Protocol style (Swiss grid, hairlines, mono labels, numbered
   sections) on the Studio layout, with the Protocol colour palette. */

:root {
  --paper: #f3f1eb;
  --paper-2: #ddd9ce;
  --card: #ffffff;
  --ink: #121212;
  --ink-2: #333333;
  --mute: #6b6b66;
  --line: #cfccc3;
  --line-strong: #b8b4a8;
  --accent: #1f3dff;
  --accent-deep: #1529cc;

  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --disp: "Space Grotesk", var(--sans);
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-padding-top: 80px;
  -webkit-tap-highlight-color: rgba(31, 61, 255, 0.2);
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

@media (pointer: fine) {
  body {
    overscroll-behavior: none;
  }
}

a {
  color: inherit;
  text-decoration: none;
  touch-action: manipulation;
}

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

.mono {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}

h1,
h2,
h3 {
  font-family: var(--disp);
  font-weight: 500;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

em {
  font-style: normal;
  color: var(--accent-deep);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  border: 1px solid var(--ink);
  padding: 11px 20px;
  border-radius: 2px;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  touch-action: manipulation;
}

.btn:hover,
.btn:focus-visible {
  background: var(--ink);
  color: var(--paper);
}

.btn--fill {
  background: var(--ink);
  color: var(--paper);
}

.btn--fill:hover,
.btn--fill:focus-visible {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}

.btn--accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn--accent:hover,
.btn--accent:focus-visible {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: #fff;
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 9;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  font-family: var(--disp);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.brand span {
  color: var(--accent);
}

.nav__links {
  display: flex;
  gap: 28px;
  list-style: none;
  font-size: 14px;
}

.nav__links a:hover {
  color: var(--accent-deep);
}

/* ---------- Hero ---------- */

.hero {
  padding: 80px 0 40px;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.7fr);
  gap: 48px;
  align-items: start;
}

.hero__copy {
  display: grid;
  justify-items: start;
  align-content: center;
  min-height: 0;
}

h1 {
  font-size: clamp(44px, 6.2vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.hero__lede {
  font-size: 19px;
  max-width: 38ch;
  color: var(--ink-2);
  margin: 26px 0 32px;
}

.hero__visual {
  width: 100%;
  max-width: 360px;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 18%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  display: block;
  justify-self: end;
}

/* ---------- Image placeholders ---------- */

.ph {
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(160deg, #c9c5b8 0%, #a8a497 100%);
}

.ph span {
  color: #fff;
  opacity: 0.85;
}

.ph--portrait {
  aspect-ratio: 4 / 5;
}

.ph--wide {
  min-height: clamp(18rem, 26vw, 24rem);
}

/* ---------- Sections ---------- */

.section {
  padding: 84px 0;
  scroll-margin-top: 80px;
}

.hero + .section {
  padding-top: 0;
}

.hero + .section > .wrap::before {
  content: "";
  display: block;
  border-top: 1px solid var(--line);
  margin-bottom: 56px;
}

.shead {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 44px;
}

.shead .mono {
  font-size: clamp(22px, 2.8vw, 36px);
  letter-spacing: 0.04em;
  line-height: 1.15;
  color: var(--ink);
}

h2 {
  font-size: clamp(30px, 3.6vw, 48px);
  line-height: 1.04;
  letter-spacing: -0.025em;
}

/* ---------- Offer grid ---------- */

.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.grid3 > a {
  background: var(--paper);
  padding: 26px 24px 28px;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  /* Titles stay on one line across the row; the enquire link sits at the bottom. */
  justify-content: flex-start;
  transition: background-color 0.15s ease;
}

.grid3 > a:hover,
.grid3 > a:focus-visible {
  background: var(--card);
}

.grid3 h3 {
  font-size: 22px;
  margin: 48px 0 8px;
}

.grid3 p {
  font-size: 14px;
  color: var(--ink-2);
}

.grid3 .go {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-deep);
  margin-top: auto;
  padding-top: 22px;
}

/* ---------- About ---------- */

.about {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}

.about__media {
  width: 100%;
  /* height:auto is required — the img's height attribute would otherwise
     make the box definite and aspect-ratio would be ignored. */
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  display: block;
}

.about__copy {
  display: grid;
  align-content: center;
  gap: 16px;
}

.about + .about {
  margin-top: 56px;
}

.about--reverse .about__media {
  grid-column: 2;
  grid-row: 1;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
}

.about--reverse .about__copy {
  grid-column: 1;
  grid-row: 1;
}

.about__copy h3 {
  font-size: 26px;
}

.roles {
  color: var(--accent-deep);
}

.about__copy p {
  max-width: 44ch;
  font-size: 16px;
  color: var(--ink-2);
}

.about__note {
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--mute);
}

.about__note b {
  color: var(--ink);
  font-weight: 500;
}

/* ---------- Events ---------- */

.events {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.event--featured {
  grid-column: 1 / -1;
}

.event--featured .event__frame {
  aspect-ratio: 16 / 7;
}

.event__frame .event__img--swing-lab {
  object-position: center 45%;
}

.event__frame {
  border: 1px solid var(--line-strong);
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

/* Past-event posters are 16:9 with text near the edges, so show them uncropped */
.event__frame--wide {
  aspect-ratio: 16 / 9;
}

.event__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

/* Portrait poster in a 16:10 frame: keep her face in view and the dates on
   the bottom edge */
.event__frame .event__img--jazz-lab {
  object-position: center 31%;
}

.event:hover .event__frame img,
.event:focus-visible .event__frame img {
  transform: scale(1.03);
}

.event__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
}

.event__row h3 {
  font-size: 22px;
  min-width: 0;
}

.event .go {
  flex: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-deep);
  white-space: nowrap;
}

.event__credit {
  margin: 8px 0 0;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--mute);
  line-height: 1.35;
}

.events__more {
  margin-top: 40px;
}

.events__more > a,
a.events__more {
  color: var(--accent-deep);
  font-weight: 500;
}

.events__more > a:hover,
.events__more > a:focus-visible,
a.events__more:hover,
a.events__more:focus-visible {
  color: var(--ink);
}

/* ---------- Contact ---------- */

.cta {
  background: var(--ink);
  color: var(--paper);
  padding: 80px 0;
}

.cta__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 48px;
  align-items: start;
}

.cta h2 {
  color: #fff;
  font-size: clamp(32px, 4.2vw, 56px);
  line-height: 1;
  margin-bottom: 20px;
}

.cta__intro p {
  max-width: 34ch;
  font-size: 16px;
  color: #bdbdb7;
  line-height: 1.5;
}

.cta__alt {
  margin-top: 28px;
  color: #9a9a94;
}

.cta__alt a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cta__alt a:hover {
  color: var(--accent);
}

.form {
  display: grid;
  gap: 18px;
}

.form__honey {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
}

.form__field {
  display: grid;
  gap: 8px;
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.form__field .mono,
.form__field legend {
  color: #9a9a94;
  padding: 0;
}

.form__checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
}

.form__check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #fff;
  cursor: pointer;
}

.form__check input {
  width: 16px;
  height: 16px;
  flex: none;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.form input[type="text"],
.form input[type="email"],
.form textarea {
  width: 100%;
  background: transparent;
  border: 1px solid #333;
  border-radius: 2px;
  color: #fff;
  font: inherit;
  font-size: 15px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.15s ease;
  appearance: none;
  touch-action: manipulation;
}

.form textarea {
  resize: vertical;
  min-height: 120px;
}

.form input::placeholder,
.form textarea::placeholder {
  color: #6b6b66;
}

.form input[type="text"]:focus-visible,
.form input[type="email"]:focus-visible,
.form textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
}

.form .btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  margin-top: 4px;
  cursor: pointer;
}

.form .btn:disabled {
  cursor: wait;
  opacity: 0.75;
}

.form__spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: form-spin 0.7s linear infinite;
}

.form .btn.is-loading .form__spinner {
  display: block;
}

@keyframes form-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Footer ---------- */

.footer {
  padding: 48px 0 40px;
}

.footer__cols {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 80px;
  position: relative;
  z-index: 1;
}

.footer__col ul {
  list-style: none;
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.footer__col a {
  font-size: 15px;
  color: var(--ink-2);
}

.footer__col a:hover,
.footer__col a:focus-visible {
  color: var(--accent-deep);
}

.wordmark {
  font-family: var(--disp);
  font-weight: 600;
  font-size: clamp(80px, 14vw, 200px);
  letter-spacing: -0.05em;
  line-height: 0.85;
  margin-top: 40px;
  color: var(--ink);
  pointer-events: none;
}

.wordmark span {
  color: var(--accent);
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .grid3 {
    grid-template-columns: 1fr;
  }
  .grid3 > a {
    min-height: 0;
  }
  .grid3 h3 {
    margin-top: 32px;
  }
}

@media (max-width: 760px) {
  .wrap {
    padding: 0 20px;
  }
  .nav__links {
    display: none;
  }
  .hero {
    padding: 48px 0 32px;
  }
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .hero__visual {
    max-width: 280px;
    justify-self: start;
  }
  .section {
    padding: 56px 0;
  }
  .hero + .section {
    padding-top: 0;
  }
  .hero + .section > .wrap::before {
    margin-bottom: 36px;
  }
  .shead {
    margin-bottom: 28px;
  }
  .about {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .about + .about {
    margin-top: 44px;
  }
  .about--reverse .about__media,
  .about--reverse .about__copy {
    grid-column: 1;
    grid-row: auto;
  }
  .about--reverse .about__media {
    aspect-ratio: auto;
  }
  .event--featured {
    grid-column: auto;
  }
  .event--featured .event__frame {
    aspect-ratio: 16 / 10;
  }
  .events {
    grid-template-columns: 1fr;
  }
  .cta {
    padding: 56px 0;
  }
  .cta__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
