/* Accents come from the plugin icon (img/texas-power-512.png): its orange, and in
   dark mode its navy. --accent marks state (active dot, current card, focus) and is
   darkened in light mode to keep 3:1 against white; --accent-fill is the icon's orange,
   under navy text. */
:root {
  --bg: #f5f5f4;
  --surface: #ffffff;
  --text: #1c1917;
  --muted: #57534e;
  --border: #e7e5e4;
  --dot: #d6d3d1;
  --accent: #d9600a;
  --accent-fill: #faa01e;
  --accent-text: #101a2b;
  --band-bg: #101a2b;
  --band-border: #101a2b;
  /* The carousel's stage: a light warm stone, dimmer than white, that every frame
     color (white, black, sage, gray, wood) still stands out on. */
  --stage: #f0ede8;
  --stage-border: #dfd9ce;
  --stage-dot: #cdc6ba;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --surface: #121b2b;
    --text: #f1f5f9;
    --muted: #9aa7ba;
    --border: #23304a;
    --dot: #33415c;
    --accent: #faa01e;
    --band-bg: #17223a;
    --band-border: #2c3b5c;
    --stage: #121b2b;
    --stage-border: #23304a;
    --stage-dot: #33415c;
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

main,
.site-header,
.site-footer {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Header */

.site-header {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-top: 48px;
  padding-bottom: 32px;
}

.brand-icon {
  flex: none;
  width: 112px;
  height: 112px;
  filter: drop-shadow(0 2px 6px rgb(16 26 43 / 0.25));
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.15;
  text-wrap: balance;
}

.lede {
  max-width: 60ch;
  margin: 0;
  color: var(--muted);
  font-size: 1.0625rem;
}

/* Install links: the plugin's TRMNL recipe page (install_url in showcase.yml) */

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--accent-fill);
  color: var(--accent-text);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgb(16 26 43 / 0.25);
  transition: transform 150ms ease, filter 150ms ease;
}

.button:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.button--large {
  padding: 14px 26px;
  font-size: 1.125rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 20px;
}

/* Carousel */

.carousel {
  --border: var(--stage-border);
  --dot: var(--stage-dot);
  padding: 24px;
  background: var(--stage);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.carousel-stage {
  display: flex;
  align-items: center;
  gap: 12px;
}

.carousel-viewport {
  flex: 1;
  min-width: 0;
  aspect-ratio: 3 / 2;
  max-height: 70vh;
  overflow: hidden;
  touch-action: pan-y;
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 350ms ease;
}

.slide {
  flex: 0 0 100%;
  height: 100%;
  margin: 0;
}

/* Each image is a device-frame mockup (tools.site_images): the frame, its drop shadow
   and the screen are all in the SVG, around a transparent margin. */
.slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.carousel-btn {
  flex: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.carousel-btn:hover {
  border-color: var(--muted);
}

.carousel-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 20px;
}

.carousel-title {
  margin: 0;
  font-weight: 600;
}

.carousel-caption {
  margin: 0;
  color: var(--muted);
}

.carousel-tags {
  display: flex;
  gap: 6px;
  margin: 0;
}

.tag {
  padding: 2px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8125rem;
  color: var(--muted);
  white-space: nowrap;
}

.carousel-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin-top: 16px;
}

.dot {
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

.dot::before {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  margin: auto;
  border-radius: 50%;
  background: var(--dot);
  transition: transform 150ms ease, background 150ms ease;
}

.dot[aria-current="true"]::before {
  background: var(--accent);
  transform: scale(1.2);
}

.carousel-empty {
  display: grid;
  place-items: center;
  height: 100%;
  margin: 0;
  padding: 16px;
  color: var(--muted);
  text-align: center;
}

/* Display sections */

.displays {
  padding: 48px 0 24px;
}

h2 {
  margin: 0 0 16px;
  font-size: 1.5rem;
}

.display-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.display-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 150ms ease;
}

.display-card[aria-current="true"] {
  border-color: var(--accent);
}

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

/* A display's overlay text (e.g. "Coming Soon"), styled like the band across its screens */
.badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #101a2b;
  color: #faa01e;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  vertical-align: 0.15em;
  white-space: nowrap;
}

.display-card p {
  margin: 0;
  color: var(--muted);
}

.display-card .see-it {
  align-self: flex-start;
  margin-top: auto;
  padding: 6px 14px;
  border: none;
  border-radius: 8px;
  background: var(--accent-fill);
  color: var(--accent-text);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.display-card .see-it:hover {
  opacity: 0.85;
}

.install-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 24px;
  margin: 16px 0 24px;
  padding: 28px 32px;
  background: var(--band-bg);
  border: 1px solid var(--band-border);
  border-radius: 16px;
  color: #f1f5f9;
}

.install-icon {
  flex: none;
  width: 64px;
  height: 64px;
}

.install-copy {
  flex: 1 1 280px;
}

.install-band h2 {
  margin: 0 0 4px;
}

.install-band p {
  margin: 0;
  color: #b8c2d3;
}

.site-footer {
  padding-top: 24px;
  padding-bottom: 48px;
  color: var(--muted);
  font-size: 0.875rem;
}

@media (max-width: 640px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding-top: 32px;
  }

  .brand-icon {
    width: 72px;
    height: 72px;
  }

  .carousel {
    padding: 12px;
  }

  .carousel-viewport {
    aspect-ratio: 5 / 4;
  }

  .carousel-btn {
    display: none;
  }

  .display-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .carousel-track,
  .dot::before,
  .button {
    transition: none;
  }

  .button:hover {
    transform: none;
  }
}
