/* ompelut.com: one stylesheet for all pages. Colors and font follow the app (app/src/styles.scss). */

@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('/fonts/figtree.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('/fonts/figtree-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;
  --bg: #fbf8f3;
  --surface: #ffffff;
  --surface-2: #f2ede4;
  --text: #1a1f27;
  --text-muted: #5c6574;
  --border: #e3dccf;
  --accent: #c95c0c;
  --accent-hover: #a84b08;
  --accent-contrast: #ffffff;
  /* The example quilt's fabrics. */
  --cream: #efe6d6;
  --navy: #3e5a7e;
  --coral: #e07a5f;
  --shadow: 0 1px 2px rgb(26 31 39 / 0.06), 0 12px 32px rgb(26 31 39 / 0.1);
  --radius: 12px;
  --gutter: 16px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #14171c;
    --surface: #1c2027;
    --surface-2: #232831;
    --text: #e8eaee;
    --text-muted: #9aa3b2;
    --border: #2e3440;
    --accent: #f5913e;
    --accent-hover: #f8a965;
    --accent-contrast: #1a1f27;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 32px rgb(0 0 0 / 0.35);
  }
}

/* Chosen with the theme button (theme.js); same tokens as the system dark mode above. */
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #14171c;
  --surface: #1c2027;
  --surface-2: #232831;
  --text: #e8eaee;
  --text-muted: #9aa3b2;
  --border: #2e3440;
  --accent: #f5913e;
  --accent-hover: #f8a965;
  --accent-contrast: #1a1f27;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 32px rgb(0 0 0 / 0.35);
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-hover);
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(32px, 6vw, 52px);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(24px, 4vw, 32px);
}

h3 {
  font-size: 20px;
}

p {
  margin: 0;
  text-wrap: pretty;
}

.wrap {
  width: min(1120px, 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.muted {
  color: var(--text-muted);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 64px;
}

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

.brand:hover {
  color: var(--text);
}

.brand img {
  width: 28px;
  height: 28px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
  font-size: 14px;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--text);
}

/* Light/dark: shows the moon in light mode, the sun in dark mode. */
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
}

.theme-toggle:hover {
  color: var(--text);
  background: var(--surface-2);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.theme-toggle .sun,
:root[data-theme='dark'] .theme-toggle .moon {
  display: none;
}

:root[data-theme='dark'] .theme-toggle .sun {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-toggle .moon {
    display: none;
  }

  :root:not([data-theme='light']) .theme-toggle .sun {
    display: block;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.btn:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-contrast);
}

.btn-primary:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
  color: var(--accent-contrast);
}

.btn-small {
  min-height: 36px;
  padding: 0 16px;
  font-size: 14px;
}

/* Hero */

.hero {
  padding: 72px 0 0;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 4px 14px;
  border: 1px dashed var(--accent);
  border-radius: 999px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
}

.hero h1 {
  max-width: 16em;
  margin-inline: auto;
}

.hero .lead {
  max-width: 36em;
  margin: 20px auto 0;
  color: var(--text-muted);
  font-size: 20px;
}

.techniques {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 12px;
  margin-top: 16px;
  color: var(--accent);
  font-size: 16px;
  font-weight: 600;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

/* Screenshots come in a light and a dark version; the one matching the theme shows. Both are
   lazy, so only the visible one is downloaded (the hero light one loads first in any case). */
.img-dark {
  display: none;
}

:root[data-theme='dark'] .img-light {
  display: none;
}

:root[data-theme='dark'] .img-dark {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .img-light {
    display: none;
  }

  :root:not([data-theme='light']) .img-dark {
    display: block;
  }
}

/* A screenshot in a plain app window. */
.window {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.window::before {
  content: '';
  display: block;
  height: 28px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(circle, var(--coral) 5px, transparent 5.5px) 14px 50% / 12px 12px no-repeat,
    radial-gradient(circle, var(--cream) 5px, transparent 5.5px) 32px 50% / 12px 12px no-repeat,
    radial-gradient(circle, var(--navy) 5px, transparent 5.5px) 50px 50% / 12px 12px no-repeat,
    var(--surface-2);
}

.hero .window {
  margin-top: 56px;
}

/* Features */

.features {
  display: grid;
  gap: 96px;
  padding: 120px 0 40px;
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: 56px;
}

.feature:nth-child(even) {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}

.feature:nth-child(even) .feature-text {
  order: 2;
}

.feature-text {
  display: grid;
  gap: 16px;
}

.feature-text .step {
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
}

.feature-text ul {
  display: grid;
  gap: 8px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.feature-text li {
  position: relative;
  padding-left: 24px;
  color: var(--text-muted);
}

/* A short stitch before each point. */
.feature-text li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.8em;
  width: 12px;
  border-top: 2px dashed var(--accent);
}

/* And there is more */

.more {
  display: grid;
  gap: 32px;
  padding-top: 96px;
}

/* Your work stays with you */

.keep {
  margin-top: 96px;
  padding: 96px 0;
  background: var(--surface-2);
}

.keep header {
  display: grid;
  gap: 12px;
  max-width: 40em;
  margin-bottom: 48px;
}

.keep header p {
  color: var(--text-muted);
  font-size: 20px;
}

/* A computer window with a phone in front of it. */
.devices {
  position: relative;
  max-width: 960px;
  margin: 0 auto 72px;
  padding-right: 10%;
}

.phone {
  position: absolute;
  right: 0;
  bottom: -32px;
  width: 24%;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-2);
  box-shadow: var(--shadow);
}

.phone img {
  border-radius: 11px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.card {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.card svg {
  width: 28px;
  height: 28px;
  margin-bottom: 8px;
  color: var(--accent);
}

.card p {
  color: var(--text-muted);
  font-size: 14px;
}

/* Beta */

.beta {
  padding: 120px 0;
}

.beta-card {
  display: grid;
  justify-items: center;
  gap: 16px;
  max-width: 720px;
  margin-inline: auto;
  padding: 48px 32px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.beta-card p {
  max-width: 32em;
  color: var(--text-muted);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 48px;
  color: var(--text-muted);
  font-size: 14px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-left: auto;
}

.site-footer a {
  color: var(--text-muted);
}

.site-footer a:hover {
  color: var(--text);
}

/* Legal pages */

.legal {
  max-width: 760px;
  padding: 64px 0 96px;
}

.legal h1 {
  font-size: clamp(28px, 5vw, 40px);
  margin-bottom: 32px;
}

.legal h2 {
  margin: 40px 0 12px;
  font-size: 20px;
}

.legal h3 {
  margin: 24px 0 8px;
  font-size: 16px;
}

.legal p,
.legal ul {
  margin: 0 0 12px;
}

.legal ul {
  padding-left: 20px;
}

.legal address {
  font-style: normal;
}

/* Phones and small tablets */

@media (max-width: 860px) {
  .feature,
  .feature:nth-child(even) {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .feature:nth-child(even) .feature-text {
    order: 0;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .site-nav .hide-small {
    display: none;
  }

  .hero {
    padding-top: 48px;
  }

  .hero .lead,
  .keep header p {
    font-size: 16px;
  }

  .hero .window {
    margin-top: 40px;
  }

  .features {
    gap: 72px;
    padding-top: 80px;
  }

  .keep,
  .beta {
    padding: 72px 0;
  }

  .more {
    padding-top: 72px;
  }

  .cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .phone {
    width: 30%;
    padding: 4px;
    border-radius: 10px;
  }

  .phone img {
    border-radius: 7px;
  }

  .site-footer nav {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }
}
