/* Wonderslide brand styles. Values follow wng-slides:
   src/app/theme/tokens/site.css and legacy-static/css/tokens.css, buttons.css.
   The site palette does not switch with the color scheme, same as wonderslide.com. */

:root {
  --ws-green: #00ba88;
  --ws-green-hover: #00966d;
  --ws-green-soft: rgba(0, 186, 136, 0.08);
  --ws-heading: #222222;
  --ws-text: #444444;
  --ws-muted: #6e718f;
  --ws-surface: #ffffff;
  --ws-bg-subtle: #f5f5f5;
  --ws-border: #e0e0e0;
  --ws-error: #e5484d;
  --ws-dark: #000000;
  --ws-on-dark: #f8f8fb;
  --ws-on-dark-muted: rgba(255, 255, 255, 0.5);
  --ws-on-dark-line: rgba(255, 255, 255, 0.2);

  --font-heading: Raleway, "Open Sans", system-ui, sans-serif;
  --font-body: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-ui: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --radius-pill: 40px;
  --radius-card: 32px;
  --radius-md: 16px;
  --container: 1280px;
  --gutter: 20px;
  --header-height: 56px;

  color-scheme: light;
}

@media (min-width: 1024px) {
  :root {
    --header-height: 64px;
  }
}

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

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font: 16px/1.6 var(--font-body);
  color: var(--ws-text);
  background: var(--ws-surface);
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--ws-green);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ws-heading);
  text-wrap: balance;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  font: 600 16px/1 var(--font-ui);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease;
}

.btn--sm {
  padding: 10px 18px;
  font-size: 14px;
}

.btn--primary {
  background: var(--ws-green);
  border-color: var(--ws-green);
  color: #ffffff;
}

.btn--primary:hover {
  background: var(--ws-green-hover);
  border-color: var(--ws-green-hover);
}

.btn--outline {
  background: transparent;
  border-color: var(--ws-green);
  color: var(--ws-green-hover);
}

.btn--outline:hover {
  background: var(--ws-green-soft);
}

.link-button {
  padding: 4px;
  border: 0;
  background: none;
  font: 500 14px/1.4 var(--font-ui);
  color: var(--ws-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.link-button:hover {
  color: var(--ws-heading);
}

/* Header */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--ws-on-dark);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--header-height);
}

/* Wonderslide mark plus the "Wonderslide Tools" name, same lockup as the Open Graph card */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.logo__mark {
  flex: none;
  width: 24px;
  height: 24px;
}

.logo__text {
  overflow: hidden;
  font: 700 16px/1 var(--font-heading);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.logo__product {
  color: var(--ws-on-dark-muted);
}

.site-nav {
  display: flex;
  font: 400 16px/1 var(--font-ui);
}

.site-nav a {
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: var(--ws-green);
}

/* Tools dropdown: <details> keeps it working without JS; site.js only closes it */
.menu {
  position: relative;
}

.menu__button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  list-style: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s ease;
}

.menu__button::-webkit-details-marker {
  display: none;
}

.menu__button:hover,
.menu[open] .menu__button {
  color: var(--ws-green);
}

.menu__chevron {
  width: 12px;
  height: 12px;
  transition: transform 0.2s ease;
}

.menu[open] .menu__chevron {
  transform: rotate(180deg);
}

.menu__panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 60;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 8px;
  border-radius: var(--radius-md);
  background: var(--ws-surface);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  color: var(--ws-text);
}

.menu__list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu__item {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 10px;
  transition: background-color 0.2s ease;
}

.menu__item:hover {
  background: var(--ws-bg-subtle);
  color: inherit;
}

.menu__formats {
  display: flex;
  align-items: center;
  gap: 6px;
  font: 600 11px/1 var(--font-ui);
  letter-spacing: 0.06em;
  color: var(--ws-muted);
}

.menu__arrow {
  color: var(--ws-green);
}

.menu__name {
  font: 500 15px/1.3 var(--font-ui);
  color: var(--ws-heading);
}

.menu__all {
  display: block;
  margin-top: 6px;
  padding: 10px 12px;
  border-top: 1px solid var(--ws-border);
  font: 600 14px/1 var(--font-ui);
  color: var(--ws-green-hover);
}

