/* Left: the pitch and the email field. Right: a big waffle to play with,
   whose squares flip over into meeting notes. Amber and the two fonts are
   the app's own. */
:root {
  color-scheme: dark;
  --bg: #0d0c0a;
  --ink: #f6f2e9;
  --body: #bdb8ac;
  --muted: #8a857a;
  --amber: #f5a524;
  --amber-soft: #ffc965;
  --pocket: #c98414;
  --on-amber: #1c1b17;
  --paper: #fdf7e8;
  --paper-ink: #1c1b17;
  --paper-label: #8a5200;
  --red: #ff8a8e;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Figtree", system-ui, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse 46% 60% at 74% 52%, rgb(245 165 36 / 0.16), transparent 70%),
    var(--bg);
  color: var(--body);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,
p {
  margin: 0;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--amber-soft);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Top ---------- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
}

/* "Coming soon" with the two systems it is coming to. The rim of the pill is
   a thin amber-to-nothing gradient. */
.soon {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  padding: 5px 18px 5px 5px;
  border: 1px solid transparent;
  border-radius: 999px;
  background:
    linear-gradient(#17150f, #17150f) padding-box,
    linear-gradient(100deg, rgb(245 165 36 / 0.85), rgb(246 242 233 / 0.14) 62%) border-box;
  box-shadow: 0 8px 30px rgb(245 165 36 / 0.12);
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 500;
}

.soon-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 10px;
  border-radius: 999px;
  background: rgb(245 165 36 / 0.16);
  color: var(--amber-soft);
  font-weight: 600;
}

/* A small light that pulses, like something on its way. */
.soon-tag i {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
}

.soon-tag i::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--amber);
  animation: ping 2.2s ease-out infinite;
}

@keyframes ping {
  to {
    opacity: 0;
    transform: scale(3.4);
  }
}

