/* ============================================================
   IEEE IAS-IES Joint Chapter, Sup'Com — visual system
   No framework, no build step. See DESIGN.md for the reasoning.
   ============================================================ */

:root {
  color-scheme: dark;

  --void:       #06100B;
  --surface:    #0C1A13;
  --surface-2:  #132418;
  --line:       rgba(47, 233, 146, 0.14);
  --line-firm:  rgba(47, 233, 146, 0.30);

  /* carried over unchanged from the previous site */
  --mint:       #2fe992;
  --mint-soft:  #74f0b6;
  /* IES orange, sampled from the chapter's own letters in teamies.jpg,
     where IAS is green and IES is orange. 8.9:1 on the void, so it can
     carry text - but it marks the second society, it is NOT a second
     interaction colour. Links, buttons and focus stay mint. */
  --ies:        #F89860;
  --green:      #13b86b;
  --green-deep: #0c7344;
  --glow:       rgba(47, 233, 146, 0.30);

  --ink:        #E8F5EE;
  --ink-soft:   #9FB5A8;
  --ink-faint:  #6B8275;

  --display: "Sora", "Segoe UI", system-ui, sans-serif;
  --body:    "Inter", "Segoe UI", system-ui, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --shell: min(1240px, 92vw);
  --r-sm: 10px;
  --r:    16px;
  --r-lg: 26px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* height:auto matters: with max-width alone, any rule that pins a height
   lets the width shrink to the container independently and the aspect
   ratio is destroyed. Rules below that genuinely want both axes set
   (object-fit wells) are more specific and still win. */
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, h4 {
  font-family: var(--display); font-weight: 600; line-height: 1.06;
  margin: 0; letter-spacing: -0.025em;
}
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--mint); color: var(--void); }

:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 4px; }

.shell { width: var(--shell); margin-inline: auto; }
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--mint); color: var(--void); padding: 12px 20px; font-weight: 500;
}
.skip:focus { left: 0; }

/* ---------- brand lockup ----------
   The mark is a horizontal lockup that already carries the chapter's name,
   so unlike a circular seal it can stand on its own — it just needs enough
   height for "Sup'Com Student Branch Chapter" to stay legible. */
.brand { display: flex; align-items: center; flex: none; }
.brand img { height: 44px; width: auto; transition: height 0.4s var(--ease); }
.nav.stuck .brand img { height: 36px; }

/* ---------- navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 90;
  padding: 16px 0;
  transition: padding 0.4s var(--ease), background 0.4s, box-shadow 0.4s;
}
.nav .shell { display: flex; align-items: center; gap: 24px; }
.nav.stuck {
  padding: 8px 0;
  background: rgba(6, 16, 11, 0.86);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 1px 0 var(--line), 0 18px 44px -34px rgba(0, 0, 0, 0.9);
}

.menu { display: flex; gap: 2px; margin-left: auto; align-items: center; }
.menu a {
  position: relative; padding: 9px 14px; border-radius: 99px;
  font-size: 0.89rem; font-weight: 500; color: var(--ink-soft);
  transition: color 0.3s, background 0.3s;
}
.menu a:hover { color: var(--mint); background: rgba(47, 233, 146, 0.08); }
.menu a.on { color: var(--mint); }
.menu a.on::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 3px;
  height: 2px; border-radius: 2px; background: var(--mint);
}

.burger { display: none; flex: none; padding: 8px; border-radius: 10px; }
.burger i { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--ink); margin: 4px 0; transition: 0.3s var(--ease); }
.burger[aria-expanded="true"] i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- shared furniture ---------- */
.sec { padding: 112px 0; }

.eyebrow {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--mint); font-weight: 500;
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 16px;
}
.eyebrow::before {
  content: ""; width: 26px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--mint), var(--ies));
}

.sec-head { max-width: 680px; margin-bottom: 56px; }
.sec-head.mid { margin-inline: auto; text-align: center; }
.sec-head.mid .eyebrow::before { display: none; }
.sec-head h2 { font-size: clamp(2rem, 4.4vw, 3.3rem); }
/* :not(.eyebrow) is load-bearing. This rule is (0,1,1) and .eyebrow is
   (0,1,0), so without it the three eyebrows that sit inside a .sec-head
   lose their colour AND their size to it: In numbers, Executive board
   and What we run were rendering at 16.64px in --ink-soft instead of
   10.88px in mint, with an 18px top margin they never asked for. The
   other two eyebrows are not inside a .sec-head, which is why only
   three of the five were wrong. */
