/* perfectlockin.com
   One stylesheet for every page. Nothing is loaded from other websites: system fonts only.
   The home page lives one day: it starts in the ivory morning look and turns to night when the
   night section reaches the middle of the screen (site.js adds .night to <body>). */

:root {
  color-scheme: light;
  --bg: #FBF8F1;
  --bg-deep: #F3ECDD;
  --ink: #1C1A17;
  --muted: #645D51;
  --gold: #C39A32;
  --gold-text: #82631C;
  --line: #E3DBCB;
  --card: #FFFDF8;
  --field: #FFFFFF;
  --field-line: #8F8676;
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
  --ease: cubic-bezier(.2, .7, .2, 1);
}

body.night {
  color-scheme: dark;
  --bg: #0F0E0C;
  --bg-deep: #0B0B0C;
  --ink: #F2EFE9;
  --muted: #ABA498;
  --gold: #DFB54B;
  --gold-text: #DFB54B;
  --line: #2E2B26;
  --card: #171512;
  --field: #171512;
  --field-line: #77705F;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font: 18px/1.55 var(--serif);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .9s ease, color .9s ease;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--gold-text); outline-offset: 3px; border-radius: 4px; }
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 10px; font: 600 15px/1 var(--sans); text-decoration: none; }
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.narrow { max-width: 680px; }

/* small caps labels */
.cap { margin: 0; font: 600 12px/16px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.cap.gold { color: var(--gold-text); }

/* ornament: line, diamond, line */
.orn { display: flex; align-items: center; gap: 10px; width: 120px; color: var(--gold); flex: none; }
.orn::before, .orn::after { content: ""; flex: 1; height: 1px; background: currentColor; }
.orn i { width: 6px; height: 6px; background: currentColor; transform: rotate(45deg); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; padding-top: env(safe-area-inset-top, 0px); background: rgba(251, 248, 241, .92); background: color-mix(in srgb, var(--bg) 86%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); transition: background-color .9s ease; }
body.night .site-header { background: rgba(15, 14, 12, .9); background: color-mix(in srgb, var(--bg) 86%, transparent); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 16px/1 var(--sans); letter-spacing: .01em; }
.brand svg { width: 35px; height: 28px; flex: none; color: var(--gold); transition: color .9s ease; }
.header-join { font: 600 13px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; text-decoration: none; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--ink); opacity: 0; transform: translateY(-4px); pointer-events: none; visibility: hidden; transition: opacity .3s ease, transform .3s ease, visibility 0s linear .3s; }
.header-join.show { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition-delay: 0s; }

/* ---------- hero ---------- */
.hero { padding: 28px 0 56px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 18px; }
h1, h2 { font-family: var(--serif); font-weight: 400; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(42px, 11.5vw, 72px); line-height: 1.02; letter-spacing: -.025em; }
h2 { font-size: clamp(34px, 8.6vw, 56px); line-height: 1.06; letter-spacing: -.02em; }
.lede { margin: 0; font-size: clamp(19px, 4.9vw, 22px); line-height: 1.45; color: var(--ink); text-wrap: pretty; max-width: 34em; }
.lede .muted, .muted { color: var(--muted); }

