/* Static Transcribe Offline site styles */

* {
  box-sizing: border-box;
}

:root {
  --bg: #f5f7f8;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-solid: #ffffff;
  --border: rgba(17, 28, 39, 0.12);
  --border-soft: rgba(17, 28, 39, 0.08);
  --text: #111c27;
  --muted: #495b6d;
  --muted-2: #718294;
  --accent: #0a6f78;
  --accent-dark: #084756;
  --accent-soft: #dff7f4;
  --shadow: 0 24px 60px -42px rgba(17, 28, 39, 0.36);
  --shadow-soft: 0 14px 34px -30px rgba(17, 28, 39, 0.28);
  --radius: 18px;
  --shell: min(1160px, calc(100% - 2.4rem));
}

html,
body {
  min-height: 100%;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.58;
  background:
    radial-gradient(760px 420px at 80% 8%, rgba(10, 111, 120, 0.13), transparent 62%),
    radial-gradient(680px 420px at 6% 40%, rgba(233, 180, 95, 0.12), transparent 64%),
    linear-gradient(180deg, #ffffff 0%, #eef3f4 56%, var(--bg) 100%);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(17, 28, 39, 0.018), rgba(17, 28, 39, 0.018) 1px, transparent 1px, transparent 24px),
    repeating-linear-gradient(90deg, rgba(17, 28, 39, 0.014), rgba(17, 28, 39, 0.014) 1px, transparent 1px, transparent 28px);
  opacity: 0.55;
}

.shell {
  width: var(--shell);
  margin: 0 auto;
}

a {
  color: var(--accent-dark);
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(10, 111, 120, 0.24);
  text-underline-offset: 0.16em;
}

a:hover,
a:focus-visible {
  text-decoration-color: rgba(10, 111, 120, 0.55);
}

code {
  padding: 0.08rem 0.26rem;
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.92em;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(17, 28, 39, 0.08);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(160%) blur(12px);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  color: inherit;
  font-size: 1.03rem;
  font-weight: 850;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.github-link {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: var(--muted);
  text-decoration: none;
}

.github-link:hover,
.github-link:focus-visible {
  color: var(--text);
}

.github-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.hero {
  padding: clamp(3rem, 7vw, 5.4rem) 0 clamp(2.6rem, 5vw, 4.2rem);
}

.hero-copy {
  max-width: 920px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 20ch;
  margin-bottom: clamp(1.35rem, 3vw, 2.2rem);
  font-size: clamp(2.45rem, 4.8vw, 4.55rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.lead {
  max-width: 82ch;
  margin-bottom: clamp(1.6rem, 4vw, 2.8rem);
  color: var(--muted);
  font-size: clamp(1rem, 1.25vw, 1.12rem);
}

.screenshot {
  width: 100%;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(17, 28, 39, 0.13);
  border-radius: var(--radius);
  background: var(--surface-solid);
  box-shadow: var(--shadow);
}

.screenshot img {
  display: block;
  width: 100%;
  height: auto;
}

.section {
  padding: clamp(2rem, 5vw, 3.8rem) 0;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 1.2rem;
}

.section-heading h2,
.download-box h2 {
  margin-bottom: 0;
  font-size: clamp(1.75rem, 3.2vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.card,
.download-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.card {
  min-height: 190px;
  padding: 1.05rem;
}

.card h3 {
  margin-bottom: 0.45rem;
  font-size: 1.04rem;
  line-height: 1.22;
}

.card p,
.download-box p,
.overlay p,
.overlay li,
.footer small {
  color: var(--muted);
}

.card p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.downloads {
  padding-top: clamp(1rem, 3vw, 2.2rem);
}

.download-box {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 1.2rem;
  align-items: start;
  padding: clamp(1.1rem, 3vw, 1.6rem);
  background:
    radial-gradient(520px 220px at 100% 0%, rgba(10, 111, 120, 0.13), transparent 62%),
    var(--surface);
}

.download-box p {
  max-width: 58ch;
  margin: 0.86rem 0 0;
}

.inline-notice p {
  max-width: 66ch;
  font-size: 0.9rem;
}

.download-actions {
  display: grid;
  gap: 0.72rem;
}

.download-link {
  display: grid;
  gap: 0.14rem;
  padding: 0.88rem 0.96rem;
  border: 1px solid rgba(17, 28, 39, 0.12);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.72);
  color: inherit;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.download-link:hover,
.download-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(10, 111, 120, 0.25);
  box-shadow: var(--shadow-soft);
}

.download-link strong {
  font-size: 0.98rem;
}

.download-link span {
  overflow-wrap: anywhere;
  color: var(--muted-2);
  font-size: 0.9rem;
}

.download-link--muted {
  background: rgba(255, 255, 255, 0.52);
}

.inline-link {
  font-weight: 850;
}

.overlay-host {
  position: relative;
}

.overlay {
  position: absolute;
  right: 0;
  z-index: 30;
  width: min(620px, calc(100vw - 2rem));
  max-height: min(70vh, 660px);
  overflow: auto;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(17, 28, 39, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 30px 76px -34px rgba(17, 28, 39, 0.42);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.overlay--down {
  top: calc(100% + 0.68rem);
}

.overlay--up {
  bottom: calc(100% + 0.68rem);
}

.is-open > .overlay {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.overlay p {
  margin-bottom: 0.75rem;
}

.overlay p:last-child {
  margin-bottom: 0;
}

.overlay h3 {
  margin: 1rem 0 0.4rem;
  font-size: 1rem;
}

.overlay ul {
  margin: 0 0 0.75rem;
  padding-left: 1.15rem;
}

.overlay li + li {
  margin-top: 0.34rem;
}

.footer {
  border-top: 1px solid rgba(17, 28, 39, 0.08);
  background: rgba(255, 255, 255, 0.64);
}

.footer-inner {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.footer small a,
.footer-link {
  color: var(--muted);
  font-weight: 760;
}

.footer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.62rem;
}

.footer-link {
  font-size: 0.9rem;
  text-decoration: none;
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--text);
}

@media (max-width: 980px) {
  .feature-grid,
  .download-box {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  :root {
    --shell: min(100% - 1.2rem, 1160px);
  }

  .header-inner {
    min-height: 64px;
  }

  .hero {
    padding-top: 2.2rem;
  }

  h1 {
    max-width: 12.8ch;
    font-size: clamp(2.2rem, 10vw, 3.2rem);
  }

  .feature-grid,
  .download-box {
    grid-template-columns: 1fr;
  }

  .card {
    min-height: auto;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .overlay {
    left: 0;
    right: auto;
    width: calc(100vw - 1.2rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
