/* IIC 2027 information pages. Course colour: ITF Instructor courses, Pantone 2603 C (ITF identity manual). */
@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-latin-wdth-normal.woff2") format("woff2-variations");
  font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2-variations");
  font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --purple: #702082;      /* Instructor course colour */
  --purple-deep: #3b1046; /* footer, pressed states */
  --purple-wash: #f3ecf6; /* to-be-confirmed tags, alternate sections */
  --ink: #221f26;
  --muted: #5e5966;
  --rule: #e3dde8;
  --paper: #ffffff;
  --itf-yellow: #f6be00; --itf-green: #319b42; --itf-blue: #407ec9; --itf-red: #ee2737;
  --measure: 40rem;
  --wrap: 72rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem; line-height: 1.6; font-stretch: 100%;
}
img { max-width: 100%; height: auto; }
a { color: var(--purple); text-underline-offset: 0.15em; }
a:hover { color: var(--purple-deep); }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--paper); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }

/* The four ITF colours as a belt: page top, hero, footer */
.belt { display: flex; height: 6px; }
.belt span { flex: 1; }
.belt span:nth-child(1) { background: var(--itf-yellow); }
.belt span:nth-child(2) { background: var(--itf-green); }
.belt span:nth-child(3) { background: var(--itf-blue); }
.belt span:nth-child(4) { background: var(--itf-red); }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); background: var(--paper); }
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 4.25rem; }
.brand { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; color: var(--ink); line-height: 1.15; margin-right: auto; }
.brand-logo { flex: none; width: 2.9rem; height: 2.9rem; }
.brand-text { min-width: 0; }
.brand strong { display: block; font-stretch: 72%; font-weight: 800; font-size: 1.45rem; letter-spacing: 0.01em; color: var(--purple); }
.brand small { font-size: 0.8rem; color: var(--muted); }
.site-nav { display: flex; gap: 1rem; overflow-x: auto; scrollbar-width: none; }
.site-nav a { color: var(--ink); text-decoration: none; font-size: 0.95rem; white-space: nowrap; padding: 0.35rem 0; }
.site-nav a:hover { color: var(--purple); box-shadow: inset 0 -2px 0 var(--purple); }

.button {
  display: inline-block; font: inherit; font-weight: 650; font-size: 1rem; line-height: 1.2;
  text-decoration: none; padding: 0.8rem 1.25rem; border-radius: 4px; border: 2px solid transparent;
}
.button--light { background: var(--paper); color: var(--purple); }
.button--light:hover { background: var(--purple-wash); color: var(--purple-deep); }
.button--outline { border-color: rgba(255, 255, 255, 0.75); color: var(--paper); }
.button--outline:hover { background: rgba(255, 255, 255, 0.12); color: var(--paper); }
.button--solid { background: var(--purple); color: var(--paper); }
.button--solid:hover { background: var(--purple-deep); color: var(--paper); }
.header-signin { padding: 0.55rem 0.95rem; font-size: 0.95rem; flex: none; }
.label-short { display: none; }

