:root {
  --ink: #24221f;
  --muted: #66615a;
  --paper: #fbfaf6;
  --cream: #f4ecdc;
  --line: rgba(36, 34, 31, 0.14);
  --coral: #f08f79;
  --coral-text: #b54b36;
  --yellow: #f1d37b;
  --blue: #9bd5dc;
  --focus: #145e68;
  --mint: #b9dfcc;
  --lavender: #d6c9ed;
  --radius: 1.5rem;
  --display: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  font-size: 18px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--body);
  line-height: 1.65;
}

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

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  transform: translateY(-200%);
}

.skip-link:focus {
  color: #fff;
  transform: translateY(0);
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: #5c574f;
}

a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--focus);
  border-radius: 3px;
}

@media (forced-colors: active) {
  a:focus-visible {
    outline: 2px solid Highlight;
    outline-offset: 3px;
  }
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.1rem 1.25rem;
  width: min(100% - 2.5rem, 76rem);
  margin: 0 auto;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
}

.site-wordmark,
.site-nav a {
  display: inline-flex;
  min-height: 2.6rem;
  align-items: center;
  text-decoration: none;
}

.site-wordmark {
  font-family: var(--display);
  font-weight: 800;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.15rem;
  font-size: 0.9rem;
  font-weight: 650;
}

