/* ==========================================================================
   Idlery Services LLC — site styles
   One stylesheet, no build step, no web fonts, no third-party requests.
   ========================================================================== */

:root {
  color-scheme: light dark;

  /* Idlery brand — teal sampled from the wordmark artwork (#5BA4AA). */
  --teal: #4d949a;
  --teal-strong: #3d7d83;
  --teal-wash: #eef6f7;

  /* CoreCredit product accent — the app icon's own blue. */
  --cc-blue: #0053fd;
  --cc-blue-strong: #0042ca;
  --cc-wash: #eef2ff;

  --ink: #10202a;
  --ink-soft: #4c5c68;
  --ink-faint: #6c7b87;
  --ground: #ffffff;
  --ground-alt: #f5f8fa;
  --card: #ffffff;
  --rule: #dfe6ea;
  --shadow: 0 1px 2px rgba(16, 32, 42, .05), 0 12px 32px -12px rgba(16, 32, 42, .18);

  --radius: 16px;
  --radius-lg: 22px;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --measure: 68ch;
  --max: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --teal: #7cc3c9;
    --teal-strong: #a4dbe0;
    --teal-wash: #14262a;

    --cc-blue: #6f9dff;
    --cc-blue-strong: #9dbcff;
    --cc-wash: #141c2e;

    --ink: #eef3f7;
    --ink-soft: #a8b7c2;
    --ink-faint: #8b9aa6;
    --ground: #0a1116;
    --ground-alt: #0e171e;
    --card: #14202a;
    --rule: #26343f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px -12px rgba(0, 0, 0, .6);
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--ground);
  overflow-wrap: break-word;
}

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

h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 2.1vw, 1.375rem); letter-spacing: -.01em; }
p  { margin: 0 0 1rem; }
p, li { text-wrap: pretty; }

a { color: var(--teal-strong); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--teal); }
:focus-visible { outline: 3px solid var(--cc-blue); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--card); color: var(--ink);
  padding: .75rem 1rem; border-radius: 8px; box-shadow: var(--shadow);
}
.skip:focus { left: 1rem; top: 1rem; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.lede { font-size: clamp(1.0625rem, 1.9vw, 1.3rem); color: var(--ink-soft); max-width: 46ch; }
.eyebrow {
  font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-faint); margin: 0 0 .75rem;
}
.center { text-align: center; margin-inline: auto; }
.center .lede { margin-inline: auto; }

/* --------------------------------------------------------------- header -- */

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 1rem;
  min-height: 66px; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  margin-right: auto; text-decoration: none;
  /* The wordmark alone is ~42px tall; the padding carries the link past the
     44px minimum tap target without changing how the mark looks. */
  padding-block: 4px;
}
.brand img { width: 100px; }

.site-nav ul {
  list-style: none; display: flex; flex-wrap: wrap;
  align-items: center; gap: clamp(.9rem, 2.4vw, 1.75rem);
  margin: 0; padding: 0;
}
.site-nav a {
  color: var(--ink-soft); text-decoration: none; font-size: .95rem; font-weight: 600;
  padding: .35rem 0; display: inline-block;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--teal); }

@media (max-width: 660px) {
  .site-header .wrap { padding-block: .7rem; }
  .brand { margin-right: 0; width: 100%; }
  .site-nav { width: 100%; }
  .site-nav ul { justify-content: flex-start; }
}

/* --------------------------------------------------------------- buttons -- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .7rem 1.35rem;
  border-radius: 999px; border: 1.5px solid transparent;
  font-size: 1rem; font-weight: 650; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--teal-strong); border-color: var(--teal-strong); color: #fff; }
.btn-primary:hover { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn-cc { background: var(--cc-blue); border-color: var(--cc-blue); color: #fff; }
.btn-cc:hover { background: var(--cc-blue-strong); border-color: var(--cc-blue-strong); color: #fff; }
.btn-quiet { background: transparent; border-color: var(--rule); color: var(--ink); }
.btn-quiet:hover { border-color: var(--ink-faint); color: var(--ink); background: var(--ground-alt); }

@media (prefers-color-scheme: dark) {
  .btn-primary, .btn-primary:hover, .btn-cc, .btn-cc:hover { color: #08131a; }
}

.actions { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; }
.center .actions { justify-content: center; }

/* App Store badge.
   Apple's guidelines: use the supplied artwork unmodified, minimum 40px tall
   onscreen, with clear space of at least one quarter of the badge height.
   The badge is 119.66 x 40, so 48px tall keeps it comfortably above the floor. */