.menu__all:hover {
  color: var(--ws-green-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-header__cta {
  margin-left: auto;
  padding-inline: 14px;
}

/* Phones: the mark alone stands in for the lockup so the menu and the CTA both fit */
@media (max-width: 479px) {
  .logo__text {
    display: none;
  }
}

@media (min-width: 720px) {
  .site-header__inner {
    gap: 28px;
  }

  .site-header__cta {
    padding-inline: 18px;
  }

  .logo {
    gap: 10px;
  }

  .logo__mark {
    width: 32px;
    height: 32px;
  }

  .logo__text {
    font-size: 20px;
  }
}

/* Dark first screen */

.hero {
  padding-block: calc(var(--header-height) + 56px) 72px;
  background: var(--ws-dark);
  color: var(--ws-on-dark);
}

.hero--compact {
  padding-bottom: 56px;
}

.hero__grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

@media (min-width: 1000px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 540px);
    gap: 64px;
  }
}

.hero__eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0;
  font: 500 14px/1 var(--font-ui);
  color: var(--ws-on-dark-muted);
}

.format-chip {
  padding: 6px 12px;
  border: 1px solid var(--ws-on-dark-line);
  border-radius: var(--radius-pill);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ws-on-dark);
}

.format-arrow {
  color: var(--ws-green);
  font-weight: 700;
}

.hero h1 {
  max-width: 15ch;
  margin-top: 22px;
  font-size: clamp(34px, 5vw, 58px);
  color: #ffffff;
}

/* Buttons under the hero text: error pages and any page that leads somewhere next */
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 0;
}

.hero__lead {
  max-width: 56ch;
  margin: 18px 0 0;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.55;
  color: var(--ws-on-dark-muted);
}

/* File upload */

.uploader {
  padding: 10px;
  border-radius: var(--radius-card);
  background: var(--ws-surface);
  color: var(--ws-text);
}

.uploader__panel {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 14px;
  min-height: 320px;
  padding: 32px 24px;
  border-radius: calc(var(--radius-card) - 8px);
  text-align: center;
}

.uploader__drop {
  margin: 0;
  border: 2px dashed #cfd4dc;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.uploader__drop.is-dragover {
  border-color: var(--ws-green);
  background: var(--ws-green-soft);
}

.uploader__icon {
  width: 52px;
  height: 52px;
  color: var(--ws-green);
}

.uploader__icon--error {
  color: var(--ws-error);
}

.uploader__title {
  margin: 0;
  font: 600 21px/1.3 var(--font-heading);
  color: var(--ws-heading);
}

.uploader__hint {
  margin: 0;
  max-width: 40ch;
  font-size: 14px;
  color: var(--ws-muted);
  overflow-wrap: anywhere;
}

.uploader__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

#uploader-file:focus-visible + .btn {
  outline: 2px solid var(--ws-green);
  outline-offset: 3px;
}

.uploader__note {
  margin: 10px 16px 6px;
  font-size: 13px;
  text-align: center;
  color: var(--ws-muted);
}

.uploader__note a {
  color: var(--ws-green-hover);
}

.progress {
  width: min(100%, 320px);
  height: 8px;
  overflow: hidden;
  border-radius: 8px;
  background: #eceef2;
}

.progress__bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--ws-green);
  transition: width 0.3s ease;
}

.progress.is-indeterminate .progress__bar {
  width: 35%;
  animation: progress-slide 1.3s ease-in-out infinite;
}

@keyframes progress-slide {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(290%);
  }
}

/* Sections */

.section {
  padding-block: clamp(56px, 8vw, 104px);
}

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

.section--flush {
  padding-top: 0;
}

.section h2 {
  font-size: clamp(28px, 3.4vw, 40px);
}

.section__lead {
  max-width: 60ch;
  margin: 14px 0 0;
  color: var(--ws-muted);
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  padding: 28px;
  border: 1px solid var(--ws-border);
  border-radius: var(--radius-md);
  background: var(--ws-surface);
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ws-green-soft);
  font: 700 16px/1 var(--font-ui);
  color: var(--ws-green-hover);
}

