/* Framley by McGill & Co.
   Colors and type follow the Framley brand kit (edition one, September 2026):
   ebony, ivory and brushed brass; Bodoni Moda for display, Hanken Grotesk for the quiet work.
   Brass is jewelry: the marks, the drawing, one rule. Dark and cinematic is the primary identity. */

@font-face {
  font-family: "Bodoni Moda";
  src: url("/fonts/bodoni-moda-latin-opsz-normal.woff2") format("woff2");
  font-weight: 400 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Bodoni Moda";
  src: url("/fonts/bodoni-moda-latin-opsz-italic.woff2") format("woff2");
  font-weight: 400 900; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/fonts/hanken-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  /* brand kit */
  --ebony: #14110d;
  --surface: #1d1914;
  --line: #2e2820;
  --ivory: #efe7d6;
  --stone: #9c9282;
  --brass: #bf9a5e;
  --brass-light: #e3c891;
  --brass-deep: #8a6a39;
  --paper: #f3ede2;
  --ink: #1a1612;
  --ink-soft: #5e5446;   /* secondary text on paper; stone is too light there */
  --mcgill-sun: #f7b84b; /* the McGill & Co. mark keeps its own sun */

  /* surface roles: paper sections in the light scheme */
  --bg: var(--paper);
  --fg: var(--ink);
  --fg-soft: var(--ink-soft);
  --accent: var(--brass-deep);
  --hair: rgba(26, 22, 18, 0.14);
  --field: rgba(26, 22, 18, 0.5);
  --focus: var(--brass-deep);
  --error: #9b2c1f;

  --display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --caps: 0.42em;

  --gutter: clamp(1rem, 4.2vw, 3.5rem);
  --measure: 88rem;
  --bar: clamp(5rem, 4.2rem + 2vw, 6.25rem);
  --ease: cubic-bezier(0.22, 0.61, 0.2, 1);
  --ease-light: cubic-bezier(0.45, 0.05, 0.25, 1);
  --fx: 50%;   /* focal point of the hero render */
  --fy: 30%;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--ebony);
    --fg: var(--ivory);
    --fg-soft: var(--stone);
    --accent: var(--brass);
    --hair: var(--line);
    --field: rgba(239, 231, 214, 0.42);
    --focus: var(--brass);
    --error: #f0a494;
  }
}

/* Dark surfaces look the same in both schemes */
.masthead, .hero, .maker, .colophon {
  --fg: var(--ivory);
  --fg-soft: var(--stone);
  --accent: var(--brass);
  --hair: var(--line);
  --focus: var(--brass);
  color: var(--fg);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--ebony); }

body {
  margin: 0;
  color: var(--fg);
  /* the warm glow of the brand guide, over ebony, behind the masthead and hero */
  background:
    radial-gradient(ellipse 60% 55% at 22% 0%, rgba(191, 154, 94, 0.13), transparent 70%) top / 100% 100svh no-repeat,
    var(--ebony);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  overflow-x: hidden;
}
::selection { background: var(--brass); color: var(--ebony); }

a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.3em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 1px; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  padding: 0.6rem 1rem; background: var(--ivory); color: var(--ebony); text-decoration: none;
}
.skip:focus { top: 1rem; }

/* Spaced capitals, the title-block lettering of the brand */
.byline, .jump, .credit, .still figcaption, label, button {
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: var(--caps);
  text-transform: uppercase;
}