.appstore-badge { display: inline-block; line-height: 0; margin: 12px; border-radius: 9px; }
.appstore-badge img { height: 48px; width: auto; }
.actions .appstore-badge { margin: 0 12px 0 0; }
.actions .appstore-badge + * { margin-left: 0; }

/* ---------------------------------------------------------------- badges -- */

.pill {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .3rem .75rem; border-radius: 999px;
  font-size: .8rem; font-weight: 700; letter-spacing: .01em;
  background: var(--cc-wash); color: var(--cc-blue-strong);
  border: 1px solid color-mix(in srgb, var(--cc-blue) 25%, transparent);
}
.pill::before {
  content: ""; width: .5rem; height: .5rem; border-radius: 50%;
  background: currentColor; flex: none;
}
.pill-teal { background: var(--teal-wash); color: var(--teal-strong); border-color: color-mix(in srgb, var(--teal) 30%, transparent); }

/* -------------------------------------------------------------- sections -- */

section { padding-block: clamp(3rem, 8vw, 5.5rem); }
.section-alt { background: var(--ground-alt); }
.section-head {
  max-width: var(--measure);
  margin: 0 auto clamp(1.75rem, 4vw, 2.75rem);
  text-align: center;
}
.section-head .lede { margin-inline: auto; }

/* ------------------------------------------------------------------ hero -- */

.hero { padding-block: clamp(3rem, 9vw, 6rem) clamp(2.5rem, 7vw, 4.5rem); }
.hero h1 { margin-bottom: .6rem; }
.hero .lede { max-width: 52ch; }
.hero .actions { margin-top: 2rem; }

.hero-center .wrap { max-width: 60rem; text-align: center; }
.hero-center .lede { margin-inline: auto; }
.hero-center .actions { justify-content: center; }

/* CoreCredit launch banner */
.launch {
  display: grid; gap: clamp(1.75rem, 5vw, 3rem);
  grid-template-columns: 1fr;
  align-items: center;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  border-radius: var(--radius-lg);
  background: var(--cc-wash);
  border: 1px solid color-mix(in srgb, var(--cc-blue) 18%, transparent);
}
.launch-copy h2 { margin-top: .75rem; font-size: clamp(1.5rem, 3.2vw, 2rem); }
.launch-copy p { color: var(--ink-soft); max-width: 46ch; }
.launch-art { display: flex; justify-content: center; }
.launch-art img { width: min(230px, 62vw); border-radius: 26px; box-shadow: var(--shadow); }
@media (min-width: 820px) {
  .launch { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); }
  .launch-art { justify-content: flex-end; }
}

/* --------------------------------------------------------------- product -- */

.product-grid {
  display: grid; gap: clamp(1.25rem, 3vw, 1.75rem);
  /* Capped so a single product does not stretch across the whole container;
     two or more still sit side by side. */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 520px));
  justify-content: center;
}
.product-card {
  display: flex; flex-direction: column; gap: 1rem;
  padding: clamp(1.4rem, 3.2vw, 2rem);
  background: var(--card); border: 1px solid var(--rule);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.product-card-head { display: flex; align-items: flex-start; gap: 1rem; }
.product-card-head img { width: 64px; height: 64px; border-radius: 15px; flex: none; }
.product-card h3 { margin: 0 0 .35rem; }
.product-card .kicker { margin: 0; font-size: .9rem; color: var(--ink-faint); }
.product-card p { color: var(--ink-soft); margin-bottom: 0; }
.product-card .actions { margin-top: auto; padding-top: .5rem; }
.product-card ul { margin: 0; padding-left: 1.15rem; color: var(--ink-soft); }
.product-card li { margin-bottom: .35rem; }

/* ------------------------------------------------------------ feature set -- */

.features {
  display: grid; gap: clamp(1.25rem, 3vw, 1.75rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  list-style: none; margin: 0; padding: 0;
}
.features li {
  padding: clamp(1.15rem, 2.6vw, 1.5rem);
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius);
}
.features h3 { margin-bottom: .4rem; }
.features p { margin: 0; color: var(--ink-soft); font-size: .97rem; }

/* ------------------------------------------------------------------ steps -- */

.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.steps li {
  counter-increment: step;
  display: grid; grid-template-columns: 2.25rem 1fr; gap: 1rem; align-items: start;
  padding: 1rem 1.15rem; background: var(--card);
  border: 1px solid var(--rule); border-radius: var(--radius);
}
.steps li::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  background: var(--cc-wash); color: var(--cc-blue-strong);
  font-weight: 700; font-size: .95rem;
}
.steps strong, .steps span { grid-column: 2; }
.steps strong { display: block; }
.steps span { color: var(--ink-soft); font-size: .97rem; }

