/* Check It Twice website. Tokens come from checkittwice/docs/design/brand-tokens.json. */
:root {
  --brand-blue: #425b9a;
  --ink: #111111;
  --sky: #bad7df;
  --blush: #ffe2e2;
  --mist: #f6f6f6;
  --white: #ffffff;
  --ice: #e3eff4;
  --periwinkle: #8fa8d6;
  --pale-mint: #ddf3ec;
  --slate: #5a6669;
  --border: #d5dde0;
  --line: #eceff0;
  --gold-bg: #fff1d6;
  --gold-ink: #8a5a00;

  --grad-splash: linear-gradient(165deg, #bad7df 0%, #dce9ee 32%, #ffe2e2 70%, #f6f6f6 100%);
  --grad-app: linear-gradient(180deg, #f8eeee 0%, #eef4f7 55%, #f6f6f6 100%);
  --highlighter: linear-gradient(100deg, rgba(255, 226, 226, 0) 0%, #ffe2e2 6%, #ffd3d3 50%, #ffe2e2 94%, rgba(255, 226, 226, 0) 100%) no-repeat 0 78% / 100% 52%;

  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --shadow-card: 0 6px 18px rgba(20, 30, 50, 0.12);
  --shadow-soft: 0 1px 4px rgba(66, 91, 154, 0.18);

  --page: 1080px;
  --prose: 720px;
  --gutter: 16px;

  color-scheme: light;
}

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

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

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

body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
}

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

a {
  color: var(--brand-blue);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--periwinkle);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--white);
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 10;
}

.skip-link:focus {
  left: 8px;
}

.wrap {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

@media (min-width: 640px) {
  :root {
    --gutter: 24px;
  }
}

/* Header and footer */

/* Transparent header that sits over the hero / page-head gradient.
   The negative margin pulls the next section up under it; the blur keeps
   text readable once content scrolls beneath. */
.site-header {
  --header-h: 64px;
  background: transparent;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 5;
  margin-bottom: calc(-1 * var(--header-h));
}

/* Once the page scrolls, fade in a soft background so content passing
   underneath doesn't clash with the nav. Browsers without scroll-driven
   animations keep the blur-only header. */
@supports (animation-timeline: scroll()) {
  .site-header {
    animation: header-fill linear both;
    animation-timeline: scroll(root);
    animation-range: 0 120px;
  }
}

@keyframes header-fill {
  from {
    background: rgba(255, 255, 255, 0);
    box-shadow: 0 1px 0 rgba(236, 239, 240, 0);
  }
  to {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 1px 0 rgba(236, 239, 240, 1);
  }
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.brand img {
  width: 150px;
}

.nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 10px;
  border-radius: 12px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav a:hover,
.nav a[aria-current="page"] {
  background: var(--ice);
}

@media (max-width: 480px) {
  .brand img {
    width: 124px;
  }
  .nav a {
    padding: 10px 7px;
    font-size: 13px;
  }
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 64px;
  padding: 32px 0 48px;
  color: var(--slate);
  font-size: 14px;
}

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

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

.site-footer a {
  color: var(--slate);
}

/* Buttons and pills */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 22px;
  border-radius: var(--radius-md);
  background: var(--ice);
  border: 1.5px solid var(--periwinkle);
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}

.button:hover {
  background: #d6e8ef;
}

.button.dark {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

.pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-blue);
}

.mark {
  background: var(--highlighter);
  padding: 0 0.1em;
  color: var(--brand-blue);
}

/* Landing */

.hero {
  background: var(--grad-splash);
  padding: calc(64px + 48px) 0 56px;
  overflow: hidden;
}

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