/* Masthead: the top bar of the letterbox */
.masthead {
  min-height: var(--bar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 var(--gutter);
}
.brand { display: flex; align-items: center; gap: clamp(1rem, 2vw, 1.6rem); }
.wordmark { display: block; line-height: 0; }
.wordmark img { display: block; width: auto; height: clamp(3.25rem, 2.5rem + 1.9vw, 4.25rem); }
.byline {
  margin: 0;
  font-size: 0.7rem;
  color: var(--brass);
}
.jump {
  font-size: 0.7rem;
  text-decoration: none;
  padding: 0.6rem 0 0.4rem;
  background: linear-gradient(var(--brass), var(--brass)) left bottom / calc(100% - var(--caps)) 1px no-repeat;
  transition: background-size 420ms var(--ease), color 200ms var(--ease);
}
.jump:hover { color: var(--brass-light); background-size: 30% 1px; }

/* Hero: a letterboxed frame; the drawing rises, then daylight develops the render */
.hero {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: calc(100svh - var(--bar));
}
.frame {
  position: relative;
  align-self: center;
  width: 100%;
  height: 100%;
  min-height: max(16rem, calc(100vw / 2.6));
  max-height: calc(100vw / 2.39);
  overflow: hidden;
  container-type: size;
  background: radial-gradient(ellipse 70% 90% at 50% 45%, #231d16 0%, var(--ebony) 75%);
  isolation: isolate;
}
.plate {
  position: absolute;
  left: var(--fx);
  top: var(--fy);
  width: max(100cqw, 150cqh);
  aspect-ratio: 3 / 2;
  translate: calc(var(--fx) * -1) calc(var(--fy) * -1);
  transform-origin: var(--fx) var(--fy);
  animation: push-in 26s var(--ease) 2.6s both;
}
.plate picture, .plate .render, .plate .lines {
  position: absolute; inset: 0;
  display: block;
  width: 100%; height: 100%;
}
.plate .render {
  -webkit-mask-image: linear-gradient(100deg, #000 40%, transparent 60%);
  mask-image: linear-gradient(100deg, #000 40%, transparent 60%);
  -webkit-mask-size: 300% 100%;
  mask-size: 300% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: 100% 0;
  mask-position: 100% 0;
  animation: daylight 3.2s var(--ease-light) 2.6s forwards;
}

/* The drawing: fine brass line at the brand's 50 to 75 percent, notes in stone */
.lines {
  overflow: visible;
  animation: lines-rest 2.6s var(--ease) 3.4s forwards;
}
.lines path {
  fill: none;
  stroke: var(--brass);
  stroke-opacity: 0.74;
  stroke-width: 1.05;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 1.6s var(--ease) var(--d, 0s) forwards;
}
.lines .gl { stroke-opacity: 0.9; stroke-width: 1.35; }
.lines .b1 { --d: 0.3s; }
.lines .b2 { --d: 0.55s; }
.lines .b3 { --d: 0.8s; }
.lines .b4 { --d: 1.05s; }
.lines .b5 { --d: 1.3s; }
.lines .b6 { --d: 1.55s; }
.lines .notes { opacity: 0; animation: fade-in 1.2s var(--ease) 1.5s forwards; }
.lines .notes path { stroke-dasharray: none; stroke-dashoffset: 0; animation: none; }
.lines .hatch { stroke-opacity: 0.45; stroke-width: 0.9; }
.lines .notes .leader { stroke: var(--stone); stroke-opacity: 0.8; stroke-width: 0.8; stroke-dasharray: 3 5; }
.lines .datum { fill: none; stroke: var(--stone); stroke-width: 1; vector-effect: non-scaling-stroke; }
.lines .notes .quarter { fill: var(--stone); stroke: none; }
.lines text {
  fill: var(--stone);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

/* A warm band of low sun that crosses the frame once, just ahead of the daylight */
.daylight {
  position: absolute; inset: -10% 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(227, 200, 145, 0.32) 47%, rgba(235, 211, 160, 0.5) 50%, rgba(227, 200, 145, 0.28) 53%, transparent 70%);
  mix-blend-mode: soft-light;
  opacity: 0;
  translate: -85% 0;
  animation: sun-pass 3.2s var(--ease-light) 2.6s forwards;
}

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade-in { to { opacity: 1; } }
@keyframes daylight {
  to { -webkit-mask-position: 0 0; mask-position: 0 0; }
}
@keyframes lines-rest { to { opacity: 0; } }
@keyframes sun-pass {
  0% { opacity: 0; translate: -85% 0; }
  18% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; translate: 85% 0; }
}
@keyframes push-in { from { scale: 1; } to { scale: 1.045; } }

.titles {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0.6rem 2rem;
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(1.4rem, 3.2vw, 2.6rem) var(--gutter) clamp(1.6rem, 3.4vw, 2.75rem);
}
h1 {
  grid-column: 1 / -1;
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.9rem, 0.9rem + 4.9vw, 7rem);
  line-height: 1;
  letter-spacing: 0.005em;
  text-wrap: balance;
}
.subline {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.5rem, 1.3rem + 0.7vw, 2.1rem);
  line-height: 1.2;
  color: var(--ivory);
  text-wrap: balance;
}
.credit {
  margin: 0;
  font-size: 0.68rem;
  color: var(--stone);
  text-align: right;
}

/* Intro: the promise, then the three things it does */
.intro {
  background: var(--bg);
}
.intro-inner, .waitlist-inner {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0 clamp(1rem, 2.5vw, 2.5rem);
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(4.5rem, 10vw, 9rem) var(--gutter) clamp(4.5rem, 9vw, 8rem);
}
.lede {
  grid-column: 1 / span 7;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.25rem);
  line-height: 1.38;
  text-wrap: pretty;
}
.features {
  grid-column: 9 / -1;
  align-self: end;
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--hair);
}
.features li {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--hair);
  font-size: 1.05rem;
  line-height: 1.4;
}
.features svg {
  width: 1.75rem; height: 1.75rem;
  fill: none; stroke: var(--accent); stroke-width: 1.2;
  stroke-linecap: round; stroke-linejoin: round;
}

