/* ============================================================
   Let's Ace Global: the homepage and its detail pages (bachelor's, master's, programmes,
   parents, about, FAQ, partners). One calm system: warm paper, navy ink, one gold accent,
   big left-aligned headings, one card style. The IMAT pages keep styles.css.
   ============================================================ */
:root {
  --paper: #f7f5f0; --sheet: #fff; --card: #efece4; --card-hover: #e9e5db;
  --ink: #0f1a3a; --ink-2: #26304f; --muted: #575e74; --line: #e0dcd1; --line-2: #cbc6b8;
  --navy: #0d1733; --on-navy: #f3f1ea; --on-navy-muted: #aab3cf;
  --gold: #f4b223; --gold-2: #e29f0b; --gold-wash: #fbecc7;
  --wa: #128c4a; --wa-2: #0e7a40; --wrong: #b3261e;
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 12px; --r-card: 18px; --wrap: 1200px; --gutter: clamp(16px, 4vw, 40px);
  --header-h: 68px; --out: cubic-bezier(.22, 1, .36, 1);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.6 var(--font); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font); color: inherit; text-wrap: balance; }
h1, h2 { font-weight: 800; font-stretch: 82%; letter-spacing: -.035em; line-height: .96; }
h1 { font-size: clamp(2.75rem, 7vw, 5.5rem); }
h2 { font-size: clamp(2.25rem, 5vw, 4rem); }
h3 { font-size: 1.3rem; font-weight: 750; letter-spacing: -.015em; line-height: 1.2; }
ul, ol { margin: 0; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--gold-wash); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: var(--r); background: var(--ink); color: #fff; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }

.scroll-bar { position: fixed; left: 0; right: 0; top: 0; z-index: 61; height: 2px; background: var(--gold); transform-origin: left; transform: scaleX(var(--p, 0)); pointer-events: none; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 24px; border: 1.5px solid transparent; border-radius: 999px;
  font-weight: 700; font-size: 1rem; line-height: 1; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .18s, border-color .18s, color .18s, transform .18s var(--out); }
.btn:active { transform: scale(.97); }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: var(--ink-2); }
.btn--gold { background: var(--gold); color: var(--ink); }
.btn--gold:hover { background: var(--gold-2); }
.btn--line { border-color: var(--line-2); color: var(--ink); background: transparent; }
.btn--line:hover { border-color: var(--ink); }

.on-navy .btn--line { border-color: rgba(255, 255, 255, .35); color: #fff; }
.on-navy .btn--line:hover { border-color: #fff; }
.btn--sm { min-height: 42px; padding: 0 18px; font-size: .95rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--gold); padding-bottom: 2px; }
.link::after { content: "→"; transition: transform .2s var(--out); }
.link:hover::after { transform: translateX(3px); }

/* ---------- Seminar banner ---------- */
.announce { background: var(--navy); color: var(--on-navy-muted); font-size: .92rem; }
.announce .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 10px; min-height: 42px; padding-block: 6px; text-align: center; }
.announce p { margin: 0; }
.announce a { color: var(--ink); background: var(--gold); padding: 3px 10px; border-radius: 999px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.announce[hidden] { display: none; }

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 60; background: rgba(247, 245, 240, .92); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.header.is-scrolled { border-bottom-color: var(--line); }
.header .wrap { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand svg { width: 36px; height: 36px; }
.brand b { font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; }
.brand small { font-size: .78rem; font-weight: 650; color: var(--muted); }
.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav > a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 11px; border-radius: 999px; color: var(--ink-2); font-weight: 600; font-size: .95rem; text-decoration: none; white-space: nowrap; transition: background-color .15s; }
.nav > a:hover { background: var(--card); }
.nav > a[aria-current="page"] { background: var(--card); color: var(--ink); }
.nav__extra { display: none; }
.header__actions { display: flex; align-items: center; gap: 8px; }
.menu-btn { display: none; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 999px; background: transparent; cursor: pointer; position: relative; }
.menu-btn span, .menu-btn span::before, .menu-btn span::after { position: absolute; left: 13px; width: 20px; height: 2px; border-radius: 2px; background: var(--ink); content: ""; transition: transform .25s var(--out), opacity .2s; }
.menu-btn span { top: 22px; }
.menu-btn span::before { left: 0; top: -6px; }
.menu-btn span::after { left: 0; top: 6px; }
.menu-btn[aria-expanded="true"] span { background: transparent; }
.menu-btn[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 1339px) { .header__wa { display: none; } }
@media (max-width: 1179px) {
  .menu-btn { display: block; }
  .header__actions { margin-left: auto; }
  .nav { position: fixed; inset: var(--header-h) 0 0; z-index: 59; margin: 0; padding: 8px var(--gutter) calc(24px + env(safe-area-inset-bottom));
    flex-direction: column; align-items: stretch; gap: 0; overflow-y: auto; background: var(--paper);
    opacity: 0; visibility: hidden; transition: opacity .2s, visibility 0s .2s; }
  .nav.is-open { opacity: 1; visibility: visible; transition: opacity .2s, visibility 0s; }
  .nav > a { min-height: 60px; padding: 0; border-radius: 0; border-bottom: 1px solid var(--line); font-size: 1.45rem; font-weight: 750; letter-spacing: -.02em; }
  .nav > a:hover, .nav > a[aria-current="page"] { background: none; }
  .nav__extra { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: auto; padding-top: 28px; }
  html.menu-open { overflow: hidden; }
  html.menu-open .announce { display: none; }
}
@media (max-width: 479px) { .header__actions .btn--gold { display: none; } .nav__extra { grid-template-columns: 1fr; } }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 9vw, 128px) 0; }

.section--white { background: var(--sheet); }
.on-navy { background: var(--navy); color: var(--on-navy); }
.on-navy p { color: var(--on-navy-muted); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 20px; font-size: .9rem; font-weight: 700; letter-spacing: .01em; color: var(--muted); }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.on-navy .eyebrow { color: var(--on-navy-muted); }
.head { display: grid; gap: 16px 48px; margin-bottom: clamp(36px, 5vw, 64px); }
.head h2 { max-width: 13em; }
.head p { margin: 0; color: var(--muted); font-size: 1.12rem; max-width: 30em; }
@media (min-width: 900px) { .head { grid-template-columns: 1.4fr 1fr; align-items: end; } .head p { justify-self: end; } }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.25rem); line-height: 1.55; color: var(--muted); max-width: 34em; }
.on-navy .lead { color: var(--on-navy-muted); }