.step h3 {
  margin-top: 18px;
  font-size: 20px;
}

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

.outcomes {
  display: grid;
  gap: 14px;
  max-width: 76ch;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.outcomes li {
  position: relative;
  padding-left: 34px;
}

.outcomes li::before {
  content: "";
  position: absolute;
  top: 0.3em;
  left: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ws-green)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2 5 8.5l4.5-5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 12px no-repeat;
}

.faq {
  max-width: 860px;
  margin-top: 32px;
  border-top: 1px solid var(--ws-border);
}

.faq details {
  border-bottom: 1px solid var(--ws-border);
}

.faq summary {
  position: relative;
  padding: 22px 44px 22px 0;
  list-style: none;
  font: 600 18px/1.4 var(--font-heading);
  color: var(--ws-heading);
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  font: 400 26px/1 var(--font-ui);
  color: var(--ws-green);
}

.faq details[open] summary::after {
  content: "−";
}

.faq details p {
  max-width: 70ch;
  margin: 0 0 22px;
  color: var(--ws-muted);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.tool-card {
  display: grid;
  align-content: start;
  gap: 12px;
  height: 100%;
  padding: 28px;
  border: 1px solid var(--ws-border);
  border-radius: var(--radius-md);
  background: var(--ws-surface);
  text-decoration: none;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease;
}

.tool-card:hover {
  border-color: var(--ws-green);
  transform: translateY(-2px);
}

.tool-card__formats {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 600 13px/1 var(--font-ui);
  letter-spacing: 0.06em;
  color: var(--ws-heading);
}

.tool-card__format {
  padding: 5px 9px;
  border: 1px solid var(--ws-border);
  border-radius: 6px;
}

.tool-card h3 {
  font-size: 21px;
}

.tool-card p {
  margin: 0;
  font-size: 15px;
  color: var(--ws-muted);
}

.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(32px, 5vw, 56px);
  border-radius: var(--radius-card);
  background: var(--ws-dark);
  color: var(--ws-on-dark);
}

.cta-band h2 {
  max-width: 22ch;
  font-size: clamp(26px, 3vw, 36px);
  color: #ffffff;
}

.cta-band p {
  max-width: 52ch;
  margin: 10px 0 0;
  color: var(--ws-on-dark-muted);
}

/* Legal pages */

.prose {
  max-width: 74ch;
}

.prose h2 {
  margin: 40px 0 12px;
  font-size: 24px;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p,
.prose ul {
  margin: 0 0 14px;
}

.prose li {
  margin-bottom: 6px;
}

.prose a {
  color: var(--ws-green-hover);
}

.prose__meta {
  font-size: 14px;
  color: var(--ws-muted);
}

.table-scroll {
  overflow-x: auto;
  margin-top: 20px;
}

.licenses {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.licenses th {
  padding: 10px 12px;
  border-bottom: 1px solid var(--ws-heading);
  font: 600 12px/1.4 var(--font-ui);
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
  color: var(--ws-muted);
}

.licenses td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--ws-border);
  vertical-align: top;
}

.licenses td a {
  color: var(--ws-heading);
}

/* License text: shipped in full because the OFL requires it to travel with the fonts */
.license-details {
  margin-bottom: 14px;
}

.license-details summary {
  padding: 8px 0;
  font: 600 15px/1.4 var(--font-ui);
  color: var(--ws-green-hover);
  cursor: pointer;
}

.license-text {
  max-height: 460px;
  margin: 8px 0 0;
  padding: 18px;
  overflow: auto;
  border: 1px solid var(--ws-border);
  border-radius: var(--radius-md);
  background: var(--ws-bg-subtle);
  font: 400 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--ws-text);
}

/* Footer */

.site-footer {
  padding-block: 36px calc(36px + env(safe-area-inset-bottom, 0px));
  background: var(--ws-bg-subtle);
  font: 400 14px/1.5 var(--font-ui);
  color: var(--ws-muted);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}

.site-footer p {
  margin: 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
}

.site-footer a {
  color: var(--ws-heading);
  text-decoration: none;
}

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

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