/* The studio behind it: a raised panel */
.maker {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem) clamp(1rem, 2.5vw, 2.5rem);
  align-items: center;
  background: var(--surface);
  padding: clamp(4.5rem, 9vw, 8rem) 0 clamp(4.5rem, 9vw, 8rem) max(var(--gutter), calc((100vw - var(--measure)) / 2 + var(--gutter)));
}
.maker-copy { grid-column: 1 / span 5; }
.mcd { display: block; width: clamp(5.5rem, 4.5rem + 3vw, 7.5rem); height: auto; margin-bottom: clamp(1.75rem, 3vw, 2.5rem); }
.mcd .sun { fill: var(--mcgill-sun); }
.mcd .ink { fill: none; stroke: var(--ivory); stroke-width: 15; stroke-linecap: butt; stroke-linejoin: miter; }
.mcd .ink g { stroke-width: 14; }
.maker h2, .waitlist h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.2rem, 1.5rem + 2.6vw, 4.1rem);
  line-height: 1.05;
  text-wrap: balance;
}
.maker-copy p {
  max-width: 34rem;
  margin: 1.5rem 0 0;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--stone);
}
.maker-copy .visit { margin-top: 1.75rem; color: var(--ivory); font-weight: 500; }
.still { grid-column: 7 / -1; margin: 0; }
.still img { display: block; width: 100%; height: auto; background: var(--ebony); }
.still figcaption {
  padding: 0.9rem var(--gutter) 0 0;
  font-size: 0.68rem;
  color: var(--stone);
  text-align: right;
}

