/* EVOKE 14 · UNSW Industrial Design graduating cohort
   Swiss grid, Manrope, indigo and yellow from the brand guideline.
   Light only, square corners throughout. */

:root {
  --ink:    #0F1019;
  --ink-2:  #4A4D5E;   /* secondary text, 8:1 on paper */
  --paper:  #FDFDFD;
  --rule:   rgba(15, 16, 25, .14);
  --wash:   #F2F2F5;   /* image placeholder while loading */

  --indigo:   #4853AE;
  --indigo-2: #5E66AF;
  --indigo-3: #757BAD;
  --yellow:   #FFC500;
  --yellow-2: #FFE680; /* the logo's 14 */
  --yellow-3: #FFF3CA;

  /* Type scale from the guideline: 40 / 24 / 20 / 15 */
  --t-h1:   clamp(30px, 2.2vw + 18px, 40px);
  --t-h2:   clamp(20px, .8vw + 16px, 24px);
  --t-body: clamp(17px, .4vw + 15px, 20px);
  --t-small: 15px;

  --gut:  clamp(16px, 2vw, 24px);
  --side: clamp(16px, 3vw, 40px);
  --max:  1440px;
  --head: 64px;

  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head) + 16px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--t-body)/1.55 "Manrope", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, video, svg { display: block; max-width: 100%; }
img { width: 100%; height: auto; object-fit: cover; background: var(--wash); }
p, h1, h2, dl, dd, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--yellow-2); color: var(--ink); }
:focus-visible { outline: 2px solid var(--indigo); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 30; background: var(--ink); color: var(--paper); padding: 8px 12px; font-size: var(--t-small); }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--side); }
.g { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gut); }

