/* Marginworks website. Quiet, editorial luxury: white space, one serif for statements, one sans for everything
   else, full-bleed film and images, colour used sparingly (deep green, a touch of lime). */
@font-face { font-family: "Inter"; font-weight: 100 900; font-display: swap; src: url("assets/fonts/inter-latin-wght-normal.woff2") format("woff2"); }
:root {
  --ink: #111511; --soft: #5C625D; --line: #E6E3DC; --paper: #FFFFFF; --cream: #F7F5F0;
  --green: #0F3D2E; --green-2: #1F6B4F; --lime: #B6E05A;
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: Inter, "Helvetica Neue", Arial, sans-serif;
  --wide: min(1320px, calc(100vw - 96px));
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.kicker { font-size: 11.5px; letter-spacing: .24em; text-transform: uppercase; font-weight: 500; }
.link { display: inline-block; line-height: 1.4; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; padding-bottom: 4px;
  border-bottom: 1px solid currentColor; cursor: pointer; background: none; border-top: 0; border-left: 0; border-right: 0;
  font-family: var(--sans); color: inherit; }
.link:hover { opacity: .7; }
.btn { display: inline-block; font: 500 13px var(--sans); letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
  padding: 17px 34px; border: 1px solid var(--ink); background: var(--ink); color: #fff; cursor: pointer; transition: all .3s; }
.btn:hover { background: transparent; color: var(--ink); }
.btn.light { background: #fff; color: var(--ink); border-color: #fff; } .btn.light:hover { background: transparent; color: #fff; }

/* Header: a centred wordmark, two quiet links */
.head { position: fixed; inset: 0 0 auto 0; z-index: 20; height: 76px; display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; padding: 0 48px; color: #fff; transition: background .4s, color .4s, box-shadow .4s; }
.head.solid { background: rgba(255,255,255,.97); color: var(--ink); box-shadow: 0 1px 0 var(--line); }
.head nav { display: flex; gap: 34px; } .head nav:last-child { justify-content: flex-end; }
.head nav a { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; text-decoration: none; }
.wordmark { font-family: var(--serif); font-size: 27px; letter-spacing: .32em; text-transform: uppercase; text-decoration: none;
  font-weight: 500; padding-left: .32em; }

/* Hero: full-screen film of the app, the line, two calls to action */
.hero { position: relative; height: 100svh; min-height: 620px; overflow: hidden; background: var(--green); color: #fff; }
.hero video { position: absolute; inset: -4%; width: 108%; height: 108%; object-fit: cover; opacity: .38;
  filter: blur(3px) saturate(.55) contrast(1.05); }
.hero::after { content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 62%, rgba(9,33,24,.55) 0%, rgba(9,33,24,.82) 70%),
              linear-gradient(180deg, rgba(9,33,24,.65) 0%, rgba(9,33,24,.2) 40%, rgba(9,33,24,.9) 100%); }
.hero-copy { position: absolute; left: 0; right: 0; bottom: 11vh; z-index: 2; text-align: center; padding: 0 24px; }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 6.4vw, 96px); line-height: 1.02; margin: 18px 0 34px;
  letter-spacing: -.01em; }
.hero-cta { display: flex; gap: 44px; justify-content: center; align-items: center; flex-wrap: wrap; }
.scroll { position: absolute; left: 50%; bottom: 26px; z-index: 2; width: 1px; height: 44px; background: rgba(255,255,255,.6);
  animation: drop 2.4s ease-in-out infinite; }
@keyframes drop { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* Statements */
.statement { padding: 150px 24px; text-align: center; }
.statement p:not(.kicker) { font-family: var(--serif); font-size: clamp(28px, 3.3vw, 46px); line-height: 1.28; max-width: 22em; margin: 26px auto 0; font-weight: 400; }
.statement p em { font-style: italic; color: var(--green-2); }

/* The method: three columns */
.method { width: var(--wide); margin: 0 auto; padding: 0 0 150px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.method figure { margin: 0; }
.method .img { aspect-ratio: 4 / 3; background: var(--cream); overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 34px; }
.method .img img { width: 100%; height: auto; max-height: 100%; object-fit: contain; box-shadow: 0 18px 50px rgba(15,61,46,.14); transition: transform .8s; }
.method figure:hover .img img { transform: scale(1.025); }
.method figcaption { text-align: center; padding: 28px 10px 0; }
.method h3 { font-family: var(--serif); font-size: 30px; font-weight: 400; margin: 10px 0 8px; }
.method p { color: var(--soft); margin: 0 auto; max-width: 30ch; font-size: 15px; }

/* Full-bleed product picture */
.wide-shot { background: var(--cream); padding: 120px 0 110px; text-align: center; }
.wide-shot img { width: var(--wide); margin: 0 auto; box-shadow: 0 30px 90px rgba(15,61,46,.16); }
.wide-shot p { font-family: var(--serif); font-size: 26px; margin: 46px auto 0; max-width: 28em; }

/* Split sections */
.split { width: var(--wide); margin: 0 auto; display: grid; grid-template-columns: 1.15fr 1fr; gap: 90px; align-items: center; padding: 150px 0; }
.split.flip { grid-template-columns: 1fr 1.15fr; } .split.flip .pic { order: 2; }
.split .pic { background: var(--cream); padding: 44px; } .split .pic img { box-shadow: 0 18px 50px rgba(15,61,46,.12); background: #fff; }
.split h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 3.6vw, 54px); line-height: 1.08; margin: 16px 0 22px; }
.split p { color: var(--soft); font-size: 17px; max-width: 34ch; margin: 0 0 30px; }
.rule { height: 1px; background: var(--line); width: var(--wide); margin: 0 auto; }

/* Proof: deep green, full bleed */
.proof { background: var(--green); color: #fff; padding: 150px 24px; text-align: center; }
.proof h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 4.6vw, 68px); margin: 18px 0 16px; line-height: 1.05; }
.proof h2 em { color: var(--lime); font-style: italic; }
.proof > p { color: #C9DDD2; max-width: 40ch; margin: 0 auto 60px; font-size: 17px; }
.proof img { width: min(980px, 100%); margin: 0 auto; box-shadow: 0 40px 100px rgba(0,0,0,.35); }

/* Principles */
.principles { width: var(--wide); margin: 0 auto; padding: 150px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 0; }
.principles div { padding: 10px 34px; border-left: 1px solid var(--line); }
.principles div:first-child { border-left: 0; padding-left: 0; }
.principles h3 { font-family: var(--serif); font-weight: 400; font-size: 27px; margin: 14px 0 10px; }
.principles p { color: var(--soft); font-size: 15px; margin: 0; }

/* Films */
.films { background: var(--cream); padding: 140px 0; }
.films .grid { width: var(--wide); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.film { cursor: pointer; }
.film .frame { position: relative; overflow: hidden; background: #000; aspect-ratio: 16 / 10; }
.film .frame img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: transform .8s, opacity .4s; }
.film:hover .frame img { transform: scale(1.03); opacity: 1; }
.film .play { position: absolute; left: 50%; top: 50%; width: 78px; height: 78px; margin: -39px 0 0 -39px; border-radius: 50%;
  border: 1px solid #fff; display: flex; align-items: center; justify-content: center; }
.film .play::after { content: ""; border-left: 15px solid #fff; border-top: 9px solid transparent; border-bottom: 9px solid transparent; margin-left: 4px; }
.film h3 { font-family: var(--serif); font-size: 28px; font-weight: 400; margin: 22px 0 4px; }
.film p { color: var(--soft); margin: 0; font-size: 15px; }

/* Closing */
.closing { padding: 170px 24px 150px; text-align: center; }
.closing h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 4.8vw, 72px); margin: 18px 0 18px; line-height: 1.05; }
.closing > p:not(.kicker) { color: var(--soft); max-width: 40ch; margin: 0 auto 42px; font-size: 17px; }
.foot { border-top: 1px solid var(--line); padding: 34px 48px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--soft); letter-spacing: .04em; }

/* Film player */
.player { position: fixed; inset: 0; z-index: 50; background: rgba(5,15,11,.94); display: none; align-items: center; justify-content: center; padding: 40px; }
.player.on { display: flex; }
.player video { width: min(1200px, 100%); max-height: 86vh; background: #000; }
.player .close { position: absolute; top: 24px; right: 32px; color: #fff; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1.1s ease, transform 1.1s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .scroll { animation: none; } }

@media (max-width: 900px) {
  :root { --wide: calc(100vw - 32px); }
  .head { padding: 0 16px; height: 64px; } .head nav.left { display: none; } .head { grid-template-columns: 1fr auto; }
  .head nav a.hide-sm { display: none; } .wordmark { font-size: 20px; letter-spacing: .24em; }
  .statement, .split, .principles, .closing { padding-top: 96px; padding-bottom: 96px; }
  .method, .films .grid { grid-template-columns: 1fr; gap: 56px; } .method { padding-bottom: 96px; }
  .split, .split.flip { grid-template-columns: 1fr; gap: 40px; } .split.flip .pic { order: 0; } .split .pic { padding: 20px; }
  .principles { grid-template-columns: 1fr 1fr; gap: 36px 0; } .principles div:nth-child(3) { border-left: 0; padding-left: 0; }
  .proof, .wide-shot, .films { padding-top: 96px; padding-bottom: 96px; }
  .hero-cta { gap: 26px; } .foot { padding: 28px 16px; }
}
@media (max-width: 560px) { .principles { grid-template-columns: 1fr; } .principles div { border-left: 0; padding: 0; } }

/* Waitlist */
.wl { width: min(640px, 100%); margin: 0 auto; text-align: left; }
.wl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 26px; margin-bottom: 34px; }
.wl-full { grid-column: 1 / -1; }
.wl label span { display: block; font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--soft); margin-bottom: 8px; }
.wl input, .wl select { width: 100%; font: 16px var(--sans); color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid #BDB9AF;
  padding: 10px 0; border-radius: 0; appearance: none; -webkit-appearance: none; }
.wl select { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23111511'/%3E%3C/svg%3E") no-repeat right 4px center; }
.wl input:focus, .wl select:focus { outline: none; border-bottom-color: var(--ink); }
.wl .btn { display: block; margin: 0 auto; }
.wl-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.wl-msg { text-align: center; min-height: 1.6em; margin: 18px 0 0; color: #A32D28; font-size: 14.5px; }
.wl-note { text-align: center; color: var(--soft); font-size: 13px; margin: 6px auto 0; max-width: none; }
.wl-done { margin-top: 10px; } .wl-thanks { font-family: var(--serif); font-size: 34px; line-height: 1.25; color: var(--ink); max-width: 20em; margin: 16px auto 0; }
@media (max-width: 560px) { .wl-grid { grid-template-columns: 1fr; } }