.os {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.os svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

/* ---------- Layout ---------- */
.page {
  display: grid;
  flex: 1;
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  align-items: center;
  gap: 72px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 32px 48px;
}

h1 {
  max-width: 9.5em;
  color: var(--ink);
  font: 400 clamp(50px, min(7.4vw, 13vh), 104px) / 0.96 var(--serif);
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h1 em {
  color: var(--amber);
}

.lede {
  max-width: 460px;
  margin-top: 24px;
  font-size: clamp(17px, 1.6vw, 20px);
  text-wrap: pretty;
}

/* ---------- Sign-up ---------- */
.signup {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
  max-width: 460px;
  margin-top: 34px;
  padding: 6px;
  border: 1px solid rgb(246 242 233 / 0.22);
  border-radius: 999px;
  background: rgb(246 242 233 / 0.04);
  transition:
    border-color 150ms,
    box-shadow 150ms;
}

.signup:focus-within {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgb(245 165 36 / 0.16);
}

.signup.bad {
  border-radius: 28px;
  border-color: var(--red);
}

.signup input[type="email"] {
  flex: 1;
  min-width: 0;
  height: 50px;
  padding: 0 8px 0 20px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: 400 17px var(--sans);
}

.signup input[type="email"]::placeholder {
  color: var(--muted);
}

.signup button {
  height: 50px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  background: var(--amber);
  color: var(--on-amber);
  font-weight: 600;
  font-size: 16px;
  white-space: nowrap;
  transition:
    background-color 150ms,
    transform 150ms;
}

.signup button:hover {
  background: var(--amber-soft);
}

.signup button:active {
  transform: scale(0.97);
}

.signup button[disabled] {
  opacity: 0.65;
  cursor: progress;
}

/* Hidden field that only automated form-fillers complete. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.form-msg {
  flex-basis: 100%;
  padding: 8px 20px 6px;
  color: var(--red);
  font-size: 14px;
}

.form-msg:empty {
  display: none;
}

.signup.done {
  justify-content: center;
  padding: 16px 24px;
  border-color: rgb(255 201 101 / 0.55);
  background: rgb(245 165 36 / 0.1);
}

.signup.done > :not(.form-msg) {
  display: none;
}

.signup.done .form-msg {
  padding: 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 500;
  text-align: center;
}

/* ---------- The waffle ---------- */
.waffle {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px;
  border-radius: 36px;
  background: linear-gradient(160deg, #ffb944, var(--amber) 45%, #e8961a);
  box-shadow:
    inset 0 2px 0 rgb(255 255 255 / 0.35),
    0 40px 90px rgb(245 165 36 / 0.22),
    0 12px 30px rgb(0 0 0 / 0.5);
}

.tile {
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: none;
  perspective: 700px;
  -webkit-tap-highlight-color: transparent;
}

.tile.wide {
  grid-column: span 2;
  aspect-ratio: auto;
}

/* The two faces: a waffle pocket on the front, a note on the back. */
.tile::before,
.note {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  backface-visibility: hidden;
  transition:
    transform 520ms cubic-bezier(0.3, 1.3, 0.5, 1),
    box-shadow 200ms;
}

.tile::before {
  content: "";
  background: var(--pocket);
  box-shadow:
    inset 0 5px 10px rgb(90 50 0 / 0.45),
    inset 0 -2px 0 rgb(255 220 150 / 0.35);
}

.tile:hover::before {
  box-shadow:
    inset 0 9px 16px rgb(90 50 0 / 0.6),
    inset 0 -2px 0 rgb(255 220 150 / 0.35);
}

.note {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 13px 14px 14px;
  background: var(--paper);
  box-shadow: 0 6px 16px rgb(90 50 0 / 0.35);
  color: var(--paper-ink);
  text-align: left;
  transform: rotateY(180deg);
}

.tile.on::before {
  transform: rotateY(-180deg);
}

.tile.on .note {
  transform: rotateY(0);
}

.tile.on:hover .note {
  box-shadow: 0 10px 22px rgb(90 50 0 / 0.45);
}

/* The label is a small coloured tag: what kind of note this is. */
.note small {
  align-self: flex-start;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f3e6c4;
  color: var(--paper-label);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.decided .note small {
  background: #d9f2e3;
  color: #17694a;
}

.todo .note small {
  background: #dfe7ff;
  color: #2f45c5;
}

.asked .note small {
  background: #ffe1e8;
  color: #b3264a;
}

.note b {
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.2;
  text-wrap: balance;
}

.note .title {
  font: 400 30px/1 var(--serif);
}

/* To-dos get a box; tapping a turned to-do ticks it off. */
.todo .note b {
  position: relative;
  padding-left: 22px;
}

.todo .note b::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 0;
  width: 15px;
  height: 15px;
  border: 1.5px solid #b9ab8d;
  border-radius: 4px;
}

.todo.ticked .note b {
  color: #8f8672;
  text-decoration: line-through;
}

.todo.ticked .note b::before {
  border-color: #1f8a5b;
  background: #1f8a5b
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 12px no-repeat;
}

/* ---------- The meeting under the waffle ---------- */
.call {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  margin-top: 18px;
}

.play {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 18px 0 14px;
  border: 1px solid rgb(246 242 233 / 0.22);
  border-radius: 999px;
  background: rgb(246 242 233 / 0.06);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  transition:
    background-color 150ms,
    border-color 150ms;
}

.play:hover {
  border-color: var(--amber);
  background: rgb(245 165 36 / 0.14);
}

/* Four level bars. Still until the meeting is playing. */
.bars {
  display: inline-flex;
  align-items: center;
  gap: 2.5px;
  height: 16px;
}

.bars i {
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: var(--amber);
  transform: scaleY(0.35);
}

.bars i:nth-child(2),
.bars i:nth-child(3) {
  transform: scaleY(0.7);
}

.playing .bars i {
  animation: level 700ms ease-in-out infinite alternate;
}

.playing .bars i:nth-child(2) {
  animation-delay: -300ms;
  animation-duration: 520ms;
}

.playing .bars i:nth-child(3) {
  animation-delay: -550ms;
  animation-duration: 860ms;
}

.playing .bars i:nth-child(4) {
  animation-delay: -150ms;
  animation-duration: 610ms;
}

@keyframes level {
  from {
    transform: scaleY(0.2);
  }
  to {
    transform: scaleY(1);
  }
}

.caption {
  color: var(--body);
  font-size: 15px;
  line-height: 1.35;
}

.caption b {
  color: var(--ink);
  font-weight: 600;
}

.caption.fresh {
  animation: said 320ms ease-out;
}

@keyframes said {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
}

.foot {
  padding: 16px 32px 22px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

/* ---------- Narrower screens: one column, email first ---------- */
@media (max-width: 940px) {
  body {
    background:
      radial-gradient(ellipse 90% 34% at 50% 78%, rgb(245 165 36 / 0.16), transparent 70%),
      var(--bg);
  }

  .page {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 56px;
    padding-top: 32px;
    text-align: center;
  }

  h1,
  .lede,
  .signup {
    margin-right: auto;
    margin-left: auto;
  }

  .demo {
    width: 100%;
    max-width: 460px;
  }

  .call {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .top {
    padding: 16px;
  }

  .soon {
    gap: 13px;
    margin-bottom: 22px;
    font-size: 13.5px;
  }

  .page {
    gap: 44px;
    padding: 20px 16px 36px;
  }

  .signup {
    padding: 8px;
    border-radius: 26px;
  }

  .signup input[type="email"] {
    flex-basis: 100%;
    padding: 0 14px;
    text-align: center;
  }

  .signup button {
    flex: 1;
  }

  .form-msg {
    text-align: center;
  }

  .waffle {
    gap: 9px;
    padding: 12px;
    border-radius: 28px;
  }

  .tile {
    border-radius: 15px;
  }

  .note {
    padding: 9px 9px 10px;
  }

  .note small {
    padding: 2px 7px;
    font-size: 10.5px;
  }

  .note b {
    font-size: 13px;
  }

  .note .title {
    font-size: 25px;
  }

  .todo .note b {
    padding-left: 18px;
  }

  .todo .note b::before {
    width: 13px;
    height: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tile::before,
  .note {
    transition-duration: 1ms;
  }

  .playing .bars i,
  .caption.fresh,
  .soon-tag i::after {
    animation: none;
  }
}