.h1, .h2, .project__strap, .hero__intro, .about__text p:first-child { text-wrap: balance; }
.h1 { font-size: var(--t-h1); font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.h2 { font-size: var(--t-h2); font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }

/* ---- logo -------------------------------------------------------------- */

.logo { width: 100%; height: auto; overflow: visible; }
.logo--ink   { fill: var(--ink); }
.logo--paper { fill: var(--paper); }
.logo-num    { fill: var(--yellow-2); }
.logo--sm    { width: 104px; }

/* ---- header ------------------------------------------------------------ */

.site-head {
  position: sticky; top: 0; z-index: 20;
  background: rgba(253, 253, 253, .92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.site-head__in { height: var(--head); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-head__logo { display: block; padding: 8px 0; }
.site-nav { display: flex; gap: clamp(16px, 3vw, 40px); font-size: var(--t-small); font-weight: 500; }
.site-nav a { position: relative; padding: 10px 0; }
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px;
  background: var(--indigo); transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.site-nav a:hover::after, .site-nav a[aria-current]::after { transform: scaleX(1); }

/* ---- home hero --------------------------------------------------------- */

.hero { padding-top: clamp(40px, 7vw, 96px); padding-bottom: clamp(48px, 7vw, 96px); }
.hero__logo { margin: 0; }
.hero__info { margin-top: clamp(32px, 5vw, 72px); padding-top: 20px; border-top: 1px solid var(--ink); row-gap: 24px; }
.hero__intro { grid-column: 1 / span 5; font-size: var(--t-h2); font-weight: 700; line-height: 1.3; letter-spacing: -.01em; max-width: 22ch; }
.hero__event { grid-column: 7 / span 6; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gut); }
.hero__event dt { font-size: var(--t-small); font-weight: 300; color: var(--ink-2); }
.hero__event dd { font-size: var(--t-small); font-weight: 700; margin-top: 2px; }
.hero__event--stack { grid-template-columns: 1fr; gap: 12px; margin: 16px 0 48px; }

/* Logo intro: the bars slide in from outside, the letters settle. */
@media (prefers-reduced-motion: no-preference) {
  .logo--intro .logo-bars polygon { animation: bar-in .9s var(--ease) both; }
  .logo--intro .logo-bars--l polygon { --dx: -60px; }
  .logo--intro .logo-bars--r polygon { --dx: 60px; }
  .logo--intro .logo-bars polygon:nth-child(2) { animation-delay: .07s; }
  .logo--intro .logo-bars polygon:nth-child(3) { animation-delay: .14s; }
  .logo--intro .logo-letters { animation: fade-up .9s var(--ease) .1s both; }
  .logo--intro .logo-num { animation: fade-up .7s var(--ease) .45s both; }
}
@keyframes bar-in { from { transform: translateX(var(--dx)); opacity: 0; } }
@keyframes fade-up { from { transform: translateY(24px); opacity: 0; } }

/* ---- project grid ------------------------------------------------------ */

.projects { padding-bottom: clamp(64px, 9vw, 128px); }
.projects .h2 { padding-bottom: 16px; border-bottom: 1px solid var(--rule); margin-bottom: var(--gut); }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(32px, 4vw, 56px) var(--gut); }
.tile { display: block; }
.tile__img { overflow: hidden; margin-bottom: 14px; }
.tile__img img { transition: transform .8s var(--ease); }
.tile:hover .tile__img img { transform: scale(1.035); }
.tile__name { font-size: var(--t-small); font-weight: 700; }
.tile__title { font-size: var(--t-small); color: var(--ink-2); }
.tile:hover .tile__title { color: var(--indigo); }

/* ---- cohort list ------------------------------------------------------- */

.cohort { padding-top: clamp(40px, 6vw, 80px); padding-bottom: clamp(64px, 9vw, 128px); }
.cohort .h1 { margin-bottom: clamp(24px, 4vw, 48px); }
.cohort__body { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: var(--gut); align-items: start; }
.rows { border-top: 1px solid var(--ink); }
.row {
  display: grid; grid-template-columns: 3.5em minmax(0, 1fr) minmax(0, 1.3fr); gap: var(--gut);
  align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--rule);
  transition: color .25s, padding .35s var(--ease);
}
.row__n { font-size: var(--t-small); font-weight: 300; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.row__name { font-weight: 700; }
.row__title { color: var(--ink-2); }
.row:hover, .row:focus-visible { color: var(--indigo); padding-left: 12px; }
.row:hover .row__title, .row:focus-visible .row__title { color: var(--indigo); }
.cohort__preview { position: sticky; top: calc(var(--head) + 24px); }
.cohort__preview img { aspect-ratio: 1/1; transition: opacity .25s; }
.cohort__preview.is-swap img { opacity: .2; }

/* ---- project page ------------------------------------------------------ */

.project__hero { padding-top: var(--gut); }
.project__intro { padding-top: clamp(32px, 5vw, 72px); padding-bottom: clamp(48px, 7vw, 96px); row-gap: 40px; }
.student { grid-column: 1 / span 3; position: sticky; top: calc(var(--head) + 24px); align-self: start; }
.student__img { margin-bottom: 16px; }
.student__name { font-size: var(--t-h2); font-weight: 700; line-height: 1.25; }
.student__degree { font-size: var(--t-small); font-weight: 300; color: var(--ink-2); margin-top: 4px; }
.student__links { margin-top: 20px; border-top: 1px solid var(--rule); font-size: var(--t-small); font-weight: 500; }
.student__links a { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--rule); transition: color .2s, padding .35s var(--ease); }
.student__links a::after { content: "\2197"; font-weight: 400; }
.student__links a:hover { color: var(--indigo); padding-left: 6px; }
.btn {
  display: inline-block; margin-top: 20px; padding: 12px 18px;
  background: var(--indigo); color: #fff; font-size: var(--t-small); font-weight: 700; white-space: nowrap;
  transition: background .2s, transform .15s;
}
.btn:hover { background: var(--ink); }
.btn:active { transform: translateY(1px); }

.project__text { grid-column: 5 / span 7; }
.project__strap { font-size: var(--t-h2); font-weight: 500; line-height: 1.3; color: var(--ink-2); margin-top: 12px; max-width: 32ch; }
.project__desc { margin-top: 32px; max-width: 62ch; }
.project__text .h2 { margin-top: 48px; }
.project__text .h2 + .project__desc { margin-top: 12px; }
.project__credits { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--rule); font-size: var(--t-small); font-weight: 300; color: var(--ink-2); }