.site-wordmark:hover,
.site-nav a:hover,
.site-nav [aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.site-nav [aria-current="page"] {
  color: var(--focus);
}

.site-shell [id],
.product-shell [id],
.colorpad-interior [id] {
  scroll-margin-top: 1.25rem;
}

/* Shared interior pages */

main:not(.site-shell):not(.product-shell) {
  width: min(100% - 2.5rem, 42rem);
  margin: 0 auto;
  padding: 3rem 0 5rem;
}

main:not(.site-shell):not(.product-shell) section {
  margin-bottom: 2.75rem;
}

.hero {
  margin-bottom: 3.5rem;
}

.colorpad-interior .hero {
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.hero h1,
.legal-page h1,
.redirect-page h1 {
  margin: 0 0 0.8rem;
  font-family: var(--display);
  font-size: clamp(2.25rem, 7vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.tagline {
  margin: 0 0 0.6rem;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 650;
}

.subtext {
  max-width: 34rem;
  margin: 0;
  color: var(--muted);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 3rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.breadcrumb a {
  color: #514d47;
}

.hero-cta {
  margin: 1.4rem 0 0.5rem;
}

.primary-cta {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.72rem 1.15rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-family: var(--display);
  font-size: 0.9rem;
  font-weight: 750;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-cta:hover {
  color: #fff;
  background: #3c3934;
  box-shadow: 0 0.65rem 1.5rem rgba(36, 34, 31, 0.16);
  transform: translateY(-2px);
}

.support-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
  margin-top: 0.9rem;
  font-weight: 650;
}

.support-topics a {
  display: inline-flex;
  min-height: 2.6rem;
  align-items: center;
}

.support-topic > h3 {
  margin: 1.3rem 0 0.6rem;
  font-family: var(--display);
  font-size: 1.15rem;
  line-height: 1.3;
}

.faq-list {
  border-top: 1px solid var(--line);
}

.faq-item {
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
}

.faq-item h4 {
  margin: 0 0 0.45rem;
  font-family: var(--display);
  font-size: 1.05rem;
  line-height: 1.3;
}

.faq-item p {
  color: var(--muted);
  font-size: 0.94rem;
}

.product-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.2rem;
}

.product-nav [aria-current="page"] {
  color: var(--muted);
  text-decoration: none;
}

.legal-page header {
  margin-bottom: 3rem;
}

.legal-page section {
  margin-bottom: 2.4rem;
}

.legal-page h2,
:where(main:not(.site-shell):not(.product-shell)) section > h2 {
  margin: 0 0 0.7rem;
  font-family: var(--display);
  font-size: 1.1rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.colorpad-interior section > h2 {
  font-size: clamp(1.35rem, 3vw, 1.65rem);
}

.legal-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.redirect-page {
  min-height: 78vh;
  display: grid;
  align-content: center;
}

body > footer:not(.brand-footer) {
  width: min(100% - 2.5rem, 42rem);
  margin: 0 auto;
  padding: 0 0 2.5rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.product-page > footer:not(.brand-footer) {
  width: min(100% - 2.5rem, 76rem);
}

body > footer:not(.brand-footer) p {
  margin: 0;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}

/* Reusable editorial elements */

.eyebrow {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-label {
  margin-bottom: clamp(1.1rem, 2.5vw, 2rem);
}

.section-label h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.2rem;
}

.text-link {
  font-size: 0.84rem;
  font-weight: 700;
}

/* Sinbad Labs */

:where(.brand-page) .site-header,
.site-shell,
.brand-footer {
  width: min(100% - 2.5rem, 64rem);
  margin: 0 auto;
}

.brand-hero {
  padding: clamp(1.75rem, 4vw, 3.25rem) 0;
}

.brand-hero h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 780;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.brand-intro {
  margin: 0.5rem 0 0;
  color: var(--muted);
}

.product-spotlight {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  padding: clamp(1.75rem, 4vw, 3.25rem) 0 clamp(2.25rem, 5vw, 4rem);
  border-top: 1px solid var(--line);
}

.product-spotlight h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
}

.product-summary {
  max-width: 40ch;
  margin: 0.75rem 0 1.1rem;
  color: var(--muted);
}

.product-spotlight .button-row {
  gap: 0.5rem 1rem;
}

.product-spotlight .text-link,
.brand-footer .text-link {
  display: inline-flex;
  min-height: 2.6rem;
  align-items: center;
}

.product-spotlight-image {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 1rem;
}

.brand-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 0.5rem 1.5rem;
  padding: 1.25rem 0 1.75rem;
  border-top: 1px solid var(--line);
}

.brand-footer h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1rem;
  line-height: 1.3;
}

.brand-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

/* Happy ColorPad */

.product-page {
  background:
    radial-gradient(circle at 5% 8%, rgba(241, 211, 123, 0.24), transparent 24rem),
    radial-gradient(circle at 98% 15%, rgba(240, 143, 121, 0.14), transparent 30rem),
    #fffaf1;
}

.product-shell {
  width: min(100% - 2.5rem, 76rem);
  margin: 0 auto;
  padding: clamp(1.6rem, 5vw, 4.5rem) 0 clamp(3rem, 7vw, 5rem);
}

.product-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1.6rem, 4.5vw, 4.5rem);
  align-items: center;
  padding-bottom: clamp(2rem, 5vw, 4.5rem);
}

.product-hero h1 {
  margin: 0 0 0.65rem;
  font-family: var(--display);
  font-size: clamp(2.55rem, 6.1vw, 5.5rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.product-hero h1 span {
  color: var(--coral-text);
}

.product-hero-tagline {
  margin: 0 0 0.55rem;
  font-family: var(--display);
  font-size: clamp(1.15rem, 2.4vw, 1.65rem);
  font-weight: 720;
  line-height: 1.25;
}

.product-hero-summary {
  max-width: 29rem;
  margin-bottom: 1.2rem;
  color: var(--muted);
}

.product-note {
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.product-note span {
  margin-inline: 0.2em;
}

.product-hero-visual {
  position: relative;
  padding: clamp(0.8rem, 3vw, 2.2rem);
  border-radius: clamp(1.5rem, 4vw, 3.25rem);
  background: linear-gradient(135deg, #ffe0b5, #dceecf 50%, #b8e4e2);
}

.product-hero-visual img {
  display: block;
  width: 100%;
  border: 1px solid rgba(36, 34, 31, 0.14);
  border-radius: 0.8rem;
  box-shadow: 0 1.4rem 3rem rgba(91, 70, 40, 0.2);
  transform: rotate(1.2deg);
}

.hero-spark {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
}

.hero-spark-one {
  top: -0.8rem;
  right: 10%;
  width: 3rem;
  height: 3rem;
  background: var(--coral);
  transform: rotate(14deg);
}

.hero-spark-two {
  bottom: 10%;
  left: -0.6rem;
  width: 2.6rem;
  height: 2.6rem;
  background: #a18bc5;
  transform: rotate(-12deg);
}

.editorial-section {
  padding: clamp(2rem, 5vw, 4rem) 0;
  border-top: 1px solid var(--line);
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.feature-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #dff0e7;
}

.feature-card:first-child {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(1rem, 4vw, 3rem);
  align-items: center;
  background: #f7edc9;
}

.feature-card:last-child {
  background: #ece3f7;
}

.feature-card h3,
.fact-item h3 {
  margin: 0 0 0.5rem;
  font-family: var(--display);
  font-size: clamp(1.2rem, 2.3vw, 1.65rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.feature-card p,
.fact-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.screenshot-image {
  display: block;
  width: 100%;
  height: auto;
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: clamp(0.7rem, 2vw, 1.2rem);
  background: var(--cream);
}

.feature-details {
  margin-top: clamp(1.5rem, 4vw, 3rem);
}

.fact-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.fact-item {
  padding: clamp(1rem, 3vw, 1.65rem) 0;
  border-bottom: 1px solid var(--line);
}

.fact-item:nth-child(odd) {
  padding-right: clamp(1rem, 3vw, 2rem);
  border-right: 1px solid var(--line);
}

.fact-item:nth-child(even) {
  padding-left: clamp(1rem, 3vw, 2rem);
}

.download-panel {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: clamp(2.25rem, 5vw, 4rem);
  padding: clamp(1.75rem, 4vw, 3.5rem);
  border-radius: clamp(1.65rem, 4vw, 3rem);
  background: var(--coral);
  color: var(--ink);
}

.download-panel h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.6rem, 3.4vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.primary-cta-light,
.primary-cta-light:hover {
  max-width: 100%;
  border-color: #fff;
  background: #fff;
  color: var(--ink);
}

.product-links-section {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.product-links-section h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1rem;
}

/* Coloring guides */

.guide-directory {
  margin: 0 0 2.75rem;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.guide-directory li {
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
}

.guide-directory h2 {
  margin: 0 0 0.55rem;
  font-family: var(--display);
  font-size: 1.2rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.guide-directory p {
  color: var(--muted);
}

.guide-article ul,
.guide-article ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

.guide-article li + li {
  margin-top: 0.6rem;
}

.guide-practice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 14rem);
  gap: 1.2rem;
  align-items: start;
}

.guide-practice ul {
  margin-bottom: 0;
}

.guide-practice figure {
  margin: 0;
}

.guide-image {
  display: block;
  width: min(100%, 16rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.guide-screenshot {
  width: min(100%, 21rem);
  margin: 1rem auto;
  border-radius: 0.75rem;
}

.guide-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.6rem, 2.5vw, 1.3rem);
  margin: 1rem 0 1.25rem;
}

.guide-comparison figure {
  margin: 0;
}

.guide-comparison .guide-image {
  width: 100%;
  border-radius: 1rem;
}

.guide-hero-result {
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 38%;
}

:is(.guide-comparison, .guide-practice) figcaption {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.guide-grayscale {
  max-width: 30rem;
}

.guide-grayscale .guide-image {
  filter: grayscale(1);
}

.guide-footer {
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}

.guide-nav {
  font-size: 0.9rem;
  font-weight: 650;
}

@media print {
  .skip-link {
    display: none;
  }

  #content:has(> .guide-astronaut),
  #content:has(> .guide-astronaut) + footer {
    padding-bottom: 0;
  }

  .guide-astronaut h2 {
    break-after: avoid;
  }

  .guide-astronaut .guide-comparison,
  .guide-astronaut .guide-footer {
    break-inside: avoid;
  }

  .guide-astronaut .guide-screenshot {
    width: min(100%, 18rem);
  }

  .primary-cta.guide-store-link {
    display: inline;
    padding: 0;
    border: 0;
    background: none;
    color: #000;
    text-decoration: underline;
    box-shadow: none;
    transform: none;
  }
}

/* Responsive layout */

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

@media (max-width: 600px) {
  html {
    font-size: 17px;
  }

  .site-header,
  .site-shell,
  .product-shell,
  .brand-footer,
  main:not(.site-shell):not(.product-shell),
  body > footer:not(.brand-footer) {
    width: min(100% - 2rem, 76rem);
  }

  .product-hero,
  .feature-list,
  .feature-card:first-child,
  .fact-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .fact-item:nth-child(odd),
  .fact-item:nth-child(even) {
    padding-inline: 0;
    border-right: 0;
  }

  .support-topics {
    flex-direction: column;
    align-items: start;
    gap: 0.05rem;
  }

  .download-panel {
    padding: 1.75rem 1.25rem;
    border-radius: 1.65rem;
  }

  .product-links-section {
    align-items: flex-start;
    flex-direction: column;
  }

  .guide-practice {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .primary-cta {
    transition: none;
  }
}