/* ---------- Cards and grids ---------- */
.grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }  }
.card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: clamp(22px, 2.4vw, 30px); border-radius: var(--r-card); background: var(--card); }
.section--white .card { background: var(--paper); }
.card h3 { margin: 0; }
.card p { margin: 0; color: var(--muted); }
.card__label { font-size: .85rem; font-weight: 700; color: var(--muted); }

.card--dark { background: var(--navy); color: var(--on-navy); }
.card--dark p, .card--dark .card__label { color: var(--on-navy-muted); }
a.card { text-decoration: none; transition: background-color .2s, transform .25s var(--out); }
a.card:hover { background: var(--card-hover); transform: translateY(-2px); }
.card .link { margin-top: auto; align-self: flex-start; }

.ticks { list-style: none; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before { content: ""; position: absolute; left: 3px; top: .42em; width: 12px; height: 7px; border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(-45deg); }
.on-navy .ticks li::before, .card--dark .ticks li::before { border-color: var(--gold); }

/* ---------- Photos ---------- */
.photo { position: relative; overflow: hidden; border-radius: var(--r-card); background: var(--card); }
.photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--out); }
a:hover .photo img { transform: scale(1.03); }

/* ---------- Home hero ---------- */
.hero { padding: clamp(40px, 6vw, 72px) 0 clamp(56px, 7vw, 96px); }
.hero .wrap { display: grid; gap: clamp(36px, 5vw, 64px); align-items: center; }
@media (min-width: 1024px) { .hero .wrap { grid-template-columns: 1.05fr .95fr; } }
.hero h1 span { display: block; color: var(--muted); font-size: .56em; letter-spacing: -.025em; line-height: 1.05; margin-top: .22em; }
.hero .lead { margin: 24px 0 32px; }

.hero__visual { position: relative; padding-bottom: 72px; }
.hero__visual .photo { aspect-ratio: 4 / 3.3; }
@media (min-width: 1024px) { .hero__visual { padding: 0 0 72px; } }

/* Boarding pass: the India-to-Italy route the brief wanted, without a spinning planet */
.pass { position: absolute; left: clamp(-8px, -2vw, -40px); right: clamp(12px, 6vw, 48px); bottom: 0; display: grid; border-radius: var(--r-card); background: var(--sheet); box-shadow: 0 30px 60px -28px rgba(15, 26, 58, .4), 0 0 0 1px var(--line); }
@media (max-width: 1023px) { .pass { left: 12px; right: 12px; } }

.pass__foot { display: flex; justify-content: space-between; gap: 10px; padding: 12px 22px; border-top: 1.5px dashed var(--line); font-size: .85rem; font-weight: 650; color: var(--muted); }
.pass__foot b { color: var(--ink); }

