Skip to content

πŸ“§βœ¨ Beautiful email. For everyone.

20.1 KB
Raw Blame
@import 'tailwindcss';

/* The site follows the visitor's system appearance. Tokens hold a light and a dark value, and
   `light:` styles the few places where a token isn't enough. */
@custom-variant light (@media (prefers-color-scheme: light));

@theme {
  --font-display: 'Newsreader Variable', ui-serif, Georgia, serif;
  --font-sans: 'Hanken Grotesk Variable', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono Variable', ui-monospace, 'SFMono-Regular', monospace;
  --font-app: 'Inter Variable', ui-sans-serif, system-ui, sans-serif;

  --color-night: light-dark(#fbfbfc, #09090a);
  --color-night-2: light-dark(#ffffff, #0e0e0f);
  --color-ink: light-dark(#18181b, #ededee);
  --color-ink-2: light-dark(#55565d, #a9a9ae);
  --color-ink-3: light-dark(#6f7078, #818186);
  --color-line: light-dark(rgb(20 20 30 / 0.08), rgb(255 255 255 / 0.07));
  --color-line-strong: light-dark(rgb(20 20 30 / 0.14), rgb(255 255 255 / 0.12));
  --color-lavender: light-dark(#5d57c9, #aaa6ec);
  --color-indigo: #6268ef;
  --color-iris: #484bd3;
  --color-dawn: light-dark(#a85a22, #f2b88b);
  --color-leaf: light-dark(#2e8559, #76bc9a);

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

@layer base {
  :root {
    color-scheme: light dark;
    /* The Mark's two faces, lit on dark surfaces and inked on light ones. */
    --mark-rear-1: light-dark(#b9bcf7, #eeefff);
    --mark-rear-2: light-dark(#9295ee, #c4c8ff);
    --mark-rear-3: light-dark(#6a6de0, #8d91ed);
    --mark-front-1: light-dark(#6d72f0, #ffffff);
    --mark-front-2: light-dark(#4f52dc, #f2f3ff);
    --mark-front-3: light-dark(#2f2ba8, #b9c0fb);
    background: var(--color-night);
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
  }

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

  body {
    overflow-x: clip;
    font-feature-settings: 'ss01', 'cv11';
    text-rendering: optimizeLegibility;
  }

  ::selection {
    background: color-mix(in srgb, var(--color-lavender) 32%, transparent);
    color: light-dark(var(--color-ink), #fff);
  }

  :focus-visible {
    outline: 2px solid var(--color-lavender);
    outline-offset: 3px;
    border-radius: 6px;
  }
}

@layer components {
  /* Grain keeps large gradients from banding and gives the dark surfaces some tooth. */
  .grain::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 60;
    pointer-events: none;
    opacity: 0.045;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  }
  @media (prefers-color-scheme: light) {
    .grain::after {
      opacity: 0.025;
    }
  }

  .display {
    font-family: var(--font-display);
    font-optical-sizing: auto;
    font-weight: 380;
    letter-spacing: -0.022em;
    line-height: 1.02;
    text-wrap: balance;
  }

  .eyebrow {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-lavender);
  }

  /* Buttons */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 2.75rem;
    padding: 0 1.15rem;
    border-radius: 0.7rem;
    font-weight: 560;
    font-size: 0.95rem;
    white-space: nowrap;
    transition:
      transform 0.2s var(--ease-out-expo),
      background-color 0.2s,
      border-color 0.2s,
      box-shadow 0.3s;
  }
  .btn:active {
    transform: translateY(1px) scale(0.99);
  }
  .btn-primary {
    color: light-dark(#ffffff, #111112);
    background: linear-gradient(180deg, light-dark(#2c2c33, #ffffff), light-dark(#16161a, #e6e6e8));
    box-shadow:
      0 0 0 1px light-dark(rgb(255 255 255 / 0.1), rgb(255 255 255 / 0.4)) inset,
      0 10px 30px -10px light-dark(rgb(98 104 239 / 0.35), rgb(170 166 236 / 0.55)),
      0 1px 2px light-dark(rgb(0 0 0 / 0.2), rgb(0 0 0 / 0.4));
  }
  .btn-primary:hover {
    box-shadow:
      0 0 0 1px light-dark(rgb(255 255 255 / 0.14), rgb(255 255 255 / 0.5)) inset,
      0 14px 40px -10px light-dark(rgb(98 104 239 / 0.5), rgb(170 166 236 / 0.8)),
      0 1px 2px light-dark(rgb(0 0 0 / 0.2), rgb(0 0 0 / 0.4));
  }
  .btn-ghost {
    color: var(--color-ink);
    background: light-dark(#ffffff, rgb(255 255 255 / 0.035));
    border: 1px solid var(--color-line-strong);
  }
  .btn-ghost:hover {
    background: light-dark(#f3f3f5, rgb(255 255 255 / 0.07));
    border-color: light-dark(rgb(20 20 30 / 0.22), rgb(255 255 255 / 0.2));
  }

  /* Keycaps */
  .kbd {
    display: inline-grid;
    place-items: center;
    min-width: 1.6em;
    height: 1.6em;
    padding: 0 0.4em;
    border-radius: 0.38em;
    font-family: var(--font-app);
    font-size: 0.78em;
    font-weight: 550;
    line-height: 1;
    color: var(--color-ink);
    background: linear-gradient(
      180deg,
      light-dark(#ffffff, rgb(255 255 255 / 0.1)),
      light-dark(#f3f3f5, rgb(255 255 255 / 0.04))
    );
    box-shadow:
      0 0 0 1px light-dark(rgb(20 20 30 / 0.13), rgb(255 255 255 / 0.1)) inset,
      0 1px 0 light-dark(#ffffff, rgb(255 255 255 / 0.08)) inset,
      0 2px 0 light-dark(rgb(20 20 30 / 0.1), rgb(0 0 0 / 0.5));
  }

  .dawn-text {
    font-style: italic;
    font-weight: 360;
    background: linear-gradient(
      95deg,
      light-dark(#5b52d6, #d8d5ff) 5%,
      light-dark(#c0507f, #f0c8d6) 55%,
      light-dark(#d0762f, var(--color-dawn)) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  /* Section glow used behind feature cards. */
  .card {
    position: relative;
    overflow: hidden;
    border-radius: 1.25rem;
    background:
      radial-gradient(
        120% 80% at 50% 0%,
        light-dark(transparent, rgb(255 255 255 / 0.035)),
        transparent 60%
      ),
      linear-gradient(180deg, light-dark(#ffffff, #111112), light-dark(#fcfcfd, #0c0c0d));
    border: 1px solid var(--color-line);
    box-shadow:
      0 1px 0 light-dark(#ffffff, rgb(255 255 255 / 0.04)) inset,
      0 16px 40px -24px light-dark(rgb(22 24 36 / 0.14), transparent);
  }

  /* Reveal on scroll: elements start slightly lowered and settle when they enter the viewport. */
  .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition:
      opacity 0.9s var(--ease-out-expo),
      transform 0.9s var(--ease-out-expo);
    transition-delay: var(--delay, 0s);
  }
  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
  @media (scripting: none) {
    .reveal {
      opacity: 1;
      transform: none;
    }
  }

  /* Hero entrance */
  @keyframes rise-in {
    from {
      opacity: 0;
      transform: translateY(14px);
      filter: blur(6px);
    }
    to {
      opacity: 1;
      transform: none;
      filter: blur(0);
    }
  }
  .rise {
    animation: rise-in 1.1s var(--ease-out-expo) both;
    animation-delay: var(--delay, 0s);
  }

  @keyframes window-in {
    from {
      opacity: 0;
      transform: perspective(2200px) rotateX(22deg) translateY(80px) scale(0.96);
    }
    to {
      opacity: 1;
      transform: perspective(2200px) rotateX(0) translateY(0) scale(1);
    }
  }

  @keyframes sunrise {
    from {
      opacity: 0;
      transform: translate(-50%, 18%) scale(0.85);
    }
    to {
      opacity: 1;
      transform: translate(-50%, 0) scale(1);
    }
  }

  @keyframes twinkle {
    0%,
    100% {
      opacity: var(--o, 0.5);
    }
    50% {
      opacity: calc(var(--o, 0.5) * 0.25);
    }
  }

  @keyframes arrive {
    from {
      height: 0;
      opacity: 0;
    }
    to {
      height: 43px;
      opacity: 1;
    }
  }

  @keyframes arrive-flash {
    from {
      background-color: color-mix(in srgb, var(--accent) 16%, var(--bg));
    }
  }

  /* ──────────────────────────────────────────────────────────────────────────────
     Product illustrations. Tokens mirror packages/ui so the mockups use the app's own palette.
     ────────────────────────────────────────────────────────────────────────────── */
  .app {
    --bg: light-dark(#fcfcfd, #171718);
    --sidebar: light-dark(#f7f8fa, #111112);
    --surface: light-dark(#ffffff, #1e1e20);
    --raised: light-dark(#ffffff, #252527);
    --hover: light-dark(#eff0f2, #242426);
    --selected: light-dark(#e8e9ec, #2a2a2c);
    --accent: light-dark(#635db5, #aaa6ec);
    --accent-solid: light-dark(#6962c1, #6d67cb);
    --text: light-dark(#383a40, #dedee1);
    --text-strong: light-dark(#202127, #f2f2f3);
    --secondary: light-dark(#5d6068, #b7b7bd);
    --muted: light-dark(#70737d, #96969e);
    --faint: light-dark(#838691, #77777f);
    --border: light-dark(#17191f0b, #ffffff0b);
    --border-strong: light-dark(#17191f1d, #ffffff1a);
    --green: light-dark(#3d9066, #76bc9a);
    --star: light-dark(#b8892c, #d4b36e);
    --shadow: light-dark(rgb(22 24 36 / 0.14), rgb(0 0 0 / 0.66));
    --shadow-deep: light-dark(rgb(22 24 36 / 0.2), #000);
    font-family: var(--font-app);
    font-feature-settings: normal;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
  }
  /* Illustrations follow the page unless they pin a theme. */
  .app[data-theme='dark'] {
    color-scheme: dark;
  }
  .app[data-theme='light'] {
    color-scheme: light;
  }
  .app-shell {
    display: flex;
    background: var(--sidebar);
    padding: 8px 8px 8px 0;
    border-radius: 14px;
    overflow: hidden;
  }
  .app-sidebar {
    width: 212px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    padding: 0 10px;
    color: var(--secondary);
  }
  .app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
  }
  .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 32px;
    padding: 0 10px;
    border-radius: 7px;
    color: var(--secondary);
  }
  .nav-item.active {
    background: var(--selected);
    color: var(--text-strong);
  }
  .nav-item .count {
    margin-left: auto;
    font-size: 11px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
  }
  .account-mark {
    display: inline-block;
    flex-shrink: 0;
    width: var(--size, 16px);
    height: var(--size, 16px);
    border-radius: 50%;
    background:
      radial-gradient(circle at 70% 75%, var(--b) 0 22%, transparent 60%),
      radial-gradient(
        circle at 25% 25%,
        color-mix(in srgb, var(--a) 70%, white) 0 12%,
        transparent 45%
      ),
      linear-gradient(135deg, var(--a), var(--b));
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08);
  }
  .sender-tile {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 7px;
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: light-dark(
      color-mix(in srgb, var(--tint) 70%, black),
      color-mix(in srgb, var(--tint) 85%, white)
    );
    background: light-dark(
      color-mix(in srgb, var(--tint) 20%, white),
      color-mix(in srgb, var(--tint) 18%, var(--bg))
    );
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tint) 22%, transparent);
  }
  .mail-row {
    display: flex;
    align-items: center;
    gap: 14px;
    height: 42px;
    padding: 0 18px 0 16px;
    border-bottom: 1px solid var(--border);
    position: relative;
    white-space: nowrap;
  }
  .mail-row.unread {
    background: color-mix(in srgb, var(--surface) 32%, var(--bg));
  }
  .mail-row.focused {
    box-shadow: inset 2px 0 var(--accent);
    background: var(--selected);
  }
  .mail-row .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--accent);
    opacity: 0;
  }
  .mail-row.unread .dot {
    opacity: 1;
  }
  .mail-row .sender {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 150px;
    flex-shrink: 0;
    color: var(--secondary);
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mail-row .content {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--muted);
  }
  .mail-row .subject {
    color: var(--secondary);
    margin-right: 8px;
  }
  .mail-row.unread .subject,
  .mail-row.unread .sender {
    color: var(--text-strong);
    font-weight: 550;
  }
  .mail-row .meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    color: var(--muted);
  }
  .mail-row time {
    width: 58px;
    text-align: right;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
  }
  @container (max-width: 620px) {
    .mail-row .preview,
    .mail-row .meta > svg {
      display: none;
    }
    .mail-row .sender {
      width: 118px;
    }
  }
  .mail-row .star {
    color: var(--star);
    width: 14px;
  }
  .mail-row .thread-count {
    font-size: 10.5px;
    color: var(--muted);
    font-weight: 450;
    margin-left: 4px;
  }
  .app-kbd {
    display: inline-grid;
    place-items: center;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--border-strong);
  }
  .app-arrive {
    overflow: hidden;
    animation: arrive 0.8s var(--ease-out-expo) both;
    animation-delay: 2.6s;
  }
  .app-arrive > .mail-row {
    animation: arrive-flash 2.6s ease-out both;
    animation-delay: 2.6s;
  }

  /* Keyboard demo */
  .demo-frame {
    height: clamp(420px, 60vw, 480px);
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(
      180deg,
      light-dark(rgb(20 20 30 / 0.12), rgb(255 255 255 / 0.16)),
      light-dark(rgb(20 20 30 / 0.05), rgb(255 255 255 / 0.04)) 40%
    );
    box-shadow:
      0 0 0 1px light-dark(rgb(20 20 30 / 0.03), rgb(0 0 0 / 0.5)),
      0 40px 100px -40px light-dark(rgb(22 24 36 / 0.3), rgb(0 0 0 / 0.9));
  }
  .demo-frame .app {
    border-radius: 15px;
    overflow: hidden;
  }
  .demo-frame .app-main:focus-visible {
    box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 50%, transparent);
  }
  .demo-row {
    transition:
      transform 0.19s ease-in,
      opacity 0.19s ease-in;
  }
  .demo-row.is-leaving {
    transform: translateX(32px);
    opacity: 0;
  }
  .demo-row .mail-row {
    transition: background-color 0.12s;
  }
  .demo-toast {
    animation: toast-in 0.4s var(--ease-out-expo) both;
  }
  @keyframes toast-in {
    from {
      opacity: 0;
      transform: translateY(10px) scale(0.97);
    }
  }
  .demo-reader {
    animation: reader-in 0.35s var(--ease-out-expo) both;
  }
  @keyframes reader-in {
    from {
      opacity: 0;
      transform: translateY(6px);
    }
  }
  .demo-hint {
    animation: hint-pulse 2.6s ease-in-out infinite;
  }
  @keyframes hint-pulse {
    50% {
      border-color: color-mix(in srgb, var(--accent) 45%, transparent);
      box-shadow: 0 0 22px color-mix(in srgb, var(--accent) 25%, transparent);
    }
  }
  .shortcut .kbd {
    transition:
      transform 0.12s,
      box-shadow 0.25s,
      background-color 0.25s,
      color 0.25s;
  }
  .shortcut.is-pressed {
    background: color-mix(in srgb, var(--color-lavender) 9%, transparent);
    color: var(--color-ink);
  }
  .shortcut.is-pressed .kbd {
    transform: translateY(2px);
    color: light-dark(#3d379f, #fff);
    background: light-dark(rgb(93 87 201 / 0.16), rgb(170 166 236 / 0.28));
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--color-lavender) 70%, transparent) inset,
      0 0 24px color-mix(in srgb, var(--color-lavender) 45%, transparent);
  }

  .terminal-caret {
    display: inline-block;
    width: 0.55em;
    height: 1.1em;
    vertical-align: -0.2em;
    background: var(--color-ink-2);
    animation: terminal-blink 1.1s steps(1) infinite;
  }
  @keyframes terminal-blink {
    50% {
      opacity: 0;
    }
  }

  /* ──────────────────────────────────────────────────────────────────────────────
     Download page
     ────────────────────────────────────────────────────────────────────────────── */
  .step {
    animation: rise-in 0.9s var(--ease-out-expo) both;
    animation-delay: calc(var(--i, 0) * 0.07s);
  }

  /* The Applications folder, in the light blue macOS gives its folders. */
  .folder {
    position: relative;
    display: block;
    width: 62px;
    height: 48px;
    border-radius: 6px 6px 8px 8px;
    background: linear-gradient(180deg, #7cc3fb, #3f9df0);
    box-shadow:
      inset 0 1px 0 rgb(255 255 255 / 0.45),
      0 10px 24px -10px rgb(63 157 240 / 0.7);
  }
  .folder::before {
    content: '';
    position: absolute;
    left: 0;
    top: -5px;
    width: 26px;
    height: 10px;
    border-radius: 5px 5px 0 0;
    background: #5aaef5;
    z-index: -1;
  }
  .drag-ghost {
    opacity: 0;
    animation: drag 3.2s var(--ease-out-expo) 0.6s infinite;
  }
  @keyframes drag {
    0% {
      opacity: 0;
      transform: none;
    }
    12% {
      opacity: 0.85;
      transform: translate(4px, -6px) scale(0.92) rotate(-4deg);
    }
    55% {
      opacity: 0.85;
      transform: translate(146px, -2px) scale(0.6) rotate(0);
    }
    70%,
    100% {
      opacity: 0;
      transform: translate(146px, 4px) scale(0.4);
    }
  }

  .found-row {
    animation: rise-in 0.8s var(--ease-out-expo) 0.8s both;
  }

  /* A laptop holding the inbox, shown to visitors on a phone. */
  .laptop-lid {
    position: relative;
    aspect-ratio: 16 / 10.4;
    padding: 5px;
    border-radius: 12px 12px 3px 3px;
    background: linear-gradient(180deg, #2a2a2c, #161617);
    box-shadow:
      inset 0 0 0 1px rgb(255 255 255 / 0.12),
      0 30px 60px -20px light-dark(rgb(22 24 36 / 0.35), rgb(0 0 0 / 0.9));
  }
  .laptop-base {
    position: relative;
    height: 9px;
    margin: 0 -9%;
    border-radius: 2px 2px 10px 10px;
    background: linear-gradient(180deg, #3a3a3d, #1a1a1b);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.18);
  }
  .laptop-base::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    width: 18%;
    height: 4px;
    transform: translateX(-50%);
    border-radius: 0 0 5px 5px;
    background: rgb(0 0 0 / 0.35);
  }
  .laptop-glow {
    position: absolute;
    left: 50%;
    top: 45%;
    z-index: -1;
    width: 160%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    background: radial-gradient(
      closest-side,
      rgb(242 184 139 / 0.3),
      rgb(214 150 190 / 0.16) 40%,
      rgb(120 112 236 / 0.1) 62%,
      transparent
    );
    filter: blur(8px);
  }
  .laptop-row {
    animation: rise-in 0.8s var(--ease-out-expo) both;
    animation-delay: calc(0.5s + var(--i, 0) * 0.08s);
  }

  /* Bottom sheet for picking a calendar. */
  .sheet {
    width: min(100% - 1rem, 28rem);
    max-width: none;
    margin: auto auto max(0.5rem, env(safe-area-inset-bottom));
    padding: 0;
    border: 1px solid var(--color-line-strong);
    border-radius: 1.4rem;
    color: var(--color-ink);
    background: linear-gradient(180deg, light-dark(#ffffff, #171718), light-dark(#f7f7f9, #0f0f10));
    box-shadow: 0 -20px 80px -20px light-dark(rgb(22 24 36 / 0.2), rgb(0 0 0 / 0.9));
  }
  .sheet[open] {
    animation: sheet-in 0.45s var(--ease-out-expo) both;
  }
  .sheet::backdrop {
    background: light-dark(rgb(20 20 30 / 0.3), rgb(4 4 5 / 0.62));
    backdrop-filter: blur(4px);
  }
  @keyframes sheet-in {
    from {
      opacity: 0;
      transform: translateY(40px);
    }
  }
}