.project__video { padding-bottom: var(--gut); }
.project__video video { width: 100%; background: var(--ink); }

.gallery { row-gap: var(--gut); padding-bottom: clamp(64px, 9vw, 128px); }
.gal-item { grid-column: auto / span var(--s); }
.gal-item[style*="--c"] { grid-column: var(--c) / span var(--s); }
.gal-item.is-shift { margin-top: clamp(32px, 8vw, 128px); }

.pager { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--ink); padding-bottom: clamp(48px, 6vw, 80px); }
.pager a { padding: 20px 0; font-size: var(--t-h2); font-weight: 700; transition: color .2s; }
.pager a:last-child { text-align: right; }
.pager a:hover { color: var(--indigo); }
.pager span { display: block; font-size: var(--t-small); font-weight: 300; color: var(--ink-2); margin-bottom: 4px; }

/* ---- about ------------------------------------------------------------- */

.about { padding-top: clamp(40px, 6vw, 80px); padding-bottom: clamp(64px, 9vw, 128px); row-gap: 32px; }
.about__h { grid-column: 1 / -1; }
.about__text { grid-column: 1 / span 7; display: grid; align-content: start; gap: 1em; max-width: 62ch; }
.about__text p:first-child { font-size: var(--t-h2); font-weight: 700; line-height: 1.35; }
.about__side { grid-column: 9 / span 4; }
.about__side .h2 { padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.about__names { columns: 2; column-gap: var(--gut); margin-top: 16px; font-size: var(--t-small); }
.about__names a { display: block; padding: 3px 0; }
.about__names a:hover { color: var(--indigo); }

.nf { padding-block: clamp(64px, 12vw, 160px); }
.nf p { margin-top: 16px; }
.nf a { text-decoration: underline; text-decoration-color: var(--indigo); text-underline-offset: 3px; }

/* ---- footer ------------------------------------------------------------ */

.site-foot { border-top: 1px solid var(--ink); }
.site-foot__in { display: grid; grid-template-columns: auto 1fr auto; gap: var(--gut); align-items: start; padding-block: 32px 40px; font-size: var(--t-small); }
.site-foot__mark svg { width: 44px; }
.site-foot p { color: var(--ink-2); line-height: 1.4; }
.site-foot nav { display: flex; gap: 24px; font-weight: 500; }
.site-foot nav a:hover { color: var(--indigo); }

/* ---- scroll reveal ----------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
}

/* ---- responsive -------------------------------------------------------- */

@media (max-width: 999px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__intro { grid-column: 1 / -1; }
  .hero__event { grid-column: 1 / -1; }
  .cohort__body { grid-template-columns: 1fr; }
  .cohort__preview { display: none; }
  .student { grid-column: 1 / span 4; }
  .project__text { grid-column: 6 / span 7; }
  .about__text, .about__side { grid-column: 1 / -1; }
}

@media (max-width: 699px) {
  .logo--sm { width: 88px; }
  .tiles { column-gap: 12px; }
  .hero__event { grid-template-columns: 1fr 1fr; }
  .row { grid-template-columns: 2.5em minmax(0, 1fr); row-gap: 2px; }
  .row__title { grid-column: 2; font-size: var(--t-small); }
  .student { grid-column: 1 / -1; position: static; display: grid; grid-template-columns: 40% 1fr; column-gap: 16px; }
  .student__img { grid-row: span 4; margin: 0; }
  .student__links { margin-top: 12px; }
  .project__text { grid-column: 1 / -1; }
  .gal-item, .gal-item[style*="--c"] { grid-column: 1 / -1; }
  .gal-item[style*="--s:6"] { grid-column: auto / span 6; }
  .gal-item.is-shift { margin-top: 0; }
  .site-foot__in { grid-template-columns: auto 1fr; }
  .site-foot nav { grid-column: 1 / -1; }
}