/* Waitlist */
.waitlist { background: var(--bg); }
.waitlist-inner { gap: 2.5rem clamp(1rem, 2.5vw, 2.5rem); padding-bottom: clamp(4.5rem, 10vw, 9rem); }
.waitlist h2 { grid-column: 1 / span 5; }
.waitlist form, .waitlist .success { grid-column: 7 / -1; }
form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 1.75rem;
  position: relative;
}
.field { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
label { font-size: 0.7rem; color: var(--fg-soft); }
.optional { text-transform: none; letter-spacing: 0.02em; font-weight: 400; }
input, select {
  width: 100%;
  min-height: 2.9rem;
  padding: 0.5rem 0;
  font: inherit;
  font-size: 1.15rem;
  color: var(--fg);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--field);
  border-radius: 0;
  transition: border-color 200ms var(--ease);
}
input:hover, select:hover, input:focus-visible, select:focus-visible { border-bottom-color: var(--accent); }
input[aria-invalid="true"] { border-bottom-color: var(--error); }
.select { position: relative; }
.select select { appearance: none; padding-right: 1.75rem; cursor: pointer; }
.select select option { color: var(--ink); background: var(--paper); }
.select::after {
  content: "";
  position: absolute; right: 0.3rem; top: 50%;
  width: 0.45rem; height: 0.45rem;
  border-right: 1.5px solid var(--fg-soft); border-bottom: 1.5px solid var(--fg-soft);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

button {
  grid-column: 1 / -1;
  justify-self: start;
  position: relative;
  margin-top: 0.25rem;
  min-height: 3.4rem;
  padding: 0.9rem 2.4rem 0.9rem calc(2.4rem + var(--caps));
  font-size: 0.72rem;
  color: var(--ivory);
  background: var(--ebony);
  border: 1px solid var(--ebony);
  border-radius: 0;
  cursor: pointer;
  transition: background-color 220ms var(--ease), transform 180ms var(--ease);
}
button::after {
  content: "";
  position: absolute; left: 2.4rem; right: 2.4rem; bottom: 0.75rem;
  height: 1px;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 420ms var(--ease);
}
button:hover { background: var(--surface); }
button:hover::after, button:focus-visible::after { transform: scaleX(1); }
button:active { transform: translateY(1px); }
button[disabled] { opacity: 0.6; cursor: progress; }

.status { grid-column: 1 / -1; margin: 0; font-size: 0.95rem; }
.status:empty { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.status.error { color: var(--error); }
.success {
  margin: 0;
  align-self: center;
  font-family: var(--display);
  font-size: clamp(1.6rem, 1.3rem + 1.1vw, 2.3rem);
  line-height: 1.25;
}
.success:focus { outline: none; }

/* Footer: the end card */
.colophon {
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  padding: clamp(4.5rem, 10vw, 8rem) var(--gutter) 2.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--stone);
  background:
    radial-gradient(ellipse 50% 70% at 50% 0%, rgba(191, 154, 94, 0.1), transparent 70%),
    var(--ebony);
}
.colophon .lockup { width: clamp(11rem, 8rem + 12vw, 17rem); height: auto; margin-bottom: clamp(3rem, 6vw, 4.5rem); }
.colophon p { margin: 0; }
.colophon a { color: var(--ivory); }
.colophon .privacy { font-size: 0.8rem; }

@media (prefers-color-scheme: dark) {
  .colophon { border-top: 1px solid var(--line); }
  button { background: var(--ivory); color: var(--ebony); border-color: var(--ivory); }
  button:hover { background: var(--brass-light); border-color: var(--brass-light); }
  button::after { background: var(--brass-deep); }
}

@media (max-width: 1100px) {
  .lede { grid-column: 1 / -1; }
  .features { grid-column: 1 / -1; margin-top: clamp(2.5rem, 6vw, 3.5rem); }
  .maker-copy { grid-column: 1 / span 6; }
  .waitlist h2 { grid-column: 1 / -1; }
  .waitlist form, .waitlist .success { grid-column: 1 / span 9; }
  .titles { grid-template-columns: 1fr; }
  .credit { text-align: left; }
  .frame { min-height: max(16rem, calc(100vw / 2.2)); max-height: calc(100vw / 1.6); }
}

@media (max-width: 720px) {
  :root { --fy: 36%; }
  .brand { flex-direction: column; align-items: flex-start; gap: 0.2rem; padding: 0.8rem 0; }
  .wordmark img { height: 3.5rem; }
  .jump { font-size: 0.62rem; letter-spacing: 0.3em; }
  .hero { min-height: 0; grid-template-rows: auto auto; }
  .frame { height: auto; aspect-ratio: 1 / 1; max-height: 70svh; }
  .plate { width: max(100cqw, 185cqh); }
  .titles { grid-template-columns: 1fr; gap: 0.75rem; }
  .credit { text-align: left; }
  .maker { grid-template-columns: 1fr; padding: clamp(3.5rem, 12vw, 5rem) 0; }
  .maker-copy { grid-column: 1; padding: 0 var(--gutter); }
  .still { grid-column: 1; order: -1; }
  .still figcaption { padding-left: var(--gutter); text-align: left; }
  .waitlist form, .waitlist .success { grid-column: 1 / -1; }
  form { grid-template-columns: 1fr; }
  button { justify-self: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  .lines, .daylight { display: none; }
  .plate { animation: none; }
  .plate .render { animation: none; -webkit-mask-image: none; mask-image: none; }
  *, *::before, *::after { transition: none !important; }
}
