/* Shared styles for pocketstarlabs.com.
   The studio home is /. An app lives at /<slug>/, with /<slug>/support/
   and /<slug>/privacy/. Stridle is /stridle/.
   Pages link this file and can reuse .mascot, .lede, and .contact.
   .page-stridle adds Stridle's forest green and amber on top of the studio palette. */

:root {
  color-scheme: light;
  --paper: #f6f1e7;
  --paper-bright: #fbf8f2;
  --paper-edge: #e8e0d2;
  --ink: #1c1915;
  --ink-soft: #3a342c;
  --gold: #f2c14e;
  --forest: #174c30;
  --moss: #2e8b55;
  --amber: #e8b33a;
}

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

html {
  background-color: var(--paper-edge);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  justify-content: safe center;
  padding:
    calc(1.5rem + env(safe-area-inset-top))
    calc(1.25rem + env(safe-area-inset-right))
    calc(1.5rem + env(safe-area-inset-bottom))
    calc(1.25rem + env(safe-area-inset-left));
  background-color: var(--paper);
  background-image: radial-gradient(ellipse at 50% 40%, var(--paper-bright) 0%, var(--paper) 58%, var(--paper-edge) 100%);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  text-align: center;
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  z-index: 2;
  padding: 0.55rem 0.8rem;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}

.skip-link:not(:focus) {
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  overflow: hidden;
  padding: 0;
  white-space: nowrap;
}

.site-header,
main,
.site-footer {
  width: min(100%, 28rem);
  min-width: 0;
  max-width: 100%;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.home main,
.home .site-footer {
  width: min(100%, 36rem);
}

.page-stridle {
  border-top: 0.4rem solid var(--moss);
}

.page-stridle .site-header,
.page-stridle main,
.page-stridle .site-footer {
  width: min(100%, 54rem);
}

.mascot {
  display: block;
  width: 9.5rem;
  height: auto;
  animation: drift 5s ease-in-out infinite;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.35rem;
  padding: 0.4rem 0.45rem;
  font-weight: 600;
}

.brand img {
  width: 2.5rem;
  height: auto;
}

h1,
h2 {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
  text-wrap: balance;
  color: var(--ink);
}

h1 {
  margin: 1.35rem 0 0.6rem;
  font-size: clamp(1.9rem, 5vw, 3.15rem);
}

h2 {
  margin: 1.75rem 0 0.55rem;
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  letter-spacing: -0.02em;
}

.lede {
  margin: 0;
  max-width: 16rem;
  color: var(--ink-soft);
  font-size: 1.0625rem;
  text-wrap: pretty;
}

.home .lede {
  max-width: 20rem;
}

.hero {
  width: min(100%, 36rem);
}

.page-stridle .hero h1 {
  margin-top: 0.35rem;
}

.subtitle {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
  font-size: 1.125rem;
  text-wrap: balance;
}

.platform,
.price {
  margin: 0.4rem 0 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.platform {
  color: var(--forest);
}

.price {
  color: var(--ink);
}

.app-icon {
  display: block;
  height: auto;
  border-radius: 22.37%;
}

.hero picture {
  display: block;
  line-height: 0;
}

.hero .app-icon {
  width: 5.5rem;
  margin: 0.2rem auto 0;
}

.home-link {
  display: inline-block;
  margin-top: 1.15rem;
  padding: 0.55rem 0.25rem;
}

.prose {
  width: min(100%, 34rem);
  min-width: 0;
  margin-inline: auto;
  text-align: left;
}

.prose p,
.prose ul {
  margin: 0.85rem 0 0;
}

.prose ul {
  padding-left: 1.2rem;
}

.prose li + li {
  margin-top: 0.4rem;
}

.apps {
  width: 100%;
  min-width: 0;
  margin-top: 2rem;
}

.apps h2 {
  margin-top: 0;
}

.app-list {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
}

.app-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.9rem;
  padding: 0.75rem;
  background: var(--paper-bright);
  color: var(--ink);
  border-radius: 1.15rem;
  box-shadow: inset 0 0 0 1px var(--paper-edge);
  text-align: left;
  text-decoration: none;
}

.app-card picture {
  flex: 0 0 auto;
  line-height: 0;
}

.app-card .app-icon {
  width: 4.5rem;
}

.app-name,
.app-subtitle,
.app-platform {
  display: block;
}

.app-name {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.15;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.app-subtitle,
.app-platform {
  margin-top: 0.2rem;
  color: var(--ink-soft);
}

.gallery,
.preview-block {
  width: 100%;
  min-width: 0;
}

.section-title {
  margin-bottom: 0.75rem;
}

.shot-strip {
  display: flex;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0.15rem 0.1rem 0.85rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  list-style: none;
  text-align: start;
}

.shot-strip li {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.shot-strip picture {
  display: block;
  line-height: 0;
}

.shot-strip img {
  display: block;
  width: min(70vw, 16.25rem);
  height: auto;
  border-radius: 1.15rem;
  background: var(--paper-edge);
}

.preview {
  display: block;
  width: min(70vw, 18rem);
  height: auto;
  margin: 0.25rem auto 0;
  border-radius: 1.15rem;
  background: #101410;
}

.store {
  margin-top: 1.75rem;
}

.store-status {
  display: inline-block;
  margin: 0;
  padding: 0.7rem 1.05rem;
  background: var(--amber);
  color: var(--ink);
  border-radius: 999px;
  font-weight: 600;
  line-height: 1.3;
}

.subnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1rem;
  margin-top: 1.35rem;
}

.subnav a {
  display: inline-block;
  padding: 0.6rem 0.3rem;
}

.policy h1,
.policy .dateline {
  text-align: center;
}

.policy .dateline {
  margin-top: 0.35rem;
  color: var(--ink-soft);
}

.policy hr {
  width: 100%;
  margin: 1.6rem 0;
  border: 0;
  border-top: 1px solid var(--paper-edge);
}

.contact {
  margin-top: 1.35rem;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  -webkit-tap-highlight-color: rgba(242, 193, 78, 0.55);
}

.contact a,
.prose a {
  overflow-wrap: anywhere;
}

.contact a {
  display: inline-block;
  padding: 0.55rem 0.25rem;
}

.contact a:hover,
.home-link:hover,
.brand:hover,
.subnav a:hover,
.app-card:hover {
  background: var(--gold);
}

a:focus-visible,
.skip-link:focus,
.shot-strip:focus-visible,
.preview:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.site-footer {
  margin-top: 1.75rem;
}

.copyright {
  margin: 0.8rem 0 0;
  color: var(--ink-soft);
  font-size: 0.875rem;
}

@media (max-width: 22.5rem) {
  .app-card {
    flex-direction: column;
    text-align: center;
  }
}

@media (min-width: 48rem) {
  .mascot {
    width: 11.25rem;
  }

  .lede {
    max-width: 18rem;
    font-size: 1.125rem;
  }

  .home .lede {
    max-width: 22rem;
  }

  .shot-strip img {
    width: 15.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mascot {
    animation: none;
  }

  .shot-strip {
    scroll-behavior: auto;
  }
}

@media (forced-colors: active) {
  body {
    background-image: none;
  }

  .page-stridle {
    border-top-color: CanvasText;
  }

  .mascot {
    animation: none;
  }

  .app-card,
  .store-status,
  .shot-strip img,
  .app-icon,
  .preview {
    border: 1px solid CanvasText;
  }

  a:focus-visible,
  .skip-link:focus,
  .shot-strip:focus-visible,
  .preview:focus-visible {
    outline: 2px solid CanvasText;
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-0.4rem);
  }
}