@media (min-width: 880px) {
  .hero {
    padding: calc(64px + 72px) 0 80px;
  }
  .hero .wrap {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.hero h1 {
  font-size: clamp(34px, 6vw, 54px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 16px 0 16px;
}

.hero .lede {
  font-size: 18px;
  color: #2f3a3d;
  max-width: 34em;
  margin: 0 0 28px;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.store-note {
  font-size: 14px;
  color: var(--slate);
  margin: 12px 0 0;
}

.hero-visual {
  display: flex;
  justify-content: center;
  gap: 16px;
}

/* Phone frame with a Dynamic Island, sized in % of the frame so it scales. */
.phone {
  position: relative;
  width: min(290px, 66vw);
  border-radius: 46px;
  background: #0d0f14;
  padding: 9px;
  box-shadow: 0 24px 60px rgba(20, 30, 50, 0.28), inset 0 0 0 1.5px #2a2e36;
}

.phone::after {
  content: "";
  position: absolute;
  top: 3.4%;
  left: 50%;
  transform: translateX(-50%);
  width: 31%;
  height: 3.3%;
  border-radius: 999px;
  background: #000;
}

.phone img {
  border-radius: 37px;
  width: 100%;
}

.section {
  padding: 64px 0 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: 32px;
}

.section h2 {
  font-size: clamp(26px, 3.6vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.section-head p {
  color: var(--slate);
  margin: 0;
  font-size: 17px;
}

.grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 640px) {
  .grid.two {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid.three {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .grid.three {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-soft);
}

.card h3 {
  margin: 12px 0 6px;
  font-size: 18px;
  line-height: 1.3;
}

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

.icon-chip {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-blue);
  background: var(--ice);
}

.icon-chip.blush {
  background: var(--blush);
  color: #7e2e2e;
}

.icon-chip.mint {
  background: var(--pale-mint);
  color: #2a835f;
}

.icon-chip svg {
  width: 24px;
  height: 24px;
}

.shots {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(240px, 64vw);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 4px 16px;
  margin: 0 -4px;
}

.shots figure {
  margin: 0;
  scroll-snap-align: start;
}

.shots img {
  border-radius: 24px;
  box-shadow: var(--shadow-card);
}

.shots figcaption {
  font-size: 14px;
  color: var(--slate);
  margin-top: 10px;
}

.callout {
  background: var(--grad-app);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  display: grid;
  gap: 16px;
}

@media (min-width: 760px) {
  .callout {
    padding: 40px;
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

.callout h2 {
  margin: 0 0 8px;
}

.callout p {
  margin: 0;
  color: var(--slate);
}

/* Screens carousel. The track bleeds to the screen edges and lines its
   first slide up with the page content. */

.carousel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.carousel-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  flex-shrink: 0;
}

.carousel-nav[hidden] {
  display: none;
}

.carousel-btn {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1.5px solid var(--periwinkle);
  background: var(--ice);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.carousel-btn:hover:not(:disabled) {
  background: #d6e8ef;
}

.carousel-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.carousel-btn svg {
  width: 22px;
  height: 22px;
}

@media (max-width: 639px) {
  .carousel-nav {
    display: none !important;
  }
}

.carousel {
  --edge: max(var(--gutter), calc((100vw - var(--page)) / 2 + var(--gutter)));
}

.carousel-track {
  list-style: none;
  margin: 0;
  padding: 8px var(--edge) 24px;
  scroll-padding-inline: var(--edge);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(260px, 70vw);
  column-gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-track:focus-visible {
  outline-offset: -3px;
}

.slide {
  scroll-snap-align: start;
}

.slide img {
  width: 100%;
  border-radius: 28px;
  box-shadow: var(--shadow-card);
  background: var(--white);
}

@media (min-width: 900px) {
  .carousel-track {
    grid-auto-columns: 280px;
    column-gap: 24px;
  }
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.carousel-dots[hidden] {
  display: none;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--border);
  cursor: pointer;
  transition: width 0.2s ease, background-color 0.2s ease;
}

.carousel-dot.is-active {
  width: 24px;
  background: var(--brand-blue);
}

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

/* Legal and support pages */

.page-head {
  background: var(--grad-app);
  padding: calc(64px + 40px) 0 32px;
  border-bottom: 1px solid var(--line);
}

.page-head h1 {
  font-size: clamp(30px, 5vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.page-head .meta {
  color: var(--slate);
  font-size: 14px;
  margin: 0;
}

.prose {
  max-width: var(--prose);
  padding-top: 32px;
}

.prose h2 {
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 40px 0 10px;
  scroll-margin-top: 80px;
}

.prose h3 {
  font-size: 17px;
  margin: 24px 0 6px;
}

.prose p,
.prose li {
  color: #222a2c;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose li {
  margin: 6px 0;
}

.prose .short {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-soft);
}

.prose .short p {
  margin: 0;
}

.toc {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  margin-top: 24px;
  box-shadow: var(--shadow-soft);
}

.toc summary {
  font-weight: 700;
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.toc ol {
  margin: 0 0 8px;
  columns: 2 220px;
}

.table-scroll {
  overflow-x: auto;
  margin: 16px 0;
}

.prose table {
  border-collapse: collapse;
  width: 100%;
  min-width: 520px;
  font-size: 15px;
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
}

.prose th,
.prose td {
  text-align: left;
  vertical-align: top;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.prose th {
  background: var(--ice);
  font-weight: 700;
}

.draft-note {
  background: var(--gold-bg);
  color: var(--gold-ink);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  margin: 16px 0 0;
}

.contact-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-soft);
  margin: 16px 0;
}

.contact-card p {
  margin: 4px 0;
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0 !important;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 44px;
  margin: 14px 0;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--ice);
  border: 1.5px solid var(--periwinkle);
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.faq details {
  background: var(--white);
  border-radius: 16px;
  padding: 4px 20px;
  margin: 10px 0;
  box-shadow: var(--shadow-soft);
}

.faq summary {
  font-weight: 700;
  cursor: pointer;
  min-height: 52px;
  display: flex;
  align-items: center;
}

.faq details p {
  margin: 0 0 16px;
}

.not-found {
  text-align: center;
  padding: calc(64px + 80px) 0 40px;
}

.not-found h1 {
  font-size: 34px;
  margin: 24px 0 8px;
}

/* In-page links (Features, Screens) only fit on wider screens. */
@media (max-width: 520px) {
  .nav .nav-page {
    display: none;
  }
}

/* Single-column hero (phones and small tablets): centre the copy above the phone. */
@media (max-width: 879px) {
  .hero-copy {
    text-align: center;
  }
  .hero-copy .lede {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-copy .store-row {
    justify-content: center;
  }
}
