/* support.mannbadal.com: system type, quiet surfaces, springs that settle without bouncing (unless a gesture earned it),
   and the reduced-motion, reduced-transparency and higher-contrast settings honoured throughout. */

:root {
  color-scheme: light dark;
  --bg: #fbfbfd;
  --surface: #ffffff;
  --surface-2: #f2f2f7;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --hairline: rgba(0, 0, 0, 0.1);
  --accent: #0071e3;
  --accent-press: #0062c4;
  --accent-text: #ffffff;
  --focus: rgba(0, 113, 227, 0.4);
  --danger: #d70015;
  --success: #248a3d;
  --glass: rgba(251, 251, 253, 0.72);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 10px 32px rgba(0, 0, 0, 0.07);
  --radius-l: 22px;
  --radius-m: 14px;
  --radius-s: 10px;
  /* A critically damped spring (response 0.4 s), and one with a little give (damping 0.8) for arrivals. */
  --spring: linear(0, 0.06, 0.186, 0.329, 0.466, 0.584, 0.682, 0.76, 0.821, 0.868, 0.903, 0.929, 0.949, 0.963, 0.973,
    0.981, 0.986, 0.99, 0.993, 0.995, 0.997, 0.998, 0.998, 0.999, 1);
  --spring-give: linear(0, 0.049, 0.163, 0.304, 0.448, 0.581, 0.695, 0.788, 0.861, 0.916, 0.955, 0.982, 0.999, 1.008,
    1.013, 1.015, 1.015, 1.013, 1.011, 1.009, 1.007, 1.005, 1.004, 1.002, 1.001, 1.001, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  interpolate-size: allow-keywords;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-2: #2c2c2e;
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --hairline: rgba(255, 255, 255, 0.14);
    --accent: #2997ff;
    --accent-press: #147ce5;
    --accent-text: #ffffff;
    --focus: rgba(41, 151, 255, 0.5);
    --danger: #ff453a;
    --success: #30d158;
    --glass: rgba(22, 22, 23, 0.72);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 10px 32px rgba(0, 0, 0, 0.45);
  }
}

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

/* Hidden means hidden, whatever display a rule gives the element. */
[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.47 var(--font);
  letter-spacing: -0.01em;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration: underline;
}

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

.skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  z-index: 10;
  transition: top 0.3s var(--spring);
}

.skip:focus {
  top: 0.75rem;
}

/* The header: a translucent layer the page scrolls under, with a hairline only once something is beneath it. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 1px 0 transparent;
  transition: box-shadow 0.3s ease;
}

.scrolled .site-header {
  box-shadow: 0 1px 0 var(--hairline);
}

.bar {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 max(1.25rem, env(safe-area-inset-left));
  height: 3.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  color: var(--text);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
}

.brand:hover {
  text-decoration: none;
}

.site-header nav {
  display: flex;
  gap: 0.25rem;
}

.site-header nav a {
  color: var(--text-2);
  font-size: 0.875rem;
  letter-spacing: -0.005em;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

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

.site-header nav a[aria-current="page"] {
  color: var(--text);
  background: var(--surface-2);
}

main {
  flex: 1;
  width: 100%;
  max-width: 45rem;
  margin: 0 auto;
  padding: 0 max(1.25rem, env(safe-area-inset-left)) 4rem;
}

/* Type: tight and heavy when large, open and even when small. */
h1,
h2,
h3 {
  font-family: var(--font-display);
  margin: 0;
}

