/* Rebels home, first experiment: the flyer system on the web.
   Fonts are the brand's, read from this Mac's installed copies; the live site needs webfont licenses. */

@font-face { font-family: "Tallica"; font-weight: 700; src: local("Tallica-Bold"), local("Tallica Bold"); }
@font-face { font-family: "Tallica"; font-weight: 700; font-style: italic; src: local("Tallica-BoldOblique"), local("Tallica Bold Oblique"); }
@font-face { font-family: "Tallica"; font-weight: 500; src: local("Tallica-Medium"), local("Tallica Medium"); }
@font-face { font-family: "Surfers South"; src: local("SurfersSouth"), local("Surfers South"); }

:root {
  /* brand.md palette */
  --periwinkle: #5A7AD6;
  --mint: #5FC98F;
  --sky: #6FB4E0;
  --warm-gray: #A79C9B;
  --cream: #F2EEE6;
  --ink: #2B2523;
  --peach: #F2C4A8;
  --red: #D6332B;
  --blue: #2F6BD8;
  --pale: #E4EDD8;   /* the pale type on Flight 101 */

  --display: "Tallica", "Oswald", Impact, "Arial Narrow", sans-serif;
  --script: "Surfers South", "Brush Script MT", cursive;
  --gutter: clamp(16px, 4vw, 56px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--ink);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Tallica kerns E against the space by -.18em, so "WE THROW" closes up; kerning off, and its narrow space widened.
   Word spacing is set per element so the em follows each size. */
body { font-kerning: none; }
body * { word-spacing: .14em; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }

/* Paper and grain over every colour field, as the flyer template finishes */
.hero, .last, .weekend, .list { position: relative; isolation: isolate; }
.paper {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url("media/paper-tile.jpg?v=2") center / 900px;
  mix-blend-mode: multiply; opacity: .55;
}
.paper::after {
  content: ""; position: absolute; inset: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: .35;
}

.script { font-family: var(--script); font-weight: 400; text-transform: none; letter-spacing: 0; word-spacing: 0; -webkit-text-stroke: .014em currentColor; }

/* Tallica's caps stand 1.35em tall: stack lines on the caps, trimmed to cap height and baseline */
.headline .line, .last h2, .weekend h2, .list h2, .infobar span, .ticker span { line-height: 1.42; }
@supports (text-box: trim-both cap alphabetic) {
  .headline .line, .last h2, .weekend h2, .list h2, .infobar span, .ticker span, .details span, .topline span, .credit { text-box: trim-both cap alphabetic; }
}
/* Impact's caps are .79 em: two-line headings sit .07 em apart, as the opening's lines do */
.last h2, .list h2, .weekend h2 { line-height: .86; }

.details { display: flex; flex-wrap: wrap; gap: .4em 1.4em; text-transform: uppercase; font-weight: 700; letter-spacing: .02em; }

/* ---------- Hero ---------- */
.hero {
  background: var(--periwinkle);
  color: var(--pale);
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 0 var(--gutter);
  overflow: hidden;
}

.topline {
  display: flex; align-items: center; gap: 2.5rem;
  border-bottom: 1.5px solid currentColor;
  padding: 1.1rem 0 .7rem;
  text-transform: uppercase; font-weight: 700; font-size: 15px; letter-spacing: .08em;
}
.topline-links { margin-left: auto; display: flex; gap: 1.6rem; }
.topline a { text-decoration: none; }
.topline a:hover { color: var(--ink); }

.hero-body {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center;
  gap: 3vw;
  padding: 7vh 0 4vh;
}

.headline {
  position: relative;
  text-transform: uppercase;
  font-weight: 700;
  line-height: .8;
  letter-spacing: -.01em;
}
.headline .line { display: block; font-size: clamp(64px, 15vw, 230px); }
.headline .line + .line { margin-top: .07em; }
.headline .script {
  position: absolute; z-index: 2;
  top: -.5em; left: -.12em;
  font-size: clamp(80px, 12vw, 190px);
  color: var(--peach);
  transform: rotate(-10deg);
  text-shadow: 3px 4px 0 rgba(43, 37, 35, .35);
}
.headline .mark {
  position: absolute; z-index: 1;
  width: clamp(130px, 14vw, 220px);
  right: -2%; top: 18%;
  transform: rotate(var(--spin, -10deg));
  filter: drop-shadow(4px 6px 0 rgba(43, 37, 35, .35));
}

.collage { position: relative; aspect-ratio: 1 / 1.05; }
.box {
  position: absolute; overflow: hidden;
  border: 2px solid var(--ink);
  background: var(--periwinkle);
  aspect-ratio: 4 / 5;
}
.box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.box .col { opacity: 0; transition: opacity .35s; }
.box:hover .col, .box.on .col { opacity: 1; }
.box-a { width: 58%; left: 0; top: 0; }
.box-b { width: 44%; right: 0; top: 14%; }
.box-c { width: 40%; left: 30%; bottom: 0; }

.infobar {
  display: flex; justify-content: space-between; gap: 1rem;
  border-top: 1.5px solid currentColor;
  padding: 1rem 0 1.2rem;
  text-transform: uppercase; font-weight: 700;
  font-size: clamp(22px, 3.4vw, 54px);
  line-height: 1;
}

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Ticker ---------- */
.ticker {
  display: block; overflow: hidden;
  background: var(--ink); color: var(--cream);
  text-decoration: none;
}
.ticker-track {
  display: flex; align-items: center; width: max-content;
  animation: slide 28s linear infinite;
}
.ticker span {
  font-style: italic; font-weight: 700; text-transform: uppercase;
  font-size: clamp(28px, 4vw, 56px);
  padding: .3em .5em;
  word-spacing: .3em;
}
.ticker i { width: .6em; height: .55em; margin: 0 .05em; background: currentColor; -webkit-mask: url("media/mark-shape.png") center / contain no-repeat; mask: url("media/mark-shape.png") center / contain no-repeat; font-size: clamp(28px, 4vw, 56px); }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- Last night ---------- */
.last {
  background: var(--cream);
  padding: clamp(56px, 9vw, 120px) var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 4vw;
  align-items: center;
  overflow: hidden;
}
.last h2 {
  text-transform: uppercase; font-weight: 700;
  font-size: clamp(56px, 9.2vw, 150px);
  color: var(--blue);
}
.kicker .script { font-size: clamp(56px, 7vw, 110px); color: var(--red); display: inline-block; transform: rotate(-6deg); margin-bottom: .05em; }
.last .details { margin-top: 1.6rem; font-size: clamp(18px, 1.8vw, 26px); color: var(--ink); }

.last-stage { position: relative; aspect-ratio: 1 / .9; }
.flyer {
  position: absolute; left: 0; top: 6%;
  width: 48%;
  transform: rotate(-5deg);
  box-shadow: 0 18px 40px rgba(43, 37, 35, .28);
}
.flyer::before { /* tape */
  content: ""; position: absolute; left: 50%; top: -14px; width: 110px; height: 30px;
  transform: translateX(-50%) rotate(3deg);
  background: rgba(242, 238, 230, .75); box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.phone {
  position: absolute; right: 4%; top: 0;
  width: 46%; aspect-ratio: 9 / 16;
  border-radius: 28px; overflow: hidden;
  border: 6px solid var(--ink); background: var(--ink);
  transform: rotate(3deg);
  box-shadow: 0 24px 50px rgba(43, 37, 35, .35);
}
.phone video { width: 100%; height: 100%; object-fit: cover; }
.sticker {
  position: absolute; z-index: 2;
  font-family: -apple-system, "Helvetica Neue", Arial, sans-serif; font-weight: 600;
  font-size: clamp(15px, 1.4vw, 20px);
  padding: .45em .8em; border-radius: 8px;
  background: #fff; color: #111;
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
}
.sticker-a { left: 26%; bottom: 3%; transform: rotate(-4deg); word-spacing: normal; }
.sticker-b { right: 0; top: 58%; transform: rotate(6deg); background: var(--red); color: #fff; word-spacing: normal; }

/* ---------- Weekend photos ---------- */
.weekend {
  background: var(--cream);   /* as the party panel */
  padding: clamp(56px, 8vw, 110px) 0 clamp(64px, 7vw, 104px);
  overflow: hidden;
}
.weekend-head { margin: 0 var(--gutter) clamp(28px, 4vw, 48px); padding: 0 0 clamp(16px, 2vw, 26px); display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; border-bottom: 1.5px solid rgba(43, 37, 35, .3); }
.weekend h2 { text-transform: uppercase; font-weight: 700; font-size: clamp(48px, 7.4vw, 120px); }
.weekend h2 .script { font-size: .75em; color: var(--cream); display: inline-block; transform: rotate(-8deg) translateY(-.15em); margin-right: .1em; }
.weekend .details { font-size: clamp(18px, 1.8vw, 26px); }

.reel { overflow: hidden; padding: 10px 0; }
.reel-track { display: flex; gap: 18px; width: max-content; animation: slide calc(var(--n, 12) * 5.8s) linear infinite; }
.reel-right .reel-track { animation-direction: reverse; animation-duration: calc(var(--n, 12) * 6.7s); }
.reel:hover .reel-track { animation-play-state: paused; }
.reel figure {
  width: clamp(170px, 17vw, 260px); aspect-ratio: 4 / 5; flex: none;
  border: 2px solid var(--ink); background: var(--ink);
  overflow: hidden;
  transform: rotate(var(--tilt, 0deg));
  transition: transform .25s;
}
.reel figure:hover { transform: rotate(0) scale(1.06); z-index: 1; }
.reel img { width: 100%; height: 100%; object-fit: cover; }
.credit { padding: clamp(24px, 3vw, 40px) var(--gutter) 0; font-size: 15px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }






/* The cream panels as one run of paper, one gap between their content, --flow (52-join-panels.py) */
:root { --flow: clamp(56px, 6.5vw, 100px); }
.last + .weekend { padding-top: calc(var(--flow) * .5); }

/* The gallery as tall as its content, its bottom half of the gap to the sign-up (55-gallery-fits.py) */
section.weekend { padding-bottom: calc(var(--flow) * .6); }
section.weekend .weekend-head { margin-bottom: clamp(18px, 2.4vw, 36px); }

/* ---------- Sign-up ---------- */
.list {
  background: var(--cream);
  padding: clamp(56px, 9vw, 120px) var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 4vw; align-items: center;
}
.list h2 { text-transform: uppercase; font-weight: 700; font-size: clamp(60px, 10.5vw, 170px); }
.list-head .script { font-size: clamp(56px, 7vw, 110px); color: var(--red); transform: rotate(-6deg); display: inline-block; margin-top: .25em; }
.list-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.list-form label { display: grid; gap: 6px; text-transform: uppercase; font-weight: 700; font-size: 15px; letter-spacing: .06em; }
.list-form .wide { grid-column: 1 / -1; }
.list-form input {
  font: 500 20px/1.2 var(--display);
  padding: 14px 14px; border: 2px solid var(--ink); border-radius: 0;
  background: rgba(255, 255, 255, .55); color: var(--ink);
}
.list-form input:focus { outline: 3px solid var(--ink); outline-offset: 2px; background: var(--cream); }
.list-form button {
  grid-column: 1 / -1; cursor: pointer;
  font: 700 clamp(26px, 2.6vw, 38px)/1 var(--display); text-transform: uppercase;
  padding: 18px; border: 2px solid var(--ink); background: var(--ink); color: var(--cream);
  word-spacing: .2em;
  transition: transform .15s;
}
.list-form button:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--red); }
.list-note { grid-column: 1 / -1; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }













/* "get it first" big across both lines of the title (58-tuck-script.py) */
.list-head { position: relative; padding-bottom: calc(var(--h2) * .45); }
.list-head .script { position: absolute; z-index: 1; margin: 0; left: calc(var(--h2) * .35); top: calc(var(--h2) * .5); font-size: calc(var(--h2) * 1.22); font-kerning: normal; word-spacing: -.06em; white-space: nowrap; transform: rotate(-9deg); text-shadow: 3px 4px 0 rgba(43, 37, 35, .3); }
@media (max-width: 760px) { .list-head .script { font-size: calc(var(--h2) * .95); left: calc(var(--h2) * .2); } }

/* The sign-up and the footer fill the last screen together (56-last-screen.py) */
section.list { align-content: start; padding-block: calc(var(--flow) * .6 + 56px) calc(var(--flow) * .9); }
section.list { --h2: clamp(56px, min(10.5vw, 16svh), 170px); }
section.list h2 { font-size: var(--h2); }
section.list .list-form { gap: clamp(8px, 1.5svh, 14px); }
section.list .list-form input { padding-block: clamp(8px, 1.3svh, 14px); }
section.list .list-form button { padding-block: clamp(12px, 2svh, 18px); }
footer.foot { padding-block: clamp(32px, 6svh, 80px); }
@media (max-width: 760px) { section.list { --h2: min(24vw, 16svh); } }

/* ---------- Footer ---------- */
.foot {
  background: var(--ink); color: var(--cream);
  padding: clamp(48px, 6vw, 80px) var(--gutter);
  display: flex; align-items: center; gap: clamp(24px, 4vw, 64px);
}
.foot-mark { width: clamp(110px, 12vw, 170px); flex: none; }
.foot-text { display: grid; gap: 1rem; font-size: clamp(18px, 1.6vw, 22px); max-width: 60ch; }
.foot-links { display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; text-transform: uppercase; font-weight: 700; letter-spacing: .05em; }
.foot-links a { text-decoration: none; border-bottom: 1.5px solid var(--peach); }

/* The footer's links as logos, in the footer's cream (59-footer-logos.py) */
.foot-links { align-items: center; }
/* the written links underlined in the footer's cream, not peach (Kingsley: "make the underlines cream too") */
.foot-links a { border-bottom-color: var(--cream); }
.foot-links a.logo { border-bottom: 0; display: inline-flex; align-items: center; }
.foot-links a.logo svg { display: block; fill: currentColor; }
.foot-links a.posh svg { height: 1.15em; width: auto; }

/* ---------- Phones ---------- */
@media (max-width: 760px) {

  .topline { gap: 1rem; font-size: 12px; flex-wrap: wrap; }
  .topline > span:nth-child(2) { display: none; }
  .topline-links { gap: 1rem; }
  .hero-body { grid-template-columns: 1fr; gap: 28px; padding: 9vh 0 4vh; }
  .headline .line { font-size: 28vw; }
  .headline .script { font-size: 22vw; }
  .headline .mark { width: 30vw; right: 0; top: 20%; }
  .collage { width: 100%; }
  .infobar { font-size: 4.6vw; }
  .infobar span { white-space: nowrap; }

  .last { grid-template-columns: 1fr; }
  .last h2 { font-size: 19vw; }
  .last-stage { aspect-ratio: 1 / 1.08; }
  .flyer { width: 52%; top: 8%; }
  .phone { width: 54%; right: 0; }
  .sticker-a { left: 4%; bottom: 4%; }
  .sticker-b { right: 2%; top: auto; bottom: 22%; }

  .weekend h2 { font-size: 15vw; }
  .reel figure { width: 44vw; }

  .list { grid-template-columns: 1fr; }
  .list h2 { font-size: 24vw; }
  .list-form { grid-template-columns: 1fr; }

  .foot { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track, .reel-track { animation: none; }
  html { scroll-behavior: auto; }
}