.sec-head p:not(.eyebrow) { margin-top: 18px; color: var(--ink-soft); font-size: 1.04rem; }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 26px; border-radius: 99px;
  font-weight: 500; font-size: 0.93rem;
  border: 1px solid var(--mint); color: var(--mint);
  transition: background 0.35s var(--ease), color 0.35s, transform 0.35s var(--ease), box-shadow 0.35s;
}
.btn:hover { background: var(--mint); color: var(--void); transform: translateY(-2px); }
/* ink on mint is the VOID, never white: white on mint is 1.4:1 */
.btn.solid { background: var(--mint); color: var(--void); box-shadow: 0 14px 34px -16px var(--glow); }
.btn.solid:hover { background: var(--mint-soft); border-color: var(--mint-soft); }
.btn svg { width: 15px; height: 15px; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: flex-end;
  overflow: hidden; isolation: isolate;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 38%; }
/* dark at top for the nav, dark at the foot for the headline, thin across
   the middle so the board stays visible — that is the point of the shot */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to bottom,
      rgba(6,16,11,0.82) 0%,
      rgba(6,16,11,0.34) 24%,
      rgba(6,16,11,0.26) 46%,
      rgba(6,16,11,0.78) 76%,
      rgba(6,16,11,0.97) 100%);
}
.hero-inner { padding: 160px 0 92px; width: 100%; }
/* Both societies in the chip's own mint. The orange reading was tried and
   dropped: it made IES look like a separate brand pinned onto an IAS page
   rather than half of one chapter. --ies still carries the eyebrow rule
   and the figures band, where it marks a surface rather than a word. */
.hero-kicker .ias, .hero-kicker .ies { font-weight: 500; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--mint);
  background: rgba(47, 233, 146, 0.1); border: 1px solid var(--line-firm);
  padding: 7px 16px; border-radius: 99px; backdrop-filter: blur(8px);
  margin-bottom: 26px;
}
.hero h1 {
  font-weight: 700; font-size: clamp(2.7rem, 7.6vw, 6.6rem);
  letter-spacing: -0.035em; max-width: 16ch;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.55);
}
.hero h1 em { font-style: normal; color: var(--mint); }
.hero-sub {
  margin-top: 26px; max-width: 56ch; font-size: 1.08rem; color: var(--ink-soft);
  text-shadow: 0 1px 20px rgba(0, 0, 0, 0.7);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 34px; }

.scroll-cue {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--ink-faint); z-index: 2;
}
.scroll-cue i { width: 1px; height: 40px; background: linear-gradient(var(--mint), transparent); animation: cue 2.2s ease-in-out infinite; }
@keyframes cue { 0%,100% { transform: scaleY(0.4); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 72px; align-items: start; }
.about-grid h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); max-width: 12ch; }
.about-body p { color: var(--ink-soft); font-size: 1.07rem; }
.about-body p + p { margin-top: 18px; }
.about-body strong { color: var(--ink); font-weight: 500; }

/* ============================================================
   NUMBERS — figures reversed over a photograph
   ============================================================ */
.figures { position: relative; padding: 110px 0; overflow: hidden; isolation: isolate; }
.figures-bg { position: absolute; inset: 0; z-index: -2; }
.figures-bg img {
  width: 100%; height: 100%; object-fit: cover;
  /* the source is bright green tech art. Darkening the photograph rather
     than thickening the scrim keeps its texture visible while the figures
     stay legible - at full brightness white text over the orange end
     measured 1.8:1 against the real pixels. */
  filter: brightness(0.45);
}
.figures::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  /* the one large colour surface on the page, and so where the two
     societies meet: IAS green running into IES orange. Both ends are
     deeper than their accent versions for the same reason green-deep
     exists - a surface that carries white text cannot be the bright
     value. Solved against the actual photograph: 5.97:1 at worst. */
  background: linear-gradient(108deg,
    rgba(6,16,11,0.92) 8%,
    rgba(11,104,61,0.74) 45%,
    rgba(170,86,34,0.74) 100%);
}
.figures-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.figure b {
  display: block; font-family: var(--display); font-weight: 700;
  font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 0.95;
  letter-spacing: -0.04em; color: #fff;
  /* reserve the final width so the count-up cannot reflow the row */
  font-variant-numeric: tabular-nums;
}
.figure span {
  display: block; margin-top: 12px; font-family: var(--mono);
  font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(232, 245, 238, 0.76);
}