/* Hero: the course colour as a full field, like the ITF course tiles */
.hero { background: var(--purple); color: var(--paper); }
.hero .wrap { padding-top: clamp(3rem, 8vw, 6rem); padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 26rem); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero-poster { margin: 0; }
.hero-poster img { display: block; width: 100%; height: auto; border-radius: 4px; outline: 1px solid rgba(255, 255, 255, 0.28); outline-offset: -1px; }
.hero-poster figcaption { margin-top: 0.8rem; font-size: 0.95rem; line-height: 1.45; color: #efe3f3; }
.hero-poster figcaption a { color: var(--paper); }
.hero-kicker { margin: 0 0 1rem; font-size: 1.05rem; color: #e9d8ef; }
.hero h1 {
  margin: 0; max-width: 15ch; font-stretch: 68%; font-weight: 800; line-height: 0.98;
  font-size: clamp(2.9rem, 8.2vw, 6rem); letter-spacing: -0.005em;
}
.hero .belt { width: 12rem; margin: 1.75rem 0 1.5rem; height: 8px; }
.hero-when { margin: 0; font-stretch: 85%; font-weight: 700; font-size: clamp(1.5rem, 3.2vw, 2.1rem); line-height: 1.2; }
.hero-where { margin: 0.25rem 0 0; max-width: var(--measure); font-size: 1.15rem; color: #efe3f3; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.hero :focus-visible { outline-color: var(--itf-yellow); }

/* Key facts */
.facts { border-bottom: 1px solid var(--rule); }
.facts dl { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; }
.facts dl > div { padding: 1.5rem 1.25rem 1.5rem 0; }
.facts dl > div + div { padding-left: 1.25rem; border-left: 1px solid var(--rule); }
.facts dt { font-size: 0.9rem; color: var(--muted); margin-bottom: 0.3rem; }
.facts dd { margin: 0; font-weight: 600; line-height: 1.4; }

.notice { background: var(--purple-wash); }
.notice p { margin: 0; padding: 0.85rem 0; font-size: 0.95rem; }

.tbc {
  display: inline-block; font-size: 0.78rem; font-weight: 600; line-height: 1.5; vertical-align: 0.1em;
  padding: 0 0.5rem; border-radius: 999px; background: var(--purple-wash); color: #5a1a6a; white-space: nowrap;
}

/* Sections: heading column and reading column */
.section { padding: 3.25rem 0; border-bottom: 1px solid var(--rule); }
.section--wash { background: #faf8fb; }
.section .wrap { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 2.5rem; }
.section h2 {
  margin: 0; font-stretch: 72%; font-weight: 800; font-size: 2.1rem; line-height: 1.05; color: var(--purple);
  scroll-margin-top: 1rem;
}
.prose { max-width: var(--measure); }
.prose > :first-child { margin-top: 0; }
.prose h3 { font-stretch: 85%; font-weight: 750; font-size: 1.3rem; margin: 2rem 0 0.5rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.35rem; }
.prose li::marker { color: var(--purple); }

ol.steps { list-style: none; counter-reset: step; padding: 0; margin: 1.5rem 0; }
ol.steps li { counter-increment: step; position: relative; padding: 0 0 1.25rem 3.25rem; margin: 0; }
ol.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -0.1rem; width: 2.2rem; height: 2.2rem;
  border-radius: 50%; background: var(--purple); color: var(--paper); font-weight: 700;
  display: grid; place-items: center; font-size: 1rem;
}
ol.steps li:not(:last-child)::after {
  content: ""; position: absolute; left: 1.08rem; top: 2.3rem; bottom: 0.2rem; width: 2px; background: var(--rule);
}

table { border-collapse: collapse; width: 100%; font-size: 0.97rem; }
caption { text-align: left; font-stretch: 85%; font-weight: 750; font-size: 1.15rem; padding: 0 0 0.4rem; }
th, td { text-align: left; vertical-align: top; padding: 0.55rem 0.75rem 0.55rem 0; border-bottom: 1px solid var(--rule); }
thead th { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
tbody th { font-weight: 600; }
td.time { white-space: nowrap; width: 9.5rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.days { display: grid; gap: 2rem; }
.table-scroll { overflow-x: auto; }

details { border-bottom: 1px solid var(--rule); }
details:first-of-type { border-top: 1px solid var(--rule); }
summary { cursor: pointer; list-style: none; padding: 0.9rem 2rem 0.9rem 0; font-weight: 650; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 0.25rem; top: 0.7rem; font-size: 1.4rem; color: var(--purple); line-height: 1; }
details[open] summary::after { content: "\2212"; }
details > p { margin: 0 0 1rem; }

.contact-lines { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1.25rem; }
.contact-lines dt { color: var(--muted); }
.contact-lines dd { margin: 0; }
.nowrap { white-space: nowrap; }

/* Footer */
/* Organisers: the logos on white, as their owners' identity rules ask, with clear space around each */
.partners { border-top: 1px solid var(--rule); background: var(--paper); }
.partners .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2.5rem; padding-top: 2rem; padding-bottom: 2rem; }
.partners p { margin: 0; max-width: 28rem; color: var(--muted); font-size: 0.95rem; }
.partner-logos { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem 3rem; }
.partner-logos a { display: block; padding: 0.5rem; }
.partner-logos img { display: block; height: auto; }
.partner-logos a:first-child img { width: 15.75rem; }
.partner-logos a:last-child img { width: 10rem; }

.site-footer { background: var(--purple-deep); color: #eadff0; font-size: 0.95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; padding-top: 2rem; padding-bottom: 2rem; }
.site-footer a { color: var(--paper); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; }

/* Privacy page */
.page-title { background: var(--purple); color: var(--paper); }
.page-title .wrap { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.page-title h1 { margin: 0; font-stretch: 72%; font-weight: 800; font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1.05; }
.page-body .wrap { padding-top: 2.5rem; padding-bottom: 3rem; }

/* Sign-in and password pages (portal/web.py) */
.signin { max-width: 30rem; }
.signin-form { display: flex; flex-direction: column; align-items: stretch; margin: 1.5rem 0 1.75rem; }
.signin-form label { font-weight: 650; margin: 1rem 0 0.35rem; }
.signin-form label:first-of-type { margin-top: 0; }
.signin-form input {
  font: inherit; font-size: 1.05rem; color: var(--ink); background: var(--paper);
  padding: 0.7rem 0.8rem; border: 1px solid #a99fb3; border-radius: 4px;
}
.signin-form input:focus { outline: 3px solid var(--itf-yellow); outline-offset: 1px; border-color: var(--purple); }
.signin-form .hint { margin: 0.4rem 0 0; font-size: 0.9rem; color: var(--muted); }
.signin-form .button { align-self: flex-start; margin-top: 1.5rem; cursor: pointer; }
.form-error, .form-notice { padding: 0.8rem 1rem; border-left: 4px solid; border-radius: 0 4px 4px 0; }
.form-error { background: #fdecee; border-color: var(--itf-red); }
.form-notice { background: var(--purple-wash); border-color: var(--purple); }

/* Below this width the section links move to their own row, which scrolls sideways and fades at the edge */
@media (max-width: 1180px) {
  .site-header .wrap { flex-wrap: wrap; gap: 0.5rem 1rem; padding-top: 0.75rem; }
  .brand { flex: 1 1 0; min-width: 0; }
  .site-nav {
    order: 3; flex: none; width: calc(100% + 2.5rem); margin: 0 -1.25rem; padding: 0.1rem 1.25rem 0.55rem;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 3rem), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 3rem), transparent);
  }
  .site-nav::after { content: ""; flex: 0 0 1.75rem; }
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-poster { max-width: 30rem; }
  .facts dl { grid-template-columns: repeat(2, 1fr); }
  .facts dl > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts dl > div:nth-child(n + 3) { border-top: 1px solid var(--rule); }
  .section .wrap { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
}
@media (max-width: 480px) {
  .brand small { display: none; }
}
@media (max-width: 640px) {
  .brand-logo { width: 2.5rem; height: 2.5rem; }
  .partner-logos { gap: 1rem 1.25rem; }
  .partner-logos a { padding: 0.25rem; }
  .partner-logos a:first-child img { width: 10.5rem; }
  .partner-logos a:last-child img { width: 7.5rem; }
  .header-signin .label-long { display: none; }
  .header-signin .label-short { display: inline; }
  .facts dl { grid-template-columns: 1fr; }
  .facts dl > div, .facts dl > div + div { padding: 1rem 0; border-left: 0; }
  .facts dl > div + div { border-top: 1px solid var(--rule); }
  .section { padding: 2.5rem 0; }
  .section h2 { font-size: 1.85rem; }
  table { font-size: 0.92rem; }
  .matrix th, .matrix td { padding-right: 0.6rem; }
  td.time { width: 7.5rem; }
}

/* One moment of motion: the belt draws in when the page opens */
@media (prefers-reduced-motion: no-preference) {
  .hero .belt span { transform: scaleX(0); transform-origin: left; animation: draw 0.5s ease-out forwards; }
  .hero .belt span:nth-child(2) { animation-delay: 0.08s; }
  .hero .belt span:nth-child(3) { animation-delay: 0.16s; }
  .hero .belt span:nth-child(4) { animation-delay: 0.24s; }
}
@keyframes draw { to { transform: scaleX(1); } }
@media print {
  .site-header nav, .header-signin, .hero-actions, .skip { display: none; }
  .hero, .page-title { background: none; color: var(--ink); }
  .hero-where { color: var(--ink); }
  .hero-poster, .partners { display: none; }
  .section { break-inside: avoid; }
}
