/* Brand colors from Glass Power Tools' light and dark site palette. */
:root {
  color-scheme: dark;
  --brand: #e7090a;
  --link: oklch(72% 0.17 27);
  --brand-soft: oklch(60% 0.23 29 / 0.20);
  --void: #0c0a0a;
  --surface: #151212;
  --surface-raised: #1d1919;
  --border: rgb(255 255 255 / .08);
  --border-strong: rgb(255 255 255 / .16);
  --text: oklch(96% 0.004 30);
  --text-muted: oklch(74% 0.01 30);
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --link: oklch(50% 0.2 28);
    --brand-soft: oklch(62% 0.2 29 / 0.14);
    --void: #f8f6f5;
    --surface: #fff;
    --surface-raised: #f3f0ef;
    --border: rgb(0 0 0 / .08);
    --border-strong: rgb(0 0 0 / .16);
    --text: oklch(20% 0.006 30);
    --text-muted: oklch(44% 0.01 30);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  font: clamp(1rem, 1.7vw, 1.0625rem)/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, p, dl, dd { margin: 0; }
a { color: var(--link); text-underline-offset: .2em; }
a:focus-visible { outline: 2px solid var(--link); outline-offset: 4px; }

.shell { width: min(73.75rem, calc(100% - 4rem)); margin-inline: auto; }
.skip { position: absolute; top: .5rem; left: .5rem; z-index: 2; background: var(--surface); padding: .65rem; transform: translateY(-150%); }
.skip:focus { transform: none; }

.header, .footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: 1.15rem;
}

.header { border-bottom: 1px solid var(--border); }
.header nav { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; }
.header nav a, .footer > a:last-child { color: var(--text-muted); font-size: .9375rem; }
.header nav a { text-decoration: none; }
.header nav a:hover, .footer a:hover { color: var(--text); text-decoration: underline; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.025em;
  text-decoration: none;
}

.brand img { display: block; }

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: start;
  min-height: clamp(39rem, 50vw, 52rem);
  padding-block: clamp(3.75rem, 7vw, 6.5rem) 14rem;
  overflow: hidden;
  color: #241710;
  background: #f8eee3;
}

.hero-copy {
  text-align: center;
  text-shadow: 0 1px 2px #fff8ef, 0 0 10px #fff8ef, 0 0 22px rgb(255 248 239 / .68);
}

.hero-art {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 27%;
}

h1 {
  font-size: clamp(3rem, 6vw, 5.35rem);
  letter-spacing: -.068em;
  line-height: .98;
  font-weight: 720;
  word-spacing: .035em;
  text-wrap: balance;
}