/* ---------- Trust strip ---------- */
.trust { border-block: 1px solid var(--line); background: var(--sheet); }
.trust dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.trust dl > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 4px; padding: 26px 18px; border-bottom: 1px solid var(--line); }
.trust dl > div:nth-child(odd) { padding-left: 0; }
.trust dl > div:nth-child(even) { border-left: 1px solid var(--line); }
.trust dl > div:nth-child(n+3) { border-bottom: 0; }
.trust dd { margin: 0; font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; font-stretch: 76%; letter-spacing: -.02em; line-height: 1; }
.trust dt { color: var(--muted); font-size: .92rem; }
@media (min-width: 768px) {
  .trust dl { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .trust dl > div { border-bottom: 0; padding: 30px 24px; }
  .trust dl > div + div { border-left: 1px solid var(--line); }
  .trust dl > div:nth-child(odd) { padding-left: 24px; }
  .trust dl > div:first-child { padding-left: 0; }
}

/* ---------- Route cards (photo on top) ---------- */
.route { padding: 0; overflow: hidden; gap: 0; }
.route .photo { border-radius: 0; aspect-ratio: 16 / 10; }

.route__body { flex: 1; display: flex; flex-direction: column; gap: 14px; padding: clamp(22px, 2.4vw, 28px); }
.route__body h3 { font-size: 1.55rem; }
.route__body .ticks { font-size: .97rem; }

/* ---------- Split rows (text + photo) ---------- */
.split { display: grid; gap: clamp(32px, 5vw, 72px); align-items: center; }
@media (min-width: 960px) { .split { grid-template-columns: 1fr 1fr; }   }
.split .photo { aspect-ratio: 4 / 4.4; }
.split h2 { margin-bottom: 22px; }
.warn .btn { max-width: 100%; white-space: normal; text-align: center; }

/* ---------- Finder band ---------- */
.finder { text-align: center; }
.finder h2 { margin: 0 auto 18px; max-width: 13em; }
.finder .lead { margin: 0 auto 32px; }
.search { display: flex; align-items: center; gap: 10px; max-width: 760px; margin: 0 auto; padding: 8px 8px 8px 20px; border-radius: 999px; background: #fff; color: var(--ink); box-shadow: 0 24px 48px -28px rgba(0, 0, 0, .6); }
.search:focus-within { box-shadow: 0 0 0 4px rgba(244, 178, 35, .5), 0 24px 48px -28px rgba(0, 0, 0, .6); }
.search > svg { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.search input { flex: 1; min-width: 0; min-height: 50px; border: 0; background: transparent; font-size: 1.05rem; outline: none; }
.search input::placeholder { color: #6a7086; }

@media (max-width: 599px) { .search { flex-wrap: wrap; border-radius: 22px; padding: 10px; } .search > svg { margin-left: 8px; } .search .btn { width: 100%; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button, .chips a { min-height: 42px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--sheet); font-weight: 650; font-size: .95rem; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; transition: border-color .15s; }
.chips button:hover, .chips a:hover { border-color: var(--ink); }

/* ---------- Steps ---------- */
.steps { counter-reset: step; list-style: none; }
.steps .card::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 8px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 800; font-size: .95rem; }
.steps .card:last-child::before { background: var(--gold); color: var(--ink); }

/* ---------- Mentor ---------- */

/* ---------- Q list (parents) ---------- */

/* ---------- Packages ---------- */
.plan { gap: 0; }
.plan h3 { font-size: 1.6rem; display: flex; align-items: baseline; gap: 8px; }
.plan h3 small { font-size: .8rem; font-weight: 650; color: var(--muted); }

.plan .ticks { padding-top: 18px; margin-bottom: 28px; border-top: 1px solid var(--line-2); }
.plan .btn { margin-top: auto; width: 100%; }

.plan.card--dark h3 small { color: var(--on-navy-muted); }
.plan.card--dark .ticks { border-top-color: rgba(255, 255, 255, .15); }
.note { margin-top: 20px; color: var(--muted); font-size: .97rem; }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-top: 16px; padding: 20px clamp(22px, 2.4vw, 30px); border-radius: var(--r-card); border: 1.5px dashed var(--line-2); }
.bar p { margin: 0; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; }
.faq details { border-radius: var(--r-card); background: var(--card); }
.section--white .faq details { background: var(--paper); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; font-weight: 700; font-size: 1.08rem; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex-shrink: 0; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--sheet); font-size: 1.3rem; font-weight: 500; transition: transform .25s var(--out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 24px 22px; color: var(--muted); max-width: 46em; }

/* ---------- Page hero (detail pages) ---------- */

.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 26px 0 0; list-style: none; font-weight: 650; color: var(--muted); font-size: .95rem; }
.facts li { display: inline-flex; align-items: center; gap: 8px; }
.facts li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

/* ---------- Timeline (detail pages) ---------- */
.timeline { list-style: none; display: grid; gap: 0; border-left: 2px solid var(--line-2); margin-left: 8px; }
.timeline li { position: relative; padding: 0 0 32px 32px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -9px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--paper); border: 3px solid var(--ink); }
.section--white .timeline li::before { background: var(--sheet); }
.timeline small { display: block; font-weight: 750; color: var(--muted); font-size: .85rem; letter-spacing: .02em; }
.timeline b { display: block; font-size: 1.2rem; margin: 2px 0 4px; }
.timeline p { margin: 0; color: var(--muted); }

/* ---------- Call to action band ---------- */

/* ---------- Booking ---------- */
.book { display: grid; gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (min-width: 1024px) { .book { grid-template-columns: 1fr 1fr; } }
.book h2 { color: #fff; margin-bottom: 20px; }
.contact { list-style: none; display: grid; gap: 14px; margin: 28px 0 32px; }
.contact li { display: flex; align-items: center; gap: 12px; }
.contact a { color: #fff; text-decoration: none; font-weight: 600; }
.contact a:hover { text-decoration: underline; }
.contact svg { width: 20px; height: 20px; color: var(--gold); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.form { display: grid; gap: 18px; padding: clamp(22px, 3vw, 34px); border-radius: var(--r-card); background: var(--sheet); color: var(--ink); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .6); }
.form h3 { font-size: 1.45rem; }
.form fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.form__row { display: grid; gap: 18px; }
@media (min-width: 560px) { .form__row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 7px; }
.field > label, .field legend { font-weight: 700; font-size: .92rem; padding: 0; }
.field input, .field select, .phone select, .phone input { width: 100%; min-height: 50px; padding: 0 14px; border-radius: var(--r); border: 1.5px solid var(--line-2); background: var(--sheet); transition: border-color .15s, box-shadow .15s; }
.field select, .phone select { -webkit-appearance: none; appearance: none; padding-right: 36px; background: var(--sheet) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%230f1a3a' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") right 12px center / 16px no-repeat; }
.field input:focus, .field select:focus, .phone select:focus, .phone input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--gold-wash); }
.field input[aria-invalid="true"], .phone input[aria-invalid="true"] { border-color: var(--wrong); }
.field__err { margin: 0; color: var(--wrong); font-size: .88rem; font-weight: 600; }
.field__err:empty { display: none; }
.phone { display: grid; grid-template-columns: minmax(0, 8.5rem) 1fr; gap: 8px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line-2); font-weight: 650; transition: border-color .15s, background-color .15s; }
.choice input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.choice input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.form .btn { width: 100%; }
.form__status { margin: 0; padding: 14px 16px; border-radius: var(--r); background: #e8f5ec; color: #0b5c2e; font-weight: 600; }
.form__status[hidden] { display: none; }
.form__fine { margin: 0; font-size: .85rem; color: var(--muted); }
.on-navy .form p.field__err { color: var(--wrong); }
/* Cost teaser form on a light card */
.cost { display: grid; gap: 18px; align-items: end; }
@media (min-width: 760px) { .cost { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; } }

/* ---------- Footer ---------- */
.footer { background: var(--navy); color: var(--on-navy-muted); padding: clamp(56px, 7vw, 88px) 0 28px; overflow: hidden; }
.footer .brand b { color: #fff; }
.footer .brand small { color: var(--on-navy-muted); }
.footer__top { display: grid; gap: 40px; }
@media (min-width: 900px) { .footer__top { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; } }
.footer__about p { margin: 16px 0 20px; max-width: 24em; }
.footer h4 { margin-bottom: 14px; color: #fff; font-size: .95rem; }
.footer ul { list-style: none; display: grid; gap: 4px; }
.footer ul a { display: inline-block; padding: 6px 0; color: var(--on-navy-muted); text-decoration: none; }
.footer ul a:hover { color: #fff; }
.socials { display: flex; gap: 8px; }
.socials a { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .2); color: #fff; }
.socials a:hover { border-color: #fff; }
.socials svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Floating WhatsApp + Ask Ace ---------- */

html.menu-open .chat { display: none; }

.chat { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 55; }
.chat__launcher { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 18px 8px 8px; border: 0; border-radius: 999px; cursor: pointer; background: var(--ink); color: #fff; font-weight: 650; box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 14px 30px -14px rgba(0, 0, 0, .55); }
.chat__launcher:active { transform: translateY(1px); }
.chat__launcher svg { width: 36px; height: 36px; }
.chat__panel { position: absolute; right: 0; bottom: calc(100% + 12px); width: min(380px, calc(100vw - 32px)); max-height: min(600px, calc(100svh - 120px)); display: flex; flex-direction: column; overflow: hidden; background: var(--sheet); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: 0 30px 60px -30px rgba(20, 26, 51, .45); transform-origin: bottom right; animation: pop .22s var(--out); }
.chat__panel[hidden] { display: none; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
.chat__head { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; border-bottom: 1px solid var(--line); }
.chat__head svg.avatar-mark { width: 36px; height: 36px; }
.chat__head b { display: block; }
.chat__head small { color: var(--muted); }
.chat__close { margin-left: auto; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: var(--r); background: transparent; cursor: pointer; }
.chat__close:hover { background: var(--card); }
.chat__close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.chat__log { flex: 1; overflow-y: auto; padding: 16px; display: grid; gap: 8px; align-content: start; }
.msg { max-width: 86%; padding: 9px 13px; border-radius: 12px; font-size: .95rem; line-height: 1.45; animation: pop .22s var(--out) both; }
.msg--bot { background: var(--paper); border-bottom-left-radius: 3px; justify-self: start; }
.msg--me { background: var(--ink); color: #fff; border-bottom-right-radius: 3px; justify-self: end; }
.msg--typing { display: flex; gap: 4px; padding: 14px 16px; }
.msg--typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: dot 1s infinite; }
.msg--typing i:nth-child(2) { animation-delay: .15s; }
.msg--typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }
.chat__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; }
.chat__chips .chip { min-height: 38px; font-size: .85rem; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sheet); cursor: pointer; font-weight: 600; }
.chat__chips .chip:hover { border-color: var(--ink); }
.chat__form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat__form input { flex: 1; min-width: 0; min-height: 44px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--sheet); }
.chat__form .btn { min-height: 44px; padding: 0 16px; background: var(--ink); color: #fff; }
@media (max-width: 767px) {
  .chat__launcher { padding: 8px; }
  .chat__launcher span { display: none; }
  .chat__panel { position: fixed; left: 12px; right: 12px; bottom: calc(80px + env(safe-area-inset-bottom)); width: auto; max-height: calc(100svh - 160px); }
}

/* ---------- Motion: one gentle rise as things arrive (none for reduced motion) ---------- */
html.motion [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--out), transform .6s var(--out); transition-delay: calc(var(--i, 0) * 70ms); }
html.motion [data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } html { scroll-behavior: auto; } }

/* ---------- Page pieces added with the detail pages ---------- */

.center { display: flex; justify-content: center; margin-top: clamp(28px, 4vw, 44px); }
@media (min-width: 960px) { .split--top { align-items: start; } .split--top > :first-child { position: sticky; top: calc(var(--header-h) + 32px); } }
.split--top h2 { margin-bottom: 18px; }
.split .lead { margin-bottom: 26px; }

/* Cost estimate: one wide card with the question on the left and the three choices on the right */

.cost .field select { font-size: .95rem; padding-left: 12px; padding-right: 32px; background-position: right 10px center; }
@media (min-width: 760px) and (max-width: 1099px) { .cost { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cost .btn { grid-column: 1 / -1; } }

/* Programme finder page: the search sits on a dimmed photo of the Archiginnasio */

.faq details a { font-weight: 700; }

.section--white .card--dark { background: var(--navy); }
.footer { background: #08102a; }
.pass__foot { flex-wrap: wrap; align-items: center; }
.pass__foot > span { white-space: nowrap; }
@media (max-width: 1023px) {
  .hero__visual { padding-bottom: 0; }
  .pass { position: relative; left: auto; right: auto; bottom: auto; margin: -64px 12px 0; }
}
@media (max-width: 479px) {
  .hero .btn-row .btn { flex: 1 1 100%; }
  .pass { margin: -40px 8px 0; }
  
   .pass__foot { padding-inline: 16px; }
}
/* The blur sits on a pseudo-element: a backdrop-filter on the header itself would trap the fixed menu drawer inside the header's box */
.header { background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(247, 245, 240, .92); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); }
html.menu-open .header::before { background: var(--paper); }
@media (max-width: 767px) { .footer { padding-bottom: 96px; } }
@media (max-width: 1023px) { .hero .wrap { grid-template-columns: minmax(0, 1fr); } }

@media (min-width: 600px) and (max-width: 1023px) { .hero__visual .photo { aspect-ratio: 16 / 9; }  }

/* ============================================================
   IMAT page (imat.html): same system, with the IMAT tools
   ============================================================ */
.chips button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.muted { color: var(--muted); }
.fine { margin: 0; font-size: .9rem; color: var(--muted); }

/* Exam card over the hero photo (reuses the pass shell) */
.exam-card { padding: 18px 22px 0; gap: 14px; }
.exam-card__label { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; margin: 0; }
.exam-card__label b { font-size: 1.05rem; }
.exam-card__label small { color: var(--muted); font-size: .88rem; font-weight: 600; }
.cd { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.cd div { display: grid; justify-items: center; padding: 10px 4px; border-radius: var(--r); background: var(--paper); }
.cd b { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 800; font-stretch: 78%; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.cd span { font-size: .8rem; font-weight: 650; color: var(--muted); }
.exam-card .pass__foot { margin: 0 -22px; }
@media (max-width: 479px) { .exam-card { padding: 16px 16px 0; } .exam-card .pass__foot { margin: 0 -16px; } }

/* Resources hub */
.hub { border-radius: var(--r-card); background: var(--sheet); box-shadow: 0 0 0 1px var(--line); overflow: hidden; }
.hub__tabs { display: flex; gap: 4px; padding: 10px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.hub__tabs::-webkit-scrollbar { display: none; }
.hub__tabs button { flex-shrink: 0; min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-weight: 700; cursor: pointer; transition: background-color .15s, color .15s; }
.hub__tabs button:hover { color: var(--ink); }
.hub__tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
.hub__pane { padding: clamp(22px, 3.4vw, 40px); }
.hub__grid { display: grid; gap: clamp(24px, 4vw, 48px); }
@media (min-width: 900px) { .hub__grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.hub__label { margin: 0 0 10px; font-size: .85rem; font-weight: 750; color: var(--muted); }
.hub__label:not(:first-child) { margin-top: 28px; }
.hub h3 { font-size: 1.6rem; margin-bottom: 10px; }
.years { display: flex; flex-wrap: wrap; gap: 8px; }
.year { min-width: 84px; min-height: 48px; padding: 0 18px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--sheet); font-weight: 800; font-size: 1.1rem; cursor: pointer; transition: border-color .15s; }
.year:hover { border-color: var(--ink); }
.year[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.paper-card { display: grid; gap: 12px; align-content: start; padding: clamp(22px, 2.6vw, 30px); border-radius: var(--r-card); background: var(--paper); }
.paper-card p { margin: 0; }
.paper-card__tag { justify-self: start; padding: 4px 11px; border-radius: 999px; background: var(--gold-wash); font-size: .85rem; font-weight: 700; }
.paper-card .btn { justify-self: start; background: var(--ink); color: #fff; }
.paper-card .btn:hover { background: var(--ink-2); }
.paper-card .small { font-size: .92rem; }
.guide-list { list-style: none; display: grid; gap: 0 32px; margin-bottom: 24px; }
@media (min-width: 900px) { .guide-list { grid-template-columns: 1fr 1fr; } }
.guide-list a { display: grid; gap: 2px; padding: 16px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.guide-list a:hover b { text-decoration: underline; text-underline-offset: 3px; }
.guide-list span { color: var(--muted); font-size: .95rem; }
.planner { display: grid; gap: clamp(24px, 4vw, 48px); }
@media (min-width: 900px) { .planner { grid-template-columns: .8fr 1.2fr; align-items: start; } }
.planner .chips { margin-bottom: 16px; }
.planner__phases { list-style: none; display: grid; gap: 10px; counter-reset: ph; }
.planner__phases li { display: grid; gap: 4px; padding: 18px 20px 18px 64px; position: relative; border-radius: var(--r-card); background: var(--paper); }
.planner__phases li::before { counter-increment: ph; content: counter(ph); position: absolute; left: 20px; top: 18px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 800; font-size: .9rem; }
.planner__phases b { font-size: 1.1rem; }
.planner__phases small { color: var(--muted); font-weight: 650; font-size: .88rem; }
.planner__phases p { margin: 0; color: var(--muted); }
.mini-cities { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 600px) { .mini-cities { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.mini-cities a { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; border-radius: var(--r); background: var(--paper); font-weight: 650; text-decoration: none; transition: background-color .15s; }
.mini-cities a:hover { background: var(--card-hover); }
.mini-cities small { display: grid; place-items: center; min-width: 24px; height: 24px; border-radius: 999px; background: var(--sheet); font-weight: 750; font-size: .8rem; }

/* Exam split, marking, calculator */
.split-bar { display: flex; gap: 3px; height: 44px; margin: 18px 0 16px; border-radius: var(--r); overflow: hidden; }
.split-bar span { display: grid; place-items: center; min-width: 0; font-weight: 800; font-size: .9rem; }
.legend { list-style: none; display: grid; gap: 2px; margin-bottom: 26px; }
.legend li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.legend i { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.legend b { margin-left: auto; font-size: .92rem; color: var(--muted); font-weight: 650; }
.c-bio { background: var(--ink); color: #fff; }
.c-chem { background: #3d4a78; color: #fff; }
.c-phys { background: #8a93b4; color: var(--ink); }
.c-logic { background: var(--gold); color: var(--ink); }
.c-gk { background: var(--gold-wash); color: var(--ink); }
.marking { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0 16px; }
.marking div { display: grid; padding: 14px; border-radius: var(--r); background: var(--sheet); }
.marking b { font-size: 1.8rem; font-weight: 800; font-stretch: 78%; line-height: 1.05; }
.marking span { color: var(--muted); font-size: .9rem; }
.calc { gap: 14px; }
.calc__row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 12px; }
.calc__row label { font-weight: 700; }
.calc__row output { font-weight: 800; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.calc__row input { grid-column: 1 / -1; width: 100%; height: 28px; margin: 0; accent-color: var(--ink); cursor: pointer; }
.calc .calc__blank { margin: 0; }
.calc__result { display: flex; align-items: baseline; gap: 10px; margin-top: 6px; padding-top: 18px; border-top: 1px solid var(--line); }
.calc__result span { font-weight: 700; }
.calc__result b { margin-left: auto; font-size: clamp(2.6rem, 5vw, 3.6rem); font-weight: 800; font-stretch: 76%; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.calc__result small { color: var(--muted); font-weight: 650; }
.calc__meter { height: 10px; border-radius: 999px; background: var(--sheet); overflow: hidden; }
.calc__meter i { display: block; height: 100%; background: var(--gold); transform-origin: left; transition: transform .3s var(--out); }
.calc .calc__verdict { min-height: 3.2em; color: var(--ink); }

/* Six years */
.years-grid { list-style: none; }

/* Universities table */
.table-card { padding: clamp(18px, 2.6vw, 30px); border-radius: var(--r-card); background: var(--sheet); box-shadow: 0 0 0 1px var(--line); }
.table-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 18px; }
.table-search { flex: 1 1 240px; min-width: 0; min-height: 44px; padding: 0 16px; border: 1.5px solid var(--line-2); border-radius: 999px; background: var(--sheet); }
.table-search:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--gold-wash); }
.table-sort { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: .95rem; }
.table-sort select { min-height: 44px; padding: 0 34px 0 14px; border: 1.5px solid var(--line-2); border-radius: 999px; -webkit-appearance: none; appearance: none; background: var(--sheet) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%230f1a3a' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") right 12px center / 14px no-repeat; cursor: pointer; }
.table-card table { width: 100%; border-collapse: collapse; }
.table-card th { text-align: left; padding: 0; border-bottom: 1.5px solid var(--ink); }
.table-card th button { width: 100%; min-height: 44px; padding: 0 12px; border: 0; background: none; text-align: inherit; font-weight: 750; font-size: .9rem; color: var(--muted); cursor: pointer; }
.table-card th button[data-dir] { color: var(--ink); }
.table-card th button[data-dir="asc"]::after { content: " ↑"; }
.table-card th button[data-dir="desc"]::after { content: " ↓"; }
.table-card td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-card .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.td-prog { display: block; color: var(--muted); font-size: .88rem; }
.table-more { margin-top: 16px; }
.table-foot { margin: 16px 0 0; color: var(--muted); font-size: .92rem; }
.table-foot a { color: var(--ink); font-weight: 700; }
@media (max-width: 699px) {
  .table-card thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-card tr { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .table-card td { padding: 0; border: 0; }
  .table-card td:first-child, .table-card td[data-label="City"] { grid-column: 1 / -1; }
  .table-card td:first-child { margin-bottom: 4px; }
  .table-card td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-weight: 600; }
  .table-card .num { text-align: left; }
}

/* Requirements warning card */
.warn { margin-top: 28px; gap: 16px; }
.warn h3 { color: #fff; }
.warn .ticks { color: var(--on-navy-muted); }
.warn .btn { align-self: flex-start; }

/* Practice quiz on the navy band */
.quiz { padding: clamp(22px, 3vw, 34px); border-radius: var(--r-card); background: var(--sheet); color: var(--ink); }
.quiz__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.quiz__subject { padding: 4px 11px; border-radius: 999px; background: var(--gold-wash); font-size: .85rem; font-weight: 750; }
.quiz__score { font-weight: 750; font-variant-numeric: tabular-nums; }
.on-navy .quiz p { color: var(--ink); }
.quiz .quiz__q { font-size: 1.15rem; font-weight: 650; line-height: 1.45; }
.quiz__opts { list-style: none; display: grid; gap: 8px; }
.quiz__opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 8px 14px 8px 8px; border: 1.5px solid var(--line-2); border-radius: var(--r); background: var(--sheet); text-align: left; cursor: pointer; transition: border-color .15s, background-color .15s; }
.quiz__opt:hover:not(:disabled) { border-color: var(--ink); }
.quiz__opt:disabled { cursor: default; }
.quiz__opt .bubble { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; border-radius: 9px; background: var(--paper); font-weight: 800; font-size: .9rem; }
.quiz__opt.is-right { border-color: var(--wa); background: #e8f5ee; }
.quiz__opt.is-right .bubble { background: var(--wa); color: #fff; }
.quiz__opt.is-wrong { border-color: var(--wrong); background: #fbeceb; }
.quiz__opt.is-wrong .bubble { background: var(--wrong); color: #fff; }
.quiz__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; }
.on-navy .quiz .quiz__feedback { margin: 0; color: var(--muted); font-size: .95rem; }
.quiz__feedback b { color: var(--ink); }

/* Course */
.course { display: grid; gap: 16px; }
@media (min-width: 1024px) { .course { grid-template-columns: 1.5fr 1fr; } }
.promise { gap: 16px; }
.promise h3 { color: #fff; font-size: 1.5rem; }
.promise__list { list-style: none; display: grid; gap: 12px; margin-bottom: 8px; }
.promise__list li { position: relative; padding-left: 30px; color: var(--on-navy-muted); }
.promise__list li::before { position: absolute; left: 0; top: 0; font-weight: 800; }
.promise__list .yes::before { content: "✓"; color: var(--gold); }
.promise__list .no::before { content: "✕"; color: #ff8a80; }
.promise .btn { margin-top: auto; align-self: flex-start; }

/* Videos */
.videos { display: grid; gap: 16px; }
@media (min-width: 1024px) { .videos { grid-template-columns: 1.3fr 1fr; } }
.ytgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.yt { position: relative; display: flex; flex-direction: column; border-radius: var(--r-card); background: var(--paper); overflow: hidden; }
.yt img, .yt iframe { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 0; background: var(--navy); }
.yt__play { position: absolute; left: 50%; top: 0; translate: -50% 0; margin-top: calc((100% * 9 / 16 - 56px) / 2); display: grid; place-items: center; width: 56px; height: 56px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .94); cursor: pointer; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .5); transition: transform .2s var(--out); }
.yt__play:hover { transform: scale(1.06); }
.yt__play svg { width: 24px; height: 24px; fill: var(--ink); margin-left: 3px; }
.yt__cap { display: grid; gap: 2px; margin: 0; padding: 14px 16px 16px; color: var(--muted); font-size: .9rem; }
.yt__cap b { color: var(--ink); font-size: 1rem; line-height: 1.3; }
.yt--feature .yt__cap { display: block; padding: 18px 20px 20px; font-size: 1rem; }
.yt--feature .yt__play { width: 72px; height: 72px; margin-top: calc((100% * 9 / 16 - 72px) / 2); }
.yt.is-playing .yt__play, .yt.is-playing img { display: none; }
@media (max-width: 479px) { .ytgrid { grid-template-columns: 1fr; } }
.reels { margin-top: clamp(40px, 5vw, 64px); }
.reels > h3 { font-size: 1.5rem; margin-bottom: 16px; }
.reels .grid { margin-bottom: 22px; }
.reels .card__label::before { content: "▶\FE0E\00a0\00a0" / ""; }
.reelbox { width: min(380px, calc(100vw - 24px)); margin: auto; padding: 0; border: 0; border-radius: var(--r-card); background: #fff; color: var(--ink); overflow: hidden; }
.reelbox::backdrop { background: rgba(0, 0, 0, .8); }
.reelbox__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 6px 4px 18px; }
.reelbox__bar button { width: 44px; height: 44px; border: 0; background: none; color: inherit; font-size: 1.7rem; line-height: 1; cursor: pointer; }
.reelbox iframe { display: block; width: 100%; height: min(660px, calc(100dvh - 100px)); border: 0; }

/* IMAT brand in header and footer */

.imat .brand b { font-size: 1.15rem; line-height: 1; }
.imat .brand small { line-height: 1.1; }
[hidden] { display: none !important; }

/* ---------- Doodles: one hand-drawn stroke per idea, drawn in once when it scrolls into view ---------- */
.doodle { position: absolute; max-width: none; pointer-events: none; overflow: visible; fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.doodles-on .doodle { stroke-dasharray: 1; stroke-dashoffset: 1; }
.doodles-on .doodle.is-drawn { stroke-dashoffset: 0; transition: stroke-dashoffset 1.1s var(--out) var(--dd, .15s); }
.mark { position: relative; display: inline-block; font-style: inherit; }
.doodle--under { left: -3%; bottom: -.12em; width: 106%; height: .3em; stroke-width: 4; }
.circled { position: relative; display: inline-block; }
/* inset in em, not %: the ring hugs short numbers and long phrases alike */
.doodle--circle { left: -.32em; top: -.26em; width: calc(100% + .64em); height: calc(100% + .52em); stroke-width: 2.5; }

/* Trails: one long journey line across a section edge, drawn by the scroll itself (same as styles.css) */
.section:has(> .trail) { position: relative; }
.trail { position: absolute; left: 0; top: 0; z-index: 1; width: 100%; height: clamp(56px, 9vw, 120px); transform: translateY(-50%); pointer-events: none; overflow: visible; fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.trail--flip { transform: translateY(-50%) scaleX(-1); }
.trail--pen { stroke: var(--navy); }
/* shortcut: browsers without scroll-driven animations (Firefox today) just show the finished line */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .trail { stroke-dasharray: 1; stroke-dashoffset: 1; animation: trail-draw linear both; animation-timeline: view(); animation-range: entry 0% cover 55%; }
  }
}
@keyframes trail-draw { to { stroke-dashoffset: 0; } }

/* ---------- v131: "Why … in Italy?" bento, hero search, Ask Ace. Shared by styles.css and site.css, so colours fall back between the two palettes ---------- */

/* v132: "Why … in Italy": a ruled sheet of five numbered facts with highlighter marks, beside a campus photo */
.reasons { display: grid; gap: clamp(28px, 4vw, 64px); }
@media (min-width: 1024px) { .reasons { grid-template-columns: 5fr 7fr; align-items: start; } .reasons__side { position: sticky; top: calc(var(--header-h, 66px) + 24px); } }
.reasons__side .head { display: block; max-width: none; margin-bottom: 24px; }
.reasons__side .head h2 { max-width: 13em; font-size: clamp(2rem, 3.6vw, 2.9rem); }
.reasons__side .head p { max-width: 32em; margin-top: 12px; }
.reasons__photo { margin: 0; overflow: hidden; border-radius: 20px; aspect-ratio: 4 / 3; background: var(--card, var(--sunk)); }
.reasons__photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.reasons__list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.reasons__list li { display: grid; grid-template-columns: 3.2rem 1fr; gap: 16px; padding: clamp(18px, 2.4vw, 28px) 0; border-bottom: 1px solid var(--line, var(--rule)); }
.reasons__n { font: 760 1rem/1.9 var(--font); font-variant-numeric: tabular-nums; color: var(--muted); }
.reasons__list h3 { margin: 0 0 6px; font: 740 clamp(1.3rem, 2.2vw, 1.75rem)/1.2 var(--font); letter-spacing: -.02em; }
.reasons__list p { margin: 0; color: var(--muted); max-width: 36em; }
.reasons__list mark { padding: 0 .12em; margin: 0 -.06em; color: inherit; background: linear-gradient(transparent 58%, var(--w-acc) 58%, var(--w-acc) 92%, transparent 92%); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
@media (max-width: 599px) { .reasons__list li { grid-template-columns: 2.4rem 1fr; gap: 10px; } }
.whyit { --w-line: var(--line, var(--rule)); --w-dark: var(--navy, var(--night)); --w-acc: var(--gold, var(--hi)); --w-soft: var(--card, var(--sunk)); }
/* Bachelor's and master's hero: the search is the main action */

/* Ask Ace */
.chat__head { background: var(--navy, var(--night)); color: #fff; border-bottom: 0; }
.chat__head small { color: rgba(255, 255, 255, .7); }
.chat__close { color: #fff; }
.chat__close:hover { background: rgba(255, 255, 255, .12); }
.msg { white-space: pre-line; }
.msg__go { display: flex; width: fit-content; align-items: center; gap: 6px; margin-top: 10px; padding: 7px 12px; border: 0; border-radius: 999px; background: var(--ink); color: #fff; font: 650 .85rem/1.2 var(--font); text-decoration: none; cursor: pointer; }
.msg__go::after { content: "→"; }
.msg__go:hover { background: var(--ink-2, #26304f); }
.chat__chips:empty { display: none; }
.chat__chips .chip { background: var(--sheet); color: var(--ink); }
.chat__form { align-items: center; }
.chat__send { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--gold, var(--hi)); color: #111; cursor: pointer; }
.chat__send svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.chat__send:active { transform: scale(.94); }
.chat__handoff { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 10px 12px 12px; border: 0; background: transparent; color: var(--muted); font: 500 .85rem/1.3 var(--font); cursor: pointer; }
.chat__handoff b { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.chat__handoff .ico { width: 18px; height: 18px; color: #128c4a; flex: none; }
.chat__handoff:hover b { text-decoration-thickness: 2px; }

/* v138: the Let's Ace night-sky footer (same style as the Global site), and the closing call band shares its sky */
#enrol { background: url("assets/night-sky.png?v=2") center bottom / 1200px auto, #000; }
.footer--sky { position: relative; overflow: hidden; color: var(--on-navy-muted); padding-bottom: calc(96px + env(safe-area-inset-bottom));
  background: radial-gradient(70% 50% at 50% 100%, rgba(255, 201, 74, .12), transparent 70%), url("assets/night-sky.png?v=2") center top / 1200px auto, #000; }
.footer--sky > .wrap { position: relative; }
@media (min-width: 900px) { .footer--sky .footer__top { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; } }
.footer__cols { display: contents; }
@media (max-width: 767px) { .footer__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 20px; } .footer__cols > :last-child:nth-child(odd) { grid-column: 1 / -1; } }
.footer h3 { margin: 6px 0 12px; color: #fff; font-size: .95rem; font-weight: 700; }
.footer__about a:not(.brand) { color: #fff; }
.footer__addr { padding: 8px 0; line-height: 1.45; }
.footer--sky .socials a { width: 44px; height: 44px; transition: background .2s, color .2s, border-color .2s; }
.footer--sky .socials a:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.footer__giant { margin: clamp(32px, 5vw, 56px) 0 0; text-align: center; font: 700 min(17vw, 15rem)/1.05 var(--font); letter-spacing: -.02em; white-space: pre; user-select: none;
  color: #ffb81c; text-shadow: 0 0 34px rgba(255, 184, 28, .35), 0 0 2px rgba(255, 210, 110, .6); }
.footer__giant span { display: inline-block; transition: color .35s, transform .5s var(--out); }
.footer__giant span:hover { color: #ffd36b; transform: translateY(-.05em); }
.footer__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; margin-top: 12px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .13); font-size: .88rem; }
.footer__bottom p { margin: 0; }
.footer__bottom a { color: var(--on-navy-muted); text-underline-offset: 3px; }
.footer__bottom a:hover { color: #fff; }
.footer__links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.shooting { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.shooting i { position: absolute; top: 12%; left: 70%; width: 140px; height: 1.5px; border-radius: 2px; opacity: 0; rotate: -24deg;
  background: linear-gradient(90deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, 0)); animation: shoot 9s linear infinite; }
.shooting i:nth-child(2) { top: 30%; left: 35%; width: 100px; animation-delay: 3.6s; animation-duration: 11s; }
.shooting i:nth-child(3) { top: 8%; left: 92%; width: 120px; animation-delay: 6.8s; animation-duration: 13s; }
@keyframes shoot { 0% { opacity: 0; transform: translateX(0); } 2% { opacity: 1; } 9% { opacity: 0; transform: translateX(-360px); } 100% { opacity: 0; transform: translateX(-360px); } }
@media (prefers-reduced-motion: reduce) { .shooting { display: none; } .footer__giant span { transition: none; } }

/* v139: same sky, but a clear edge between the closing call section and the footer (a faint gold horizon line) */
.footer--sky::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg, transparent, rgba(255, 201, 74, .85) 15%, rgba(255, 201, 74, .85) 85%, transparent); }
.footer--sky { padding-top: clamp(64px, 8vw, 104px); }

/* v139: the closing call section is the brand gold, so it stands apart from the black footer */
#enrol { background: var(--gold); color: var(--ink); }
#enrol .book h2, #enrol .contact a { color: var(--ink); }
#enrol .eyebrow { color: rgba(15, 26, 58, .75); }
#enrol .lead { color: rgba(15, 26, 58, .82); }
#enrol .contact svg { color: var(--ink); }
#enrol .form { box-shadow: 0 24px 60px -30px rgba(15, 26, 58, .45); }

/* v139: IMAT hero rebuilt: the anatomy theatre photo fills the hero, text sits on a dark veil, the countdown is a glass panel aligned to the text */
.hero--photo { position: relative; isolation: isolate; overflow: hidden; display: grid; align-items: end; min-height: min(calc(100svh - var(--header-h)), 860px);
  padding: clamp(72px, 10vw, 140px) 0 clamp(40px, 6vw, 72px); background: #0b0d16; color: #fff; }
.hero__bg { position: absolute; inset: 0; z-index: -1; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 35%; }
.hero__bg::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(9, 11, 20, .92) 0%, rgba(9, 11, 20, .72) 42%, rgba(9, 11, 20, .2) 78%, rgba(9, 11, 20, .1) 100%), linear-gradient(0deg, rgba(9, 11, 20, .8) 0%, transparent 40%); }
@media (max-width: 1023px) { .hero__bg::after { background: linear-gradient(180deg, rgba(9, 11, 20, .55) 0%, rgba(9, 11, 20, .82) 45%, rgba(9, 11, 20, .94) 100%); } }
@media (min-width: 1024px) { .hero--photo .wrap { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); align-items: end; } }
.hero--photo h1 { color: #fff; max-width: 9.5em; }
.hero--photo .mark { color: var(--gold); }
.hero--photo .eyebrow { color: rgba(255, 255, 255, .78); }
.hero--photo .lead { color: rgba(255, 255, 255, .82); max-width: 32em; }
.hero--photo .facts { color: rgba(255, 255, 255, .72); }
.hero--photo .btn--line { border-color: rgba(255, 255, 255, .45); color: #fff; }
.hero--photo .btn--line:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }
.hero--photo .hero__visual { padding: 0; }
.hero--photo .pass { position: relative; inset: auto; margin: 0; color: #fff; background: rgba(12, 15, 28, .58); border: 1px solid rgba(255, 255, 255, .16); box-shadow: none;
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); }
.hero--photo .exam-card__label small, .hero--photo .cd span, .hero--photo .pass__foot { color: rgba(255, 255, 255, .7); }
.hero--photo .pass__foot b { color: #fff; }
.hero--photo .pass__foot { border-top-color: rgba(255, 255, 255, .16); }
.hero--photo .cd div { background: rgba(255, 255, 255, .08); }
.hero--photo .cd b { color: #fff; }
/* v141: sharper, brighter hero photo (Pavia courtyard); a lighter veil so the photo reads, still dark enough behind the text */
.hero__bg img { object-position: 50% 55%; }
.hero__bg::after { background: linear-gradient(90deg, rgba(9, 11, 20, .86) 0%, rgba(9, 11, 20, .62) 38%, rgba(9, 11, 20, .12) 70%, transparent 100%), linear-gradient(0deg, rgba(9, 11, 20, .7) 0%, transparent 38%); }
@media (max-width: 1023px) { .hero__bg::after { background: linear-gradient(180deg, rgba(9, 11, 20, .35) 0%, rgba(9, 11, 20, .78) 45%, rgba(9, 11, 20, .92) 100%); } }

/* v142: IMAT hero, three cities that teach medicine in English, as photo tiles above the countdown */

/* v142: practice section: marking key, pace line, quiz counter, pace bar and skip */
.marking-key { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 440px; margin: 0 0 22px; padding: 0; }
.marking-key li { display: grid; gap: 4px; padding: 14px 16px; border-radius: var(--r); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); }
.marking-key b { font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 800; font-stretch: 78%; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.marking-key .is-right b { color: #6fdca5; }
.marking-key .is-wrong b { color: #ff9384; }
.marking-key span { font-size: .85rem; font-weight: 600; color: var(--on-navy-muted); }
.pace { display: flex; align-items: flex-start; gap: 10px; max-width: 30em; margin: 0 0 20px; }
.pace svg { flex-shrink: 0; width: 22px; height: 22px; margin-top: 1px; fill: none; stroke: var(--gold); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.on-navy .pace b { color: #fff; }
.practice__more { display: inline-flex; gap: 6px; font-weight: 700; color: #fff; text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.practice__more:hover span { transform: translateX(3px); }
.practice__more span { transition: transform .2s; }
.quiz__meta { display: flex; justify-content: space-between; gap: 12px; margin: -4px 0 8px; font-size: .85rem; font-weight: 650; color: var(--muted); font-variant-numeric: tabular-nums; }
.quiz__bar { height: 5px; margin-bottom: 18px; border-radius: 5px; background: var(--card); overflow: hidden; }
.quiz__bar i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--gold); transition: width 1s linear; }
.quiz__bar.is-over i { background: var(--wrong); }
.quiz__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.quiz__skip { min-height: 40px; padding: 0 14px; border: 1.5px solid var(--line-2); border-radius: 999px; background: none; font: inherit; font-size: .9rem; font-weight: 650; color: var(--ink); cursor: pointer; }
.quiz__skip:hover { border-color: var(--ink); }
.quiz__skip[hidden] { display: none; }

/* v144: IMAT hero background is a slow slideshow of famous Italian sights (replaces the city tiles) */
.hero__bg img { position: absolute; inset: 0; object-position: 50% 50%; opacity: 0; transition: opacity 1.6s ease; }
.hero__bg img.is-on { opacity: 1; animation: hero-drift 7.6s linear both; }
@keyframes hero-drift { from { transform: scale(1.07); } to { transform: scale(1); } }
.hero__place { position: absolute; top: 20px; right: var(--gutter); z-index: 1; display: flex; align-items: center; gap: 8px; margin: 0; font-size: .85rem; font-weight: 650; color: rgba(255, 255, 255, .85); }
.hero__place::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
@media (prefers-reduced-motion: reduce) { .hero__bg img { transition: none; } .hero__bg img.is-on { animation: none; } }
.hero__place { padding: 6px 12px; border-radius: 999px; background: rgba(9, 11, 20, .6); color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
/* v145: no jerk between slides: the outgoing photo keeps the same drift (same animation name, so it isn't restarted) until its fade ends */
.hero__bg img { will-change: opacity, transform; }
.hero__bg img.is-on, .hero__bg img.was-on { animation: hero-drift 7.6s linear both; }
.hero__bg img.was-on { z-index: 0; }
.hero__bg img.is-on { z-index: 1; }
@media (prefers-reduced-motion: reduce) { .hero__bg img.is-on, .hero__bg img.was-on { animation: none; } }
.hero__bg img.was-on { opacity: 1; } /* stays solid under the incoming photo, so the fade never dips dark */
.hero__bg::after { z-index: 2; }
/* v146: photos that are leaving always sit underneath (they were painting over the slide below when the loop wrapped from Naples back to Rome) */
.hero__bg img { z-index: -1; }

/* Official logo images (header dark, footer light) */
.brand__logo { display: block; width: auto; height: 46px; max-width: none; }
.footer .brand__logo { height: 58px; }
@media (max-width: 380px) { header .brand__logo { height: 38px; } }