/* ---------- team ---------- */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.member {
  position: relative; border-radius: var(--r); overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--line);
  transition: transform 0.45s var(--ease), border-color 0.45s, box-shadow 0.45s;
}
.member:hover { transform: translateY(-6px); border-color: var(--line-firm); box-shadow: 0 28px 56px -30px var(--glow); }
.member-img { aspect-ratio: 4 / 5; overflow: hidden; }
.member-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; transition: transform 0.8s var(--ease); }
.member:hover .member-img img { transform: scale(1.05); }
.member-body {
  position: absolute; inset: auto 0 0 0; padding: 54px 20px 20px;
  background: linear-gradient(to top, rgba(6,16,11,0.96) 32%, transparent);
  display: flex; align-items: flex-end; gap: 12px;
}
.member-body h3 { font-size: 1.04rem; }
.member-body p {
  font-family: var(--mono); font-size: 0.63rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--mint); margin-top: 5px;
}
/* Two icons per member now. .member-social a is display:grid, so without
   a flex context here the second anchor would stack under the first. */
.member-social { margin-left: auto; flex: none; display: flex; gap: 8px; }
.member-social a {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-firm); color: var(--ink);
  transition: background 0.3s, color 0.3s, transform 0.3s var(--ease);
}
.member-social a:hover { background: var(--mint); color: var(--void); transform: translateY(-2px); }
.member-social svg { width: 14px; height: 14px; fill: currentColor; }

/* ---------- events ---------- */
/* Year tabs, built by ias.js from each card's data-year. Hidden until the
   script runs, so without JavaScript every card simply shows. */
.ev-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin: -18px 0 36px; }
.ev-tabs[hidden] { display: none; }
.ev-tab {
  display: inline-flex; align-items: baseline; gap: 7px;
  padding: 9px 18px; border-radius: 999px;
  border: 1px solid var(--line-firm); color: var(--ink-soft); background: none;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  cursor: pointer; transition: color 0.3s, border-color 0.3s, background 0.3s, box-shadow 0.3s;
}
.ev-tab:hover { color: var(--mint); border-color: var(--mint); }
/* dark ink on mint, never white: white on mint is 1.4:1 */
.ev-tab.is-on {
  color: var(--void); background: var(--mint); border-color: var(--mint);
  box-shadow: 0 10px 26px -12px var(--glow);
}
.ev-tab-n { font-size: 0.64rem; color: var(--ink-faint); }
.ev-tab:hover .ev-tab-n { color: var(--mint-soft); }
.ev-tab.is-on .ev-tab-n { color: var(--green-deep); }
.ev-tab:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }

.ev-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ev[hidden] { display: none; }
.ev {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.45s var(--ease), border-color 0.45s, box-shadow 0.45s;
}
.ev:hover { transform: translateY(-6px); border-color: var(--line-firm); box-shadow: 0 28px 56px -32px var(--glow); }
.ev-img { aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.ev-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.ev:hover .ev-img img { transform: scale(1.05); }
.ev-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.ev-body h4 { font-size: 1rem; line-height: 1.3; font-weight: 600; font-family: var(--display); }
.ev-body h4 a { transition: color 0.3s; }
.ev:hover .ev-body h4 a { color: var(--mint); }
.meta { font-family: var(--mono); font-size: 0.7rem; color: var(--ink-faint); margin-top: auto; }

/* ---------- contact ---------- */
/* The deep green band (DESIGN.md), running into IES orange on the right
   the way the figures band does: the two societies meeting. The orange end
   is the figures band's deep rgb(170,86,34), not the bright --ies, because
   it carries white text. Plus a mint glow top left and a fine circuit
   grid. */
.contact {
  position: relative; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(60% 70% at 0% 0%, rgba(47, 233, 146, 0.20), transparent 70%),
    radial-gradient(45% 70% at 100% 60%, rgba(248, 152, 96, 0.22), transparent 70%),
    linear-gradient(108deg, #0d7a48 0%, var(--green-deep) 42%, #3f6a2c 68%, rgb(150, 76, 30) 100%);
}
.contact::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(80% 90% at 50% 40%, #000, transparent 85%);
          mask-image: radial-gradient(80% 90% at 50% 40%, #000, transparent 85%);
}

.contact-grid { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 64px; align-items: center; }
.contact h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); color: #fff; }
.contact .eyebrow { color: #BFF6DA; }
.contact .eyebrow::before { background: linear-gradient(90deg, #BFF6DA, var(--ies)); }
.contact-lede { margin-top: 16px; max-width: 42ch; color: rgba(255,255,255,0.82); font-size: 1.04rem; }

.contact-cards { margin-top: 30px; display: grid; gap: 12px; }
.contact-card {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 18px; border-radius: var(--r);
  background: rgba(6, 16, 11, 0.22); border: 1px solid rgba(255,255,255,0.12);
  transition: background 0.3s, border-color 0.3s, transform 0.3s var(--ease);
}
.contact-card:hover { background: rgba(6, 16, 11, 0.32); border-color: rgba(191, 246, 218, 0.35); transform: translateX(4px); }
.contact-ico {
  flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(191, 246, 218, 0.14); border: 1px solid rgba(191, 246, 218, 0.28); color: #BFF6DA;
}
.contact-ico svg { width: 19px; height: 19px; fill: currentColor; }
.contact-txt { min-width: 0; }
.contact-txt b {
  display: block; font-family: var(--mono); font-size: 0.64rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.62); font-weight: 500; margin-bottom: 3px;
}
.contact-txt > span { display: block; color: #fff; font-size: 0.98rem; line-height: 1.45; }
.contact-txt i { font-style: normal; color: rgba(255,255,255,0.45); margin: 0 4px; }
.contact-txt a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255,255,255,0.35); text-underline-offset: 3px; transition: text-decoration-color 0.3s; }
.contact-txt a:hover { text-decoration-color: #fff; }
/* the chapter address is 38 characters with no spaces: let it break on a phone */
.contact-txt a.mail { overflow-wrap: anywhere; }

/* the form on frosted glass over the band */
.contact-form {
  padding: 32px; border-radius: var(--r-lg);
  background: rgba(6, 16, 11, 0.34); border: 1px solid rgba(255,255,255,0.14);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255,255,255,0.08);
}
.form-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 24px; }
.form-head h3 { font-family: var(--display); font-size: 1.3rem; color: #fff; }
.form-tag {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: #BFF6DA; padding: 5px 11px; border-radius: 99px; border: 1px solid rgba(191, 246, 218, 0.35);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { margin-bottom: 16px; }
.field label {
  display: block; font-family: var(--mono); font-size: 0.64rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255,255,255,0.7); margin-bottom: 7px;
}
.field input, .field textarea {
  width: 100%; font: inherit; color: #fff;
  background: rgba(0, 0, 0, 0.26); border: 1px solid rgba(255,255,255,0.16);
  border-radius: var(--r-sm); padding: 13px 15px;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:hover, .field textarea:hover { border-color: rgba(255,255,255,0.28); }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--mint); background: rgba(0, 0, 0, 0.34);
  box-shadow: 0 0 0 4px rgba(47, 233, 146, 0.18);
}
.field input::placeholder, .field textarea::placeholder { color: rgba(255,255,255,0.38); }

.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 6px; }
.form-note { font-size: 0.82rem; color: rgba(255,255,255,0.68); flex: 1 1 200px; }
.form-note a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.btn.onband { background: #fff; color: var(--green-deep); border-color: #fff; }
.btn.onband:hover { background: var(--mint); color: var(--void); border-color: var(--mint); }
.btn.onband svg { width: 15px; height: 15px; fill: currentColor; transition: transform 0.35s var(--ease); }
.btn.onband:hover svg { transform: translateX(3px); }

/* ---------- footer ---------- */
.foot { background: var(--void); padding: 72px 0 30px; border-top: 1px solid var(--line); }
.foot-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 48px; }
.foot-brand img {
  /* drive it from the width: the full joint lockup is 2.4:1 and needs
     room for the JOINT CHAPTER lines to stay readable */
  width: min(330px, 100%); height: auto; margin-bottom: 22px;
}
.foot-brand p { color: var(--ink-soft); font-size: 0.94rem; max-width: 38ch; }
.foot h4 { font-size: 0.72rem; font-family: var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 16px; font-weight: 500; }
.foot li + li { margin-top: 9px; }
.foot li a { font-size: 0.94rem; color: var(--ink-soft); transition: color 0.3s; }
.foot li a:hover { color: var(--mint); }
.socials { display: flex; gap: 10px; margin-top: 22px; }
.socials a {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-firm); color: var(--ink);
  transition: background 0.3s, color 0.3s, transform 0.3s var(--ease);
}
.socials a:hover { background: var(--mint); color: var(--void); transform: translateY(-3px); }
.socials svg { width: 15px; height: 15px; fill: currentColor; }
.foot-base {
  margin-top: 54px; padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  font-size: 0.84rem; color: var(--ink-faint);
}