h1 {
  font-size: clamp(2.5rem, 7vw, 3.5rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.028em;
}

h2 {
  font-size: clamp(1.5rem, 4vw, 1.875rem);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.022em;
}

h3 {
  font-size: 1.1875rem;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.017em;
}

p {
  margin: 0;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin-bottom: 0.6rem;
}

.lede {
  color: var(--text-2);
  font-size: clamp(1.1875rem, 3vw, 1.3125rem);
  line-height: 1.4;
  letter-spacing: -0.016em;
  margin-top: 1rem;
  max-width: 34rem;
}

.hero {
  padding: clamp(3rem, 10vw, 5.5rem) 0 clamp(2rem, 6vw, 3rem);
}

.hero .actions {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

section + section {
  margin-top: clamp(2.5rem, 7vw, 4rem);
}

section > h2 {
  margin-bottom: 1.1rem;
}

/* Buttons: they answer the press itself, not its release. */
.button {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.6rem 1.35rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font: 500 1.0625rem/1 var(--font);
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 0.35s var(--spring), background-color 0.2s ease, opacity 0.2s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.button:hover {
  text-decoration: none;
  background: var(--accent-press);
}

.button:active {
  transform: scale(0.97);
  transition-duration: 0.1s;
}

.button[disabled] {
  cursor: default;
  opacity: 0.6;
}

.button.quiet {
  background: var(--surface-2);
  color: var(--text);
}

.link-button {
  -webkit-appearance: none;
  appearance: none;
  background: none;
  border: 0;
  padding: 0.25rem 0;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
}

/* Quick answers: rows that open in place. */
.faq {
  background: var(--surface);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.faq details + details {
  border-top: 1px solid var(--hairline);
}

.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 1.05rem 3rem 1.05rem 1.25rem;
  position: relative;
  font-weight: 500;
  letter-spacing: -0.014em;
  -webkit-tap-highlight-color: transparent;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  position: absolute;
  right: 1.35rem;
  top: 50%;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--text-2);
  border-bottom: 2px solid var(--text-2);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.4s var(--spring);
}

.faq details[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
}

.faq summary:active {
  background: var(--surface-2);
}

.faq details::details-content {
  block-size: 0;
  overflow: hidden;
  transition: block-size 0.45s var(--spring), content-visibility 0.45s allow-discrete;
}

.faq details[open]::details-content {
  block-size: auto;
}

.faq .answer {
  padding: 0 1.25rem 1.2rem;
  color: var(--text-2);
}

.faq .answer p + p {
  margin-top: 0.6rem;
}

/* The apps. */
.apps {
  display: grid;
  gap: 1rem;
}

.app {
  display: flex;
  gap: 1.1rem;
  align-items: center;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow);
}

.app img {
  width: 4rem;
  height: 4rem;
  border-radius: 22.5%;
  flex: none;
  box-shadow: 0 0 0 1px var(--hairline);
}

.app p {
  color: var(--text-2);
  font-size: 0.9375rem;
  margin-top: 0.15rem;
}

/* The form. */
.card {
  background: var(--surface);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow);
  padding: clamp(1.25rem, 4vw, 2rem);
}

.card > h2 {
  margin-bottom: 0.4rem;
}

.card > .note {
  color: var(--text-2);
  margin-bottom: 1.5rem;
}

.contact-stage {
  display: grid;
}

.contact-stage > * {
  grid-area: 1 / 1;
}

form {
  display: grid;
  gap: 1.1rem;
  transition: opacity 0.3s ease, transform 0.45s var(--spring), filter 0.3s ease;
}

form.leaving {
  opacity: 0;
  transform: scale(0.97);
  filter: blur(4px);
  pointer-events: none;
}

.row {
  display: grid;
  gap: 1.1rem;
}

@media (min-width: 40rem) {
  .row.two {
    grid-template-columns: 1fr 1fr;
  }
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field label {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.field label .optional {
  color: var(--text-2);
  font-weight: 400;
}

input,
select,
textarea {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  font: 400 1.0625rem/1.4 var(--font);
  letter-spacing: -0.01em;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: var(--radius-m);
  padding: 0.75rem 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

select {
  padding-right: 2.5rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%),
    linear-gradient(135deg, var(--text-2) 50%, transparent 50%);
  background-position: calc(100% - 1.25rem) 55%, calc(100% - 0.9rem) 55%;
  background-size: 0.35rem 0.35rem;
  background-repeat: no-repeat;
}

textarea {
  min-height: 9.5rem;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--focus);
  background: var(--surface);
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--danger);
}

