:root {
  color-scheme: light;
  --ink: #101210;
  --ink-raised: #171a17;
  --paper: #f5f4ef;
  --surface: #fdfcf9;
  --raised: #eeeee8;
  --line: #d9d9d2;
  --line-dark: #303330;
  --text-on-dark: #f1f1ec;
  --secondary-on-dark: #a7aba6;
  --muted: #666b66;
  --blue: #3f57d9;
  --mint: #9be4b5;
  --coral: #e37a65;
  --font: "Manrope", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: -80px;
  left: 16px;
  padding: 12px 16px;
  color: var(--ink);
  background: var(--surface);
  font-size: 14px;
  font-weight: 500;
}

.skip-link:focus {
  top: 16px;
}

.access-shell {
  display: grid;
  min-height: 100svh;
  grid-template-columns: minmax(0, 1.12fr) minmax(440px, 0.88fr);
}

.story {
  display: grid;
  min-height: 100svh;
  grid-template-rows: auto auto minmax(0, 1fr);
  padding: clamp(32px, 4vw, 56px);
  color: var(--text-on-dark);
  background: var(--ink);
  overflow: hidden;
}

.story-brand {
  width: max-content;
  color: var(--text-on-dark);
  text-decoration: none;
}

.story-brand .mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
}

.story-brand img {
  width: 36px;
  height: 36px;
  filter: invert(1);
}

.story-copy {
  align-self: start;
  padding: clamp(64px, 9vh, 96px) 0 40px;
}

h1,
h2 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.03em;
}

h1 {
  max-width: 12ch;
  color: var(--text-on-dark);
  font-size: clamp(48px, 5vw, 72px);
  line-height: 1.02;
}

.day {
  position: relative;
  width: min(100%, 800px);
  align-self: start;
  padding: 0 16px;
  border: 1px solid var(--line-dark);
  border-radius: 16px;
  background: var(--ink-raised);
  overflow: hidden;
}

.day-line {
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 124px;
  width: 1px;
  background: var(--line-dark);
  overflow: hidden;
}

.day-line i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--mint);
  transform-origin: top;
  animation: draw-line 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.moment {
  position: relative;
  display: grid;
  min-height: 64px;
  grid-template-columns: 88px 16px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--line-dark);
  opacity: 0;
  animation: arrive 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.moment:last-child {
  border-bottom: 1px solid var(--line-dark);
}

.moment:nth-child(2) {
  animation-delay: 0.05s;
}

.moment:nth-child(3) {
  animation-delay: 0.1s;
}

.moment:nth-child(4) {
  animation-delay: 0.15s;
}

.moment:nth-child(5) {
  animation-delay: 0.2s;
}

.moment time {
  color: #a1a6a1;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.moment-dot {
  position: relative;
  z-index: 2;
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  margin: auto;
  border: 1px solid var(--mint);
  border-radius: 50%;
  background: var(--mint);
  color: #123120;
}

.moment:not(.moment-recovery) .moment-dot::after {
  content: "✓";
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}

.moment-recovery {
  margin: 0 -16px;
  padding: 0 16px;
  background: #1b1817;
}

.moment-recovery .moment-dot {
  border-color: var(--coral);
  background: var(--ink-raised);
}

.moment-recovery .moment-dot::after {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--coral);
  content: "";
}

.moment div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.moment strong {
  font-size: 14px;
  font-weight: 500;
}

.moment small {
  color: #969b96;
  font-size: 12px;
}

.moment b {
  color: var(--secondary-on-dark);
  font-size: 11px;
  font-weight: 500;
}

.moment-recovery b {
  color: var(--coral);
}

.access {
  display: grid;
  min-height: 100svh;
  align-items: center;
  padding: clamp(40px, 6vw, 80px);
  background: var(--paper);
}

.access-inner {
  width: min(100%, 460px);
  margin: auto;
}

.access h2 {
  max-width: 11ch;
  font-size: clamp(40px, 4vw, 52px);
  line-height: 1.05;
}

.access-intro {
  max-width: 42ch;
  margin: 16px 0 32px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.social-options {
  display: grid;
  gap: 12px;
}

.social-button {
  display: grid;
  min-height: 48px;
  grid-template-columns: 20px 1fr 20px;
  align-items: center;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--surface);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.16s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.16s cubic-bezier(0.22, 1, 0.36, 1);
}

.social-button:hover {
  border-color: #c6c7c0;
  background: var(--raised);
}

.social-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.social-button span {
  grid-column: 2;
}

.social-button[aria-busy="true"] {
  cursor: wait;
  opacity: 0.7;
}

.access-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--muted);
  font-size: 12px;
}

.access-divider::before,
.access-divider::after {
  height: 1px;
  flex: 1;
  background: var(--line);
  content: "";
}

.access-divider span {
  white-space: nowrap;
}

form {
  display: grid;
}

label {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
}

input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid #c9cac3;
  border-radius: 10px;
  color: var(--ink);
  background: var(--surface);
  font-size: 16px;
  transition:
    border-color 0.16s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.16s cubic-bezier(0.22, 1, 0.36, 1);
}

input::placeholder {
  color: #8a8e89;
}

input:focus {
  border-color: var(--blue);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(63, 87, 217, 0.14);
}

input[aria-invalid="true"] {
  border-color: #b13f2c;
}

.field-message {
  min-height: 20px;
  margin: 4px 0 8px;
  color: #a23927;
  font-size: 12px;
}

.social-error {
  margin: 0;
}

form button {
  min-height: 52px;
  border: 1px solid var(--ink);
  border-radius: 10px;
  color: #fff;
  background: var(--ink);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.16s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.16s cubic-bezier(0.22, 1, 0.36, 1);
}

form button:hover {
  border-color: #292c29;
  background: #292c29;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

form button[aria-busy="true"] {
  cursor: wait;
  opacity: 0.72;
}

.security-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.access-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.access-footer p {
  margin: 0 0 16px;
}

.access-footer p a {
  color: var(--ink);
  font-weight: 500;
}

.access-footer nav {
  display: flex;
  gap: 20px;
}

.access-footer nav a {
  text-underline-offset: 3px;
}

.sent-mark {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 24px;
  place-items: center;
  border-radius: 14px;
  background: var(--mint);
}

.sent-mark img {
  width: 36px;
  height: 36px;
}

.text-button {
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  color: var(--ink);
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

@keyframes draw-line {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}

@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 940px) {
  .access-shell {
    grid-template-columns: 1fr;
  }

  .story {
    min-height: auto;
    padding: 32px;
  }

  .story-copy {
    padding: 64px 0 48px;
  }

  h1 {
    max-width: 13ch;
    font-size: clamp(48px, 9vw, 68px);
  }

  .day {
    width: 100%;
  }

  .access {
    min-height: auto;
    padding: 80px 32px;
  }
}

@media (max-width: 560px) {
  .story {
    padding: 24px 20px 48px;
  }

  .story-copy {
    padding: 48px 0 0;
  }

  h1 {
    max-width: 12ch;
    font-size: 44px;
  }

  .day {
    display: none;
  }

  .access {
    padding: 64px 20px;
  }

  .access h2 {
    font-size: 40px;
  }

  .access-footer {
    margin-top: 40px;
  }

  .access-footer nav {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
}
