/* Earfic site theme. Palette is taken from the app icon: near-black ground,
   electric blue and cyan flowing through violet and magenta into gold. */

:root {
  color-scheme: dark;

  --bg: #07070d;
  --surface: #101019;
  --rule: #25253a;
  --fg: #efeef7;
  --muted: #aaa9bf;

  --cyan: #4fd2ff;
  --blue: #2b6bff;
  --violet: #7a3cff;
  --magenta: #ff4fa3;
  --gold: #ffb84f;

  --link: var(--cyan);
  --link-hover: var(--gold);
  --spectrum: linear-gradient(90deg, var(--cyan), var(--violet) 38%, var(--magenta) 72%, var(--gold));

  --radius: 1rem;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--fg);
  font: 1.0625rem/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}

/* Soft bloom behind the page, like the glow around the icon. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(44rem 30rem at 0% -8%, rgb(43 107 255 / 0.22), transparent 70%),
    radial-gradient(40rem 28rem at 100% 4%, rgb(255 79 163 / 0.12), transparent 70%),
    radial-gradient(48rem 30rem at 50% 112%, rgb(122 60 255 / 0.2), transparent 70%);
}

.page {
  max-width: 44rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

/* Header */

.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--fg);
  font-size: 1.4rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand img {
  display: block;
  width: 2.25rem;
  height: 2.25rem;
}

nav a {
  margin-left: 1.25rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

nav a:first-child {
  margin-left: 0;
}

nav a:hover,
nav a[aria-current="page"] {
  color: var(--fg);
}

nav a[aria-current="page"] {
  text-decoration: underline 2px;
  text-decoration-color: var(--magenta);
  text-underline-offset: 0.4em;
}

/* Typography */

h1 {
  margin: 0 0 0.5rem;
  font-size: 2.2rem;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

h2 {
  margin: 2.5rem 0 0.5rem;
  font-size: 1.25rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

p,
ul {
  margin: 0.75rem 0;
}

li {
  margin: 0.35rem 0;
}

a {
  color: var(--link);
  text-underline-offset: 0.15em;
  transition: color 0.15s;
}

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

a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 0.25rem;
}

.meta,
.lede {
  color: var(--muted);
}

.lede {
  font-size: 1.2rem;
}

/* Cards, tables, definition lists */

.summary {
  position: relative;
  margin: 1.5rem 0;
  padding: 0.25rem 1.25rem;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.summary::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: var(--spectrum);
}

table {
  width: 100%;
  margin: 1rem 0;
  border-collapse: collapse;
  font-size: 0.975rem;
}

th,
td {
  padding: 0.6rem 0.75rem 0.6rem 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

th {
  font-weight: 600;
  white-space: nowrap;
}

dt {
  margin-top: 1.5rem;
  font-weight: 600;
}

dd {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

/* Home page */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0 2rem;
  text-align: center;
}

.hero-icon {
  width: 13rem;
  height: 13rem;
  margin-bottom: 2rem;
  border-radius: 23%;
  box-shadow:
    0 0 3rem rgb(43 107 255 / 0.35),
    0 0 6rem rgb(255 79 163 / 0.22);
}

.hero h1 {
  font-size: 2.8rem;
  /* Plain colour first; the gradient replaces it where background-clip: text works. */
  color: var(--fg);
  background: var(--spectrum);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-bottom: 0.1em;
}

.hero .lede {
  max-width: 32rem;
}

.badge {
  display: inline-block;
  margin: 1rem 0 0;
  padding: 0.3rem 0.9rem;
  color: var(--fg);
  font-size: 0.925rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 999px;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr));
  gap: 1rem;
  margin: 1rem 0 2rem;
  padding: 0;
  list-style: none;
}

.features li {
  margin: 0;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.features strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 1.1rem;
}

.features span {
  color: var(--muted);
  font-size: 0.975rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin: 1.5rem 0 0;
}

/* Ghost button with a spectrum border. */
.button {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  color: var(--fg);
  font-weight: 600;
  text-decoration: none;
  background:
    linear-gradient(var(--bg), var(--bg)) padding-box,
    var(--spectrum) border-box;
  border: 2px solid transparent;
  border-radius: 999px;
  transition: box-shadow 0.15s;
}

.button:hover {
  color: var(--fg);
  box-shadow: 0 0 1.25rem rgb(162 75 255 / 0.45);
}

/* Footer */

.site-footer {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.925rem;
}

.site-footer a {
  color: inherit;
}

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

@media (max-width: 34rem) {
  h1 {
    font-size: 1.8rem;
  }

  .hero h1 {
    font-size: 2.1rem;
  }

  .hero-icon {
    width: 10.5rem;
    height: 10.5rem;
  }

  th {
    white-space: normal;
  }
}