/* Until an app is chosen, the list reads as a prompt. */
select:has(option[value=""]:checked) {
  color: var(--text-2);
}

select option {
  color: var(--text);
}

.hint {
  color: var(--text-2);
  font-size: 0.8125rem;
}

.error {
  color: var(--danger);
  font-size: 0.875rem;
  min-height: 0;
}

.error:empty {
  display: none;
}

.form-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.form-foot .hint {
  max-width: 22rem;
}

.status {
  color: var(--danger);
  font-size: 0.9375rem;
}

.status:empty {
  display: none;
}

.spinner {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.8s linear infinite;
  display: none;
}

.sending .spinner {
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Someone wrote to us and it went: the answer arrives with a little give, the tick drawing itself. */
.sent {
  text-align: center;
  padding: 1.5rem 0 0.5rem;
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.35s ease, transform 0.7s var(--spring-give);
}

.sent.arrived {
  opacity: 1;
  transform: none;
}

.sent:focus {
  outline: none;
}

.sent h3 {
  margin-top: 1rem;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.sent p {
  color: var(--text-2);
  margin-top: 0.4rem;
}

.sent .link-button {
  margin-top: 1rem;
}

.check {
  width: 3.5rem;
  height: 3.5rem;
  color: var(--success);
}

.check circle,
.check path {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.check circle {
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  transition: stroke-dashoffset 0.6s var(--spring) 0.05s;
}

.check path {
  stroke-dasharray: 36;
  stroke-dashoffset: 36;
  transition: stroke-dashoffset 0.45s var(--spring) 0.4s;
}

.arrived .check circle,
.arrived .check path {
  stroke-dashoffset: 0;
}

.honey {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Long-form pages (the privacy policy). */
.prose h2 {
  margin: 2.5rem 0 0.75rem;
}

.prose p,
.prose li {
  color: var(--text);
}

.prose p + p {
  margin-top: 0.9rem;
}

.prose ul {
  margin: 0.75rem 0 0;
  padding-left: 1.2rem;
}

.prose li + li {
  margin-top: 0.5rem;
}

.updated {
  color: var(--text-2);
  font-size: 0.9375rem;
  margin-top: 0.75rem;
}

.callout {
  margin-top: 2rem;
  padding: 1.25rem 1.4rem;
  border-radius: var(--radius-l);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.callout strong {
  display: block;
  font-size: 1.1875rem;
  letter-spacing: -0.017em;
  margin-bottom: 0.3rem;
}

.callout p {
  color: var(--text-2);
}

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 1.5rem max(1.25rem, env(safe-area-inset-left)) calc(1.5rem + env(safe-area-inset-bottom));
  text-align: center;
  color: var(--text-2);
  font-size: 0.8125rem;
  letter-spacing: 0;
}

.site-footer p + p {
  margin-top: 0.3rem;
}

.center {
  text-align: center;
}

/* Settings the reader has chosen. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.2s !important;
    transition-timing-function: ease !important;
  }

  .button:active,
  form.leaving,
  .sent {
    transform: none !important;
    filter: none !important;
  }

  .faq details::details-content,
  .contact-stage {
    transition: none !important;
  }

  .spinner {
    animation-duration: 2.4s;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: var(--bg);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (prefers-contrast: more) {
  :root {
    --text-2: var(--text);
    --hairline: currentColor;
  }

  .faq,
  .card,
  .app,
  .callout {
    box-shadow: none;
    border: 1px solid var(--text);
  }

  input,
  select,
  textarea {
    border-color: var(--text);
  }

  .site-header {
    background: var(--bg);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: 0 1px 0 var(--text);
  }
}

.center .lede {
  margin-left: auto;
  margin-right: auto;
}

.center .actions {
  justify-content: center;
}
