/* The landing page of GitHub Pages (site/index.html and site/ja/index.html). Colors follow images/icon.svg. */

:root {
  --bg: #ffffff;
  --bg-alt: #f4f7fb;
  --fg: #1b2430;
  --muted: #566273;
  --border: #dbe3ec;
  --accent: #1e3a5f;
  --accent-fg: #ffffff;
  --link: #1f5fa8;
  --hero-bg: #1e3a5f;
  --hero-fg: #ffffff;
  --hero-muted: #c9dcf2;
  --code-bg: #f6f8fa;
  --code-fg: #24292f;
  --code-comment: #b35c00;
  --code-key: #1f5fa8;
  --code-heading: #0f5132;
  --shadow: 0 12px 32px rgba(15, 34, 58, 0.16);
  --radius: 12px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11161d;
    --bg-alt: #171e27;
    --fg: #e6edf3;
    --muted: #9aa7b6;
    --border: #2b3542;
    --accent: #ffb454;
    --accent-fg: #1b1f24;
    --link: #8fc0f4;
      --hero-bg: #142a45;
    --hero-fg: #ffffff;
    --hero-muted: #b3cbe6;
    --code-bg: #0b1016;
    --code-fg: #d6dee8;
    --code-comment: #ffb454;
    --code-key: #8fc0f4;
    --code-heading: #8ddba8;
    --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, 'Segoe UI', 'Hiragino Sans', 'Noto Sans JP', 'Noto Sans CJK JP', 'Yu Gothic UI', Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}

:lang(ja) body,
body:lang(ja) {
  line-break: strict;
  overflow-wrap: anywhere;
}

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

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

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  font-size: 0.9em;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--hero-bg);
  color: var(--hero-fg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
  min-width: 0;
}

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

.brand span {
  overflow: hidden;
  text-overflow: ellipsis;
}

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

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

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

.site-nav .lang {
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 2px 12px;
}

@media (max-width: 720px) {
  .site-nav .section-link {
    display: none;
  }
}

/* Hero */

.hero {
  background: var(--hero-bg);
  color: var(--hero-fg);
  padding: 56px 0 0;
  overflow: hidden;
}

.hero h1 {
  margin: 0 auto;
  max-width: 900px;
  text-wrap: balance;
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  line-height: 1.25;
  text-align: center;
  letter-spacing: -0.01em;
}

.hero h1 em {
  font-style: normal;
  color: #ffb454;
}

.hero .lead {
  margin: 20px auto 0;
  max-width: 720px;
  font-size: 1.1rem;
  text-align: center;
  color: var(--hero-muted);
}

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

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
}

.button-primary {
  background: #ffb454;
  color: #1b1f24;
}

.button-primary:hover {
  background: #ffc477;
}

.button-secondary {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.45);
}

.button-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
}

.hero .note {
  margin: 12px 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--hero-muted);
}

.hero-shot {
  margin: 40px auto 0;
  max-width: 1080px;
  position: relative;
  bottom: -1px;
}

.hero-shot .frame {
  border-radius: var(--radius) var(--radius) 0 0;
  border-bottom: 0;
}

/* Screenshots in a window frame */

.frame {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.frame::before {
  content: '';
  display: block;
  height: 26px;
  background:
    radial-gradient(circle at 16px 13px, #ff6159 5px, transparent 5.5px),
    radial-gradient(circle at 34px 13px, #ffbd2e 5px, transparent 5.5px),
    radial-gradient(circle at 52px 13px, #28c941 5px, transparent 5.5px),
    #e9edf2;
  border-bottom: 1px solid #dbe3ec;
}

/* Sections */

section {
  padding: 80px 0;
}

section.alt {
  background: var(--bg-alt);
}

.section-title {
  margin: 0;
  text-wrap: balance;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.3;
  text-align: center;
}

.section-lead {
  margin: 12px auto 0;
  max-width: 720px;
  text-align: center;
  color: var(--muted);
}

/* How it works */

.how {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  margin-top: 48px;
}

.code {
  margin: 0;
  padding: 20px 22px;
  background: var(--code-bg);
  color: var(--code-fg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.6;
}

.code code {
  font-size: inherit;
}

.code .c {
  color: var(--code-comment);
  font-weight: 700;
}

.code .k {
  color: var(--code-key);
}

.code .h {
  color: var(--code-heading);
  font-weight: 700;
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding-left: 48px;
  margin-bottom: 24px;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-fg);
  font-weight: 700;
  display: grid;
  place-items: center;
}

.steps h3 {
  margin: 0;
  font-size: 1.05rem;
}

.steps p {
  margin: 4px 0 0;
  color: var(--muted);
}

/* Features */

.feature {
  margin-top: 72px;
}

.feature-text {
  max-width: 760px;
  margin: 0 auto 28px;
  text-align: center;
}

.feature .frame {
  max-width: 960px;
  margin: 0 auto;
}

.feature h3 {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.4;
}

.feature p {
  margin: 8px 0 0;
  color: var(--muted);
}

.more {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 72px 0 0;
  padding: 0;
  list-style: none;
}

.more li {
  padding: 18px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.more strong {
  display: block;
}

.more span {
  display: block;
  margin-top: 4px;
  font-size: 0.92rem;
  color: var(--muted);
}

/* Get started */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 48px;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.card .cmd {
  margin: 12px 0 0;
  padding: 8px 12px;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.8rem;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.card .links {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-weight: 600;
  font-size: 0.95rem;
}

.card .links a {
  text-decoration: none;
}

.card .links a:hover {
  text-decoration: underline;
}

/* Footer */

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

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

.site-footer a {
  color: inherit;
}

/* Narrow screens */

@media (max-width: 960px) {
  .more {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .more {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  section {
    padding: 56px 0;
  }

  .how {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .feature {
    margin-top: 48px;
  }

  .feature-text {
    text-align: left;
  }

  .hero {
    padding-top: 40px;
  }

  .hero-shot {
    margin-top: 32px;
  }
}

/* Japanese headings wrap between phrases (in browsers that support it) */

:lang(ja) h1,
:lang(ja) h2,
:lang(ja) h3 {
  word-break: auto-phrase;
}
