/* ReFiley website.
   Two colours and one idea: the type itself converts and compresses. The display face is a
   variable font whose width runs from 50% to 150%; scrolling and time squeeze it. */

@font-face {
  font-family: "Anybody";
  src: url("/fonts/Anybody.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 50% 150%;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bone: #e7e8e4; --ink: #0b0c0e; --blue: #2445ff; --loss: #ff5a2e; --mute: #5d6066;
  --pad: clamp(16px, 2.6vw, 40px);
  --disp: "Anybody", "Arial Narrow", "PingFang TC", "Noto Sans TC", sans-serif;
  --text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang TC", "Helvetica Neue", "Noto Sans TC", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  /* A damped spring: overshoots about 16%, swings back once, settles. */
  --spring: linear(0, .034, .124, .249, .394, .544, .688, .817, .928, 1.016, 1.083, 1.128, 1.153, 1.163, 1.159, 1.146, 1.127, 1.103, 1.079, 1.055, 1.034, 1.015, 1, .988, .98, .976, .974, .974, .976, .979, .982, .986, .99, .994, .997, 1, 1.002, 1.003, 1.004, 1.004, 1);
}

* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bone); color: var(--ink); font: 17px/1.55 var(--text); -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
::selection { background: var(--blue); color: #fff; }

h2 { font: 800 clamp(30px, 4.6vw, 68px)/1 var(--disp); font-stretch: 80%; letter-spacing: -.01em; text-wrap: balance; }
:lang(zh-Hant) h2 { line-height: 1.15; font-weight: 700; }
.eyebrow, .kicker, .tagl, .cap, .scrollcue { font: 500 12px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; }

/* Top bar: stays put, and inverts against whatever is under it. */
.top { position: fixed; z-index: 10; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 16px var(--pad); color: var(--ink); background: rgba(231, 232, 228, .78); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transition: color .25s, background .25s; }
.top.light { color: #fff; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.brand { font: 800 22px/1 var(--disp); font-stretch: 110%; letter-spacing: -.01em; }
.top nav { display: flex; align-items: center; gap: 18px; font-size: 14px; font-weight: 500; }
.pill { border: 1.5px solid currentColor; border-radius: 999px; padding: 6px 14px; }

/* Hero */
.hero { position: relative; min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; padding: 84px var(--pad) 28px; overflow: hidden; isolation: isolate; }
.field { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.kicker { color: var(--ink); }
.morph { align-self: center; font-family: var(--disp); font-size: clamp(88px, 21.5vw, 420px); line-height: .8; letter-spacing: -.02em; text-transform: uppercase; user-select: none; padding: 2vh 0; }
.morph .from { font-stretch: 50%; font-weight: 300; }
.morph .to { font-stretch: 150%; font-weight: 900; text-align: right; display: flex; justify-content: flex-end; align-items: baseline; gap: .12em; white-space: nowrap; }
.morph .arrow { font: 300 .5em/1 var(--text); color: var(--blue); transform: translateY(-.18em); }
.morph .ext { display: inline-block; }
.herofoot { display: grid; grid-template-columns: 1fr minmax(280px, 440px); gap: 24px 48px; align-items: end; }
.lede { font-size: clamp(18px, 1.7vw, 24px); line-height: 1.35; max-width: 26em; font-weight: 500; text-wrap: pretty; }
.scrollcue { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); color: var(--mute); }

.notify { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.notify input[type=email] { min-width: 0; padding: 13px 16px; border: 1.5px solid var(--ink); border-radius: 999px; background: rgba(255, 255, 255, .7); }
.notify button { padding: 13px 22px; border: 0; border-radius: 999px; background: var(--ink); color: var(--bone); font-weight: 600; cursor: pointer; transition: transform .8s var(--spring), background .2s; }
.notify button:hover { background: var(--blue); }
.notify button:active { transform: scale(.92); transition-duration: .07s; }
.notify button:disabled { opacity: .6; }
.notify .msg { grid-column: 1 / -1; font-size: 13px; color: var(--mute); min-height: 1.5em; }
.notify .msg.bad { color: #b3200a; font-weight: 600; }
.notify .msg.good { color: var(--ink); font-weight: 600; font-size: 16px; }
.notify.sent input[type=email], .notify.sent button { display: none; }
.trap { position: absolute; left: -9999px; }

/* Pinned stages: tall sections whose content stays on screen while scroll drives it. */
.stage { height: 280vh; position: relative; }
.pin { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; padding: 84px var(--pad) 32px; overflow: hidden; }
.cols { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px 48px; align-items: end; }
.cols p { max-width: 30em; font-size: clamp(16px, 1.3vw, 19px); }

/* Compress: the number loses weight and width as you scroll */
.squeeze { background: var(--blue); color: #fff; }
.size { margin: auto 0; display: flex; align-items: baseline; gap: .08em; font-family: var(--disp); font-size: clamp(110px, 30vw, 560px); line-height: .8; font-stretch: 150%; font-weight: 900; letter-spacing: -.03em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.size .unit { font-size: .32em; font-weight: 500; font-stretch: 100%; letter-spacing: 0; }
.meter { height: 10px; background: rgba(255, 255, 255, .22); margin-bottom: 28px; }
.meter i { display: block; height: 100%; width: 100%; background: #fff; transform-origin: left; }
.cap { margin-top: 14px; opacity: .75; text-transform: none; letter-spacing: 0; font-size: 13px; }

/* Honest: the things a conversion loses fall off the page */
.honest { background: var(--ink); color: var(--bone); height: 340vh; }
.honest .cols { align-items: start; }
.honest .eyebrow { color: var(--loss); margin-bottom: 14px; }
.route { font: 500 clamp(15px, 1.4vw, 20px)/1 var(--mono); margin: auto 0 14px; padding-top: 24px; opacity: .7; }
.props { display: flex; flex-direction: column; }
.props li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-top: 1px solid rgba(231, 232, 228, .22); padding: .06em 0 .1em; will-change: transform; }
.word { font: 800 clamp(34px, min(8.4vw, 10.2vh), 150px)/1 var(--disp); font-stretch: 75%; text-transform: uppercase; letter-spacing: -.01em; position: relative; white-space: nowrap; }
:lang(zh-Hant) .word { font-weight: 700; line-height: 1.12; }
.lose .word::after { content: ""; position: absolute; left: -2%; right: -2%; top: 52%; height: .07em; background: var(--loss); transform: scaleX(var(--strike, 0)); transform-origin: left; }
.keep .tagl { color: var(--bone); }
.lose .tagl { color: var(--loss); }
.lose.gone .word { color: var(--loss); }

/* Local */
.local { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 48px; padding: 14vh var(--pad); align-items: center; }
.zero { display: flex; flex-direction: column; }
.big { font: 900 clamp(200px, 44vw, 760px)/.74 var(--disp); font-stretch: 150%; color: var(--blue); letter-spacing: -.04em; }
.zl { font: 500 14px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .08em; margin-top: 3.5vw; }
.side dl { margin-top: 36px; }
.side dl div { border-top: 1.5px solid var(--ink); padding: 18px 0 22px; display: grid; grid-template-columns: 11em 1fr; gap: 6px 20px; }
.side dt { font-weight: 700; }
.side dd { color: #2c2e33; }

/* Format names running past; the page's scroll speed pushes them */
.marquee { padding: 4vh 0 6vh; overflow: hidden; border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
.mrow { white-space: nowrap; font: 900 clamp(64px, 13vw, 240px)/.92 var(--disp); text-transform: uppercase; }
.mtrack { display: inline-flex; gap: .3em; padding-right: .3em; will-change: transform; }
.mrow:first-child { font-stretch: 150%; }
.mrow:last-child { font-stretch: 50%; font-weight: 300; color: var(--blue); }

/* Formats and pricing */
.formats, .pricing { padding: 14vh var(--pad) 0; }
.formats dl, .pricing .prow:first-of-type { margin-top: 40px; }
.formats dl div, .prow { border-top: 1.5px solid var(--ink); display: grid; grid-template-columns: minmax(120px, 1fr) 2fr; gap: 8px 48px; padding: 22px 0 28px; }
.formats dt { font: 800 clamp(24px, 3vw, 44px)/1 var(--disp); font-stretch: 80%; }
.formats dd { font-size: clamp(17px, 1.5vw, 22px); max-width: 36em; }
.more { color: var(--mute); font-size: 15px; border-top: 1.5px solid var(--ink); padding-top: 16px; }
.prow { grid-template-columns: minmax(120px, 1fr) 1fr 1fr; align-items: start; }
.prow h3 { font: 500 14px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .08em; padding-top: .8em; }
.price { font: 900 clamp(40px, 7vw, 120px)/.9 var(--disp); font-stretch: 120%; letter-spacing: -.02em; color: var(--blue); }
:lang(zh-Hant) .price { font-weight: 800; line-height: 1.05; }
.prow li { padding: 7px 0; border-bottom: 1px solid rgba(11, 12, 14, .18); }

/* The end */
.end { background: var(--blue); color: #fff; margin-top: 16vh; padding: 12vh var(--pad) 0; overflow: hidden; }
.endline { font: 800 clamp(30px, 5vw, 76px)/1 var(--disp); font-stretch: 80%; }
.endcta { display: inline-block; margin-top: 24px; border: 1.5px solid #fff; border-radius: 999px; padding: 12px 22px; font-weight: 600; transition: background .2s, color .2s; }
.endcta:hover { background: #fff; color: var(--blue); }
.wordmark { font: 900 23.4vw/.78 var(--disp); font-stretch: 50%; letter-spacing: -.02em; margin: 10vh 0 -.05em; white-space: nowrap; display: flex; justify-content: center; }
.foot { background: var(--blue); color: #fff; padding: 22px var(--pad) 26px; font-size: 14px; }
.links { display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: space-between; border-top: 1.5px solid rgba(255, 255, 255, .5); padding-top: 18px; }
.links nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.links a:hover, .top a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Policy pages */
.legal { background: var(--bone); }
.legal .foot { margin-top: 12vh; }
.doc { max-width: 760px; margin: 0 auto; padding: 130px var(--pad) 0; }
.doc h1 { font: 900 clamp(40px, 7vw, 92px)/.92 var(--disp); font-stretch: 75%; letter-spacing: -.01em; }
:lang(zh-Hant) .doc h1 { line-height: 1.1; font-weight: 800; }
.doc h2 { font: 700 21px/1.3 var(--text); font-stretch: 100%; letter-spacing: 0; margin: 40px 0 10px; border-top: 1.5px solid var(--ink); padding-top: 14px; }
.doc p { margin-top: 12px; color: #2c2e33; }
.doc .updated { font: 500 12px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); margin-top: 18px; }
.doc .trnote { font-size: 15px; border-left: 3px solid var(--blue); padding-left: 12px; }
.doc a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }

/* Smaller screens */
@media (max-width: 820px) {
  .herofoot, .cols, .local { grid-template-columns: 1fr; }
  .morph { font-size: 24vw; }
  .scrollcue { display: none; }
  .side dl div, .formats dl div { grid-template-columns: 1fr; }
  .prow { grid-template-columns: 1fr; gap: 6px; }
  .prow h3 { padding-top: 0; }
  .big { font-size: 62vw; }
  .pin { padding-top: 72px; }
  .top nav { gap: 12px; }
}

/* Motion that needs no script: the top of the page arrives. */
@media (prefers-reduced-motion: no-preference) {
  .kicker, .herofoot > * { animation: rise 1.2s var(--spring) both; }
  .herofoot > * { animation-delay: .35s; }
  .herofoot > :nth-child(2) { animation-delay: .45s; }
  .morph .from { animation: slide-l 1.3s var(--spring) .05s both; }
  .morph .to { animation: slide-r 1.3s var(--spring) .15s both; }
  @keyframes rise { from { opacity: 0; transform: translateY(26px); } }
  @keyframes slide-l { from { opacity: 0; transform: translateX(-9vw); } }
  @keyframes slide-r { from { opacity: 0; transform: translateX(9vw); } }
  .js [data-reveal] { opacity: 0; transform: translateY(40px); }
  .js [data-reveal].in { opacity: 1; transform: none; transition: opacity .45s ease-out var(--d, 0s), transform 1.3s var(--spring) var(--d, 0s); }
}
/* Without motion, the lost properties are simply struck through. */
@media (prefers-reduced-motion: reduce) {
  .stage { height: auto; }
  .pin { position: static; height: auto; min-height: 0; padding-bottom: 12vh; }
  .lose .word { --strike: 1; color: var(--loss); }
}