h1 span { color: #9d211d; }
.lede { max-width: 58ch; margin: 1.45rem auto 1.65rem; color: #2e2119; font-size: clamp(1.12rem, 2vw, 1.28rem); line-height: 1.5; text-wrap: pretty; }
.platform { margin-top: .75rem; color: #392920; font-size: .875rem; }
.hero a:focus-visible { outline-color: #9d211d; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .75rem 1.25rem; }
.hero-actions .button { text-shadow: none; }
.hero-newsletter { color: #411c13; font-weight: 680; }

.button {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: .5rem 1.15rem;
  border-radius: 100vw;
  border: 0;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 690;
  text-decoration: none;
}

.button:hover { box-shadow: inset 0 0 0 1px rgb(255 255 255 / .4); }

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .hero { view-timeline-name: --hero-scroll; }
    .hero-art {
      top: -4.5rem;
      height: calc(100% + 4.5rem);
      animation: hero-drift linear both;
      animation-timeline: --hero-scroll;
      animation-range: exit 0% exit 100%;
    }
  }
}

@keyframes hero-drift {
  from { transform: translateY(0); }
  to { transform: translateY(4.5rem); }
}

.rules { background: var(--surface); border-block: 1px solid var(--border); }
.section { padding-block: clamp(3rem, 7.5vw, 5.5rem); }

.section-intro h2 {
  margin-bottom: .75rem;
  font-size: clamp(2.1rem, 4.4vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -.055em;
  text-wrap: balance;
}

.section-intro p, dd { color: var(--text-muted); }
.section-intro p { max-width: 45ch; }

.activity-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
  margin-top: 1.8rem;
}

.activity-list > div {
  display: grid;
  grid-template-rows: auto auto 1fr;
  align-content: start;
  padding: 1.05rem 1.15rem 1.15rem;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: .875rem;
}

dt { font-weight: 680; }
.activity-list dd { margin-top: .25rem; line-height: 1.5; }

.activity-list .activity-preview {
  display: grid;
  place-content: center;
  align-self: end;
  position: relative;
  height: 8rem;
  min-width: 0;
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: .6rem;
  background: var(--surface);
  overflow: hidden;
}

.preview-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.activity-preview.chat-example {
  place-content: center stretch;
  gap: .45rem;
  padding: .6rem;
  font-size: .8125rem;
}

.chat-example span { justify-self: start; padding: .3rem .55rem; border-radius: .6rem; background: var(--surface-raised); color: var(--text); }
.chat-example span:first-child { justify-self: end; background: var(--brand-soft); }
.activity-preview.audio-example, .activity-preview.voice-example { place-content: center stretch; padding: .5rem; gap: .45rem; }
.audio-example img, .voice-example img { display: block; width: 100%; height: 2rem; }
.activity-preview audio { width: 100%; height: 2rem; }
.voice-example img { height: 1.35rem; }
.voice-example div { display: grid; grid-template-columns: 2rem minmax(0, 1fr); align-items: center; gap: .25rem; font-size: .75rem; }
.voice-example div:first-child img { filter: grayscale(1); opacity: .7; }
.model-example img { width: 7.625rem; height: 7.625rem; }
.activity-preview.code-example { place-content: center start; padding: .65rem; color: var(--text); }
.code-example pre { margin: 0; font: .75rem/1.55 ui-monospace, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.code-example b { color: var(--link); font-weight: 650; }

.split {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: clamp(1.5rem, 7vw, 6rem);
  align-items: start;
}

.workflow-list > div, .requirements > div { border-top: 1px solid var(--border-strong); }
.workflow-list > div { padding-block: .9rem 1rem; }
.workflow-list dt { font-size: 1.12rem; }
.workflow-list dd { margin-top: .35rem; }
.requirements > div { display: grid; grid-template-columns: minmax(4.75rem, .35fr) minmax(0, 1fr); gap: .8rem; padding-block: .65rem; }

.newsletter { border-bottom: 1px solid var(--border); }
.newsletter-form label { display: block; margin-bottom: .45rem; font-weight: 680; }
.newsletter-inputs { display: flex; flex-wrap: wrap; gap: .65rem; }
.newsletter-inputs input {
  flex: 1 1 12rem;
  min-width: 0;
  min-height: 3rem;
  border: 1px solid var(--border-strong);
  border-radius: .625rem;
  padding: .55rem .75rem;
  color: var(--text);
  background: var(--surface);
  font: inherit;
}
.newsletter-form :is(input, button):focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
.newsletter-form p { margin-top: .65rem; color: var(--text-muted); font-size: .875rem; }
.newsletter-trap { position: absolute; left: -5000px; }
.newsletter-badge { display: inline-block; margin-top: .9rem; padding: .4rem .55rem; }
.newsletter-badge img { display: block; height: auto; }

.footer { padding-block: 1.65rem; flex-wrap: wrap; }

@media (max-width: 53rem) {
  .activity-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 40rem) {
  .shell { width: calc(100% - 2rem); }
  .header { flex-wrap: wrap; gap: .6rem 1rem; }
  .header nav { gap: .45rem 1rem; }
  .split { grid-template-columns: 1fr; }
  .hero {
    align-items: start;
    min-height: 42rem;
    padding-block: 3.5rem 13rem;
  }
  .hero-art {
    height: calc(100% + 13rem);
    object-position: 56% center;
  }
  h1 { font-size: clamp(2.8rem, 11.5vw, 4.5rem); }
  h1 span { display: block; }
  .activity-list > div { padding: .8rem .85rem; }
}

@media (max-width: 29rem) {
  .activity-list { grid-template-columns: 1fr; }
}