/* ------------------------------------------------------------- shot rail -- */

.shots {
  display: grid; gap: clamp(1rem, 2.5vw, 1.5rem);
  grid-auto-flow: column; grid-auto-columns: min(66vw, 260px);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding: .25rem .25rem 1.25rem;
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
  scrollbar-width: thin;
}
.shots figure { margin: 0; scroll-snap-align: center; }
.shots img {
  width: 100%; border-radius: 22px;
  border: 1px solid var(--rule); box-shadow: var(--shadow);
  background: var(--ground-alt);
}
.shots figcaption {
  margin-top: .85rem; font-size: .92rem; color: var(--ink-soft);
  text-align: center; text-wrap: pretty;
}
.shots figcaption b { display: block; color: var(--ink); font-weight: 650; }

/* A swipe rail is right on a phone, but a tablet has room to lay the gallery
   out two-up, and a desktop four-up. */
@media (min-width: 640px) {
  .shots {
    grid-auto-flow: row; grid-auto-columns: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow-x: visible; scroll-snap-type: none;
    margin-inline: 0; padding-inline: .25rem;
    gap: clamp(1.25rem, 3vw, 2rem);
    max-width: 680px; margin-inline: auto;
  }
}

@media (min-width: 900px) {
  .shots { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: none; }
}

.shot-wide { margin-top: clamp(1.5rem, 4vw, 2.5rem); }
.shot-wide img { border-radius: 18px; border: 1px solid var(--rule); box-shadow: var(--shadow); }
.shot-wide figcaption { margin-top: .85rem; font-size: .92rem; color: var(--ink-soft); text-align: center; }
.shot-note { font-size: .88rem; color: var(--ink-faint); margin-top: 1rem; }

/* ------------------------------------------------------------ prose block -- */

.prose { max-width: var(--measure); margin-inline: auto; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .5rem; }

.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.facts li {
  display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: .25rem 1.25rem;
  padding: .7rem 0; border-top: 1px solid var(--rule);
}
.facts li:last-child { border-bottom: 1px solid var(--rule); }
.facts dfn, .facts b { font-style: normal; font-weight: 650; color: var(--ink); }
.facts span { color: var(--ink-soft); }
@media (max-width: 560px) { .facts li { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ cta --- */

.cta {
  text-align: center;
  padding: clamp(2rem, 6vw, 3.25rem) clamp(1.25rem, 4vw, 2.5rem);
  border-radius: var(--radius-lg);
  background: var(--card); border: 1px solid var(--rule); box-shadow: var(--shadow);
}
.cta h2 { margin-bottom: .5rem; }
.cta p { color: var(--ink-soft); max-width: 48ch; margin-inline: auto; }
.cta .actions { justify-content: center; margin-top: 1.5rem; }

/* --------------------------------------------------------------- footer -- */

.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--ground-alt);
  padding-block: clamp(2.5rem, 6vw, 3.5rem);
  font-size: .95rem;
}
.footer-grid {
  display: grid; gap: clamp(1.75rem, 4vw, 2.5rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
}
.site-footer h2 {
  font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-faint); margin: 0 0 .85rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .5rem; }
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.site-footer .brand { padding-block: 5px; }
.site-footer .brand img { width: 92px; }
.footer-about p { color: var(--ink-soft); max-width: 34ch; margin: .9rem 0 0; }
.legal {
  margin-top: clamp(2rem, 5vw, 2.75rem); padding-top: 1.5rem;
  border-top: 1px solid var(--rule); color: var(--ink-faint); font-size: .88rem;
}
.legal p { margin: 0 0 .4rem; }

/* ------------------------------------------------------------------- 404 -- */

.notfound { display: grid; place-items: center; min-height: 58vh; text-align: center; }
.notfound .wrap { max-width: 44rem; }

/* ----------------------------------------------------- product page bits -- */
/* Kept in the stylesheet rather than inline so the Content-Security-Policy in
   _headers can stay at style-src 'self' with no 'unsafe-inline'. */

.product-hero-icon {
  width: 88px; height: 88px;
  border-radius: 20px;
  margin-bottom: 1.25rem;
}
.steps-block { margin-top: 2rem; max-width: var(--measure); margin-inline: auto; }
.legal-bare { margin-top: 0; border-top: 0; padding-top: 0; }