/* ---------- motion ---------- */
.rise { opacity: 0; transform: translateY(14px); transition: opacity 0.65s var(--ease), transform 0.65s var(--ease); }
.rise.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .team-grid, .ev-grid { grid-template-columns: repeat(2, 1fr); }
  .figures-grid { grid-template-columns: repeat(2, 1fr); gap: 36px; }
}

@media (max-width: 900px) {
  .sec, .figures { padding: 76px 0; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-grid h2 { max-width: none; }
  .hero-inner { padding: 132px 0 78px; }

  /* margin-left: auto, because the thing that used to push the burger
     right was margin-left: auto on .menu, and .menu goes position:
     absolute just below this line. Out of the flex flow it pushes
     nothing, so the burger fell in beside the brand. */
  .burger { display: block; margin-left: auto; }
  .menu {
    position: absolute; top: calc(100% + 8px); left: 4vw; right: 4vw;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 12px;
    background: rgba(6, 16, 11, 0.97); backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid var(--line); border-radius: 20px;
    box-shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.95);
    opacity: 0; visibility: hidden; transform: translateY(-10px) scale(0.98);
    transform-origin: top center;
    transition: opacity 0.3s var(--ease), transform 0.35s var(--ease), visibility 0.3s;
  }
  .menu.open { opacity: 1; visibility: visible; transform: none; }
  .menu a { padding: 13px 16px; font-size: 1rem; }
  .menu a.on::after { display: none; }
  .nav .shell { position: relative; }
}

@media (max-width: 640px) {
  .ev-grid, .form-row { grid-template-columns: 1fr; }
  /* The board stays at two across, as it does on the GRSS-AESS site. A
     single column gives each face the full width of the screen and
     turns five people into five screenfuls of scrolling.

     At half width the caption cannot stay on one line: .member-body is
     a flex row with the icons pushed right, which leaves about 63px for
     the name once two 32px circles and the gaps are out, and a name
     like "Mohamed Ayoub Ayadi" shreds. So the body stacks here and the
     icons sit under the role, which is what the MTT-S and WIE cards do
     at every width anyway. */
  .team-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .member-body { display: block; padding: 48px 14px 14px; }
  .member-body h3 { font-size: 0.95rem; }
  .member-social { margin: 10px 0 0; gap: 6px; }
  .member-social a { width: 28px; height: 28px; }
  .member-social svg { width: 12px; height: 12px; }
  .contact-form { padding: 24px 20px; }
  .contact-card { padding: 12px 14px; gap: 13px; }
  .contact-ico { width: 38px; height: 38px; }
  .figures-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .foot-top { grid-template-columns: 1fr; gap: 36px; }
  .hero h1 { max-width: 100%; }
}

/* ---------- motion off ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .rise { opacity: 1; transform: none; }
}