/* ---------- the sign-up ---------- */
.join { width: 100%; max-width: 480px; }
.join-row { display: flex; gap: 10px; }
.join input[type="email"] { flex: 1; min-width: 0; height: 58px; padding: 0 18px; border-radius: 16px; border: 1px solid var(--field-line); background: var(--field); color: var(--ink); font: 18px/1 var(--sans); outline: none; transition: border-color .2s ease, box-shadow .2s ease; -webkit-appearance: none; appearance: none; }
.join input[type="email"]::placeholder { color: var(--muted); opacity: 1; }
.join input[type="email"]:focus { border-color: var(--ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 22%, transparent); }
.join input[aria-invalid="true"] { border-color: #A23B2A; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 58px; padding: 0 22px; border: 0; border-radius: 16px; background: var(--ink); color: var(--bg); font: 600 14px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .15s var(--ease), opacity .2s ease, background-color .9s ease, color .9s ease; }
.btn:active { transform: scale(.98); }
.btn[disabled], .btn[aria-busy="true"] { opacity: .6; cursor: progress; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.offer { margin: 14px 0 0; font: 600 15px/1.4 var(--sans); color: var(--gold-text); }
.offer::before { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 9px 2px 1px; background: var(--gold); border-radius: 50%; vertical-align: middle; }
.fine { margin: 8px 0 0; font: 14px/1.5 var(--sans); color: var(--muted); text-wrap: pretty; }
.fine a { color: inherit; }
.join-error { margin: 10px 0 0; font: 600 15px/1.4 var(--sans); color: #A23B2A; }
body.night .join-error { color: #E58C78; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.joined { display: flex; flex-direction: column; gap: 12px; padding: 22px 20px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); max-width: 480px; }
.joined h3 { margin: 0; font: 400 30px/1.15 var(--serif); letter-spacing: -.01em; }
.joined p { margin: 0; font: 16px/1.5 var(--sans); color: var(--muted); }
.joined strong { color: var(--ink); font-weight: 600; word-break: break-all; }
.joined .count { color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.chip { height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid var(--line); background: transparent; color: var(--ink); font: 500 15px/1 var(--sans); cursor: pointer; transition: background-color .2s ease, border-color .2s ease; }
.chip:hover { border-color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.joined .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.textbtn { background: none; border: 0; padding: 10px 0; color: var(--muted); font: 15px/1 var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- phone mock ---------- */
.phone-col { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.phone { position: relative; width: min(300px, 78vw); aspect-ratio: 300 / 620; border-radius: 52px; padding: 11px; background: #1C1A17; box-shadow: 0 1px 0 1px #3A3631 inset, 0 40px 80px -30px rgba(60, 44, 10, .45), 0 18px 30px -18px rgba(0, 0, 0, .35); flex: none; }
body.night .phone { background: #050505; box-shadow: 0 1px 0 1px #2B2824 inset, 0 40px 90px -30px rgba(223, 181, 75, .22), 0 18px 30px -18px rgba(0, 0, 0, .7); }
.screen { position: relative; width: 100%; height: 100%; border-radius: 42px; overflow: hidden; background: #FBF8F1; color: #1C1A17; display: flex; flex-direction: column; isolation: isolate; }
.screen.dark { background: radial-gradient(120% 55% at 50% -8%, #221E17 0, rgba(34, 30, 23, 0) 70%), #0F0E0C; color: #F2EFE9; }
.island { position: absolute; top: 11px; left: 50%; width: 92px; height: 26px; margin-left: -46px; background: #000; border-radius: 14px; z-index: 3; }
.s-status { display: flex; justify-content: space-between; padding: 15px 26px 0; font: 600 12px/1 var(--sans); height: 40px; flex: none; }
.s-body { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 10px 20px 22px; min-height: 0; }
.s-top { display: flex; justify-content: space-between; width: 100%; }
.s-cap { font: 600 9px/12px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: #6B6457; }
.screen.dark .s-cap { color: #A8A195; }
.s-cap.gold { color: #DFB54B; }
.s-mid { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; width: 100%; }
.s-num { font: 400 104px/1 var(--serif); letter-spacing: -2px; position: relative; }
.s-sun { position: relative; display: grid; place-items: center; }
.s-sun::before { content: ""; position: absolute; width: 230px; height: 230px; border-radius: 50%; background: repeating-conic-gradient(from 0deg, rgba(195, 154, 50, .3) 0 1.5deg, transparent 1.5deg 9deg); -webkit-mask: radial-gradient(circle, transparent 0 24%, #000 34%, transparent 68%); mask: radial-gradient(circle, transparent 0 24%, #000 34%, transparent 68%); animation: turn 90s linear infinite; opacity: .55; pointer-events: none; transition: opacity .9s; }
.s-sun > * { position: relative; }
.holding .s-sun::before { opacity: 1; }
.holding .s-num { transform: scale(1.06); transition: transform .9s ease-in; }
@keyframes turn { to { transform: rotate(360deg); } }
.s-orn { width: 80px; }
.s-text { margin: 0; font: 14px/1.4 var(--serif); color: #6B6457; text-wrap: balance; }
.screen.dark .s-text { color: #A8A195; }
.s-foot { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.s-hold { position: relative; overflow: hidden; height: 48px; width: 100%; border: 1px solid #1C1A17; border-radius: 13px; background: transparent; font: 600 10px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #1C1A17; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: pointer; }
.s-hold i { position: absolute; inset: 0; background: #1C1A17; transform: scaleX(0); transform-origin: left; transition: transform .25s ease-out; }
.s-hold.on i { transform: scaleX(1); transition: transform .9s linear; }
.s-hold span { position: relative; color: #fff; mix-blend-mode: difference; }
.try { margin: 0; font: 14px/1.4 var(--sans); color: var(--muted); }

/* screens inside the hero phone */
.view { position: absolute; inset: 40px 0 0; display: flex; flex-direction: column; opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility 0s linear .5s; }
.view.on { opacity: 1; visibility: visible; transition: opacity .5s ease; }
.veil { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 2; }
.veil.go { animation: veil .9s ease-out; }
@keyframes veil { 30% { opacity: 1; } 100% { opacity: 0; } }
.s-reader { flex: 1; padding: 14px 22px 22px; text-align: left; display: flex; flex-direction: column; gap: 9px; overflow: hidden; }
.s-bar { height: 2px; background: #E3DBCB; margin: 4px 0 6px; }
.s-bar b { display: block; height: 100%; width: 0; background: #8A6A1F; }
.view.on .s-bar b { width: 64%; transition: width 6s linear .6s; }
.s-title { margin: 2px 0 4px; font: 400 26px/1.1 var(--serif); letter-spacing: -.3px; text-align: center; }
.center { text-align: center; }
.s-para { margin: 0; font: 13.5px/1.55 var(--serif); }
.s-para.first::first-letter { float: left; font-size: 44px; line-height: 36px; padding: 4px 6px 0 0; color: #8A6A1F; }
.s-big { margin: 0; font: 400 30px/1.12 var(--serif); letter-spacing: -.3px; }
.s-again { background: none; border: 0; font: 600 9px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #6B6457; padding: 12px; cursor: pointer; }

/* night review screen */
.s-dial { position: relative; width: 100%; margin-top: 6px; }
.s-dial svg { width: 100%; overflow: visible; }
.s-way { fill: none; stroke: #A8A195; stroke-width: 1.5; stroke-dasharray: 1 7; stroke-linecap: round; opacity: .7; }
.s-trail { fill: none; stroke: #DFB54B; stroke-width: 2.4; stroke-linecap: round; }
.s-ground { stroke: #2E2B26; stroke-width: 1.5; }
.s-mark { fill: #A8A195; }
.s-orb { fill: #DFB54B; filter: drop-shadow(0 0 8px rgba(223, 181, 75, .85)); }
.s-left { position: absolute; left: 0; right: 0; bottom: 6%; font: 400 42px/1 var(--serif); letter-spacing: -.5px; font-variant-numeric: lining-nums tabular-nums; }
.s-ends { display: flex; justify-content: space-between; width: 100%; margin-top: -2px; }
.s-stage { margin-top: 12px; transition: opacity .45s ease; }
.s-prompt { margin: 6px 0 0; min-height: 66px; font: 17px/1.35 var(--serif); text-wrap: balance; transition: opacity .45s ease; }
.s-kept { font: italic 400 58px/1 var(--serif); color: #DFB54B; letter-spacing: -1px; }

/* ---------- the day, section by section ---------- */
.chapter { padding: 72px 0; }
.chapter .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; align-items: center; }
.chapter-copy { display: flex; flex-direction: column; gap: 16px; }
.chapter-copy p { margin: 0; font-size: clamp(19px, 4.8vw, 22px); line-height: 1.5; text-wrap: pretty; max-width: 30em; }
.facts { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.facts li { font: 600 12px/16px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); display: inline-flex; align-items: center; gap: 10px; }
.facts li::before { content: ""; width: 5px; height: 5px; background: var(--gold); transform: rotate(45deg); }

/* the page itself, set like a book */
.page { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 34px 28px 30px; box-shadow: 0 30px 60px -40px rgba(60, 44, 10, .35); max-width: 460px; }
.page::before { content: ""; position: absolute; inset: 8px; border: 1px solid var(--line); border-radius: 3px; pointer-events: none; }
.page header { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; margin-bottom: 20px; }
.page h3 { margin: 0; font: 400 30px/1.15 var(--serif); letter-spacing: -.2px; }
.page p { margin: 0 0 14px; font-size: 18px; line-height: 1.6; text-wrap: pretty; }
.page p.first::first-letter { float: left; font-size: 62px; line-height: 50px; padding: 5px 8px 0 0; color: var(--gold-text); }
.page .cap { margin: 0; font-size: 12px; line-height: 16px; }
.page .source { margin: 18px 0 0; font: 13px/1.5 var(--sans); color: var(--muted); }

.day-line { padding: 48px 0 64px; text-align: center; }
.day-line .wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.sunrise { width: 120px; height: 60px; }
.sunrise path { fill: none; stroke: var(--gold); stroke-width: 1.5; }
.sunrise circle { fill: var(--gold); }

.quote { margin: 8px 0 0; padding-left: 16px; border-left: 2px solid var(--gold); font-style: italic; color: var(--muted); font-size: 18px; line-height: 1.55; max-width: 30em; }
.quote cite { display: block; margin-top: 4px; font: 13px/1.4 var(--sans); font-style: normal; letter-spacing: .02em; }

/* ---------- kept and the last call ---------- */
.kept { position: relative; padding: 80px 0 72px; text-align: center; overflow: hidden; }
.kept .wrap { position: relative; display: flex; flex-direction: column; align-items: center; gap: 20px; }
#stars { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s ease; pointer-events: none; }
body.night #stars { opacity: 1; }
.kept-word { margin: 0; font: italic 400 clamp(76px, 22vw, 136px)/1 var(--serif); letter-spacing: -.03em; color: var(--gold); }
.kept .lede { text-align: center; }
.kept .join { margin-top: 8px; text-align: left; }
.kept .offer, .kept .fine { text-align: left; }

/* ---------- footer ---------- */
.site-footer { padding: 36px 0 calc(40px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); font: 14px/1.6 var(--sans); color: var(--muted); }
.site-footer .wrap { display: flex; flex-direction: column; gap: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: var(--ink); display: inline-block; padding: 6px 0; }
.site-footer p { margin: 0; }
.site-footer .trust { color: var(--ink); }

/* ---------- legal and small pages ---------- */
.doc { padding: 40px 0 64px; }
.doc h1 { font-size: clamp(36px, 9vw, 52px); margin-bottom: 10px; }
.doc h2 { font-size: 26px; line-height: 1.25; margin: 40px 0 10px; letter-spacing: -.01em; }
.doc h3 { font: 600 17px/1.4 var(--sans); margin: 24px 0 6px; }
.doc p, .doc li { font-size: 18px; line-height: 1.6; }
.doc ul { padding-left: 22px; }
.doc .meta { font: 14px/1.5 var(--sans); color: var(--muted); }
.doc address { font-style: normal; }
.doc .toc { font: 15px/1.9 var(--sans); }
.todo { background: #FFF1C9; color: #5A4300; border: 1px dashed #B38B1E; border-radius: 6px; padding: 0 6px; font-family: var(--sans); font-size: .9em; }
.center-page { min-height: 70vh; display: flex; align-items: center; padding: 48px 0; }
.center-page .wrap { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.center-page .lede { max-width: 28em; }
.step { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; width: 100%; }
.step .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.step .count { margin: 0; font: 600 16px/1.5 var(--sans); color: var(--ink); }
.step .fine { margin: 6px 0 0; }
.kept-small { margin: 0; font: italic 400 36px/1 var(--serif); color: var(--gold-text); letter-spacing: -.01em; }
.page .page-title { margin: 0; font: 400 30px/1.15 var(--serif); letter-spacing: -.2px; }
.sample { margin: 0 0 6px; width: 100%; }
.doc .summary { margin: 24px 0 8px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.doc .summary p { margin: 0; }
.join-hint { margin: 10px 0 0; font: 15px/1.4 var(--sans); color: var(--muted); }
.join-hint button { background: none; border: 0; padding: 6px 0; font: 600 15px/1.4 var(--sans); color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- motion ---------- */
/* Hidden only while site.js runs (it adds .js to <html>), so the page still shows without it. */
.rise { transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .rise:not(.in) { opacity: 0; transform: translateY(18px); }

/* ---------- larger screens ---------- */
@media (min-width: 900px) {
  body { font-size: 19px; }
  .hero { padding: 56px 0 96px; }
  .hero .wrap { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 64px; }
  .chapter { padding: 110px 0; }
  .chapter .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 80px; }
  .chapter.flip .chapter-copy { order: 2; }
  .phone { width: 300px; }
  .kept { padding: 130px 0 110px; }
}

@media (max-width: 520px) {
  .join-row { flex-direction: column; }
  .join input[type="email"] { flex: none; width: 100%; }
  .join-row .btn { width: 100%; }
}
@media (max-width: 380px) {
  .center-page .btn { width: 100%; }
}

@media (max-height: 700px) and (max-width: 600px) {
  .hero { padding-top: 14px; }
  .hero-copy { gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01s !important; animation-iteration-count: 1 !important; transition-duration: .01s !important; }
  .rise, .js .rise:not(.in) { opacity: 1; transform: none; }
}

@media print {
  .site-header, .join, .phone-col, #stars { display: none !important; }
  body, body.night { background: #fff; color: #000; }
}
