/* ==========================================================================
   CombinePix — shared shell styles
   Tokens are taken from the generator's editor palette (its primary button is
   #0052cc) so the site and the tool read as one product.
   ========================================================================== */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
}

:root {
  /* brand */
  --primary: #0052cc;
  --primary-hover: #0041a3;
  --primary-soft: #e9f2ff;
  --primary-ring: rgba(0, 82, 204, 0.3);

  /* text */
  --ink: #172b4d;
  --text: #42526e;
  --muted: #6b7f99;

  /* surfaces */
  --bg: #ffffff;
  --surface: #f4f5f7;
  --surface-soft: #f7f9fb;
  --line: #dfe1e6;
  --line-soft: #e8ebf0;

  /* metrics */
  --content: 1120px;
  --tool: 980px;
  --radius: 12px;
  --radius-lg: 18px;

  /* elevation */
  --shadow-sm: 0 1px 2px rgba(9, 30, 66, 0.08);
  --shadow-md: 0 10px 24px -14px rgba(9, 30, 66, 0.28);
  --shadow-lg: 0 24px 48px -28px rgba(9, 30, 66, 0.35);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

ul {
  margin: 0;
  padding: 0;
}

:focus-visible {
  outline: 3px solid var(--primary-ring);
  outline-offset: 2px;
  border-radius: 6px;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: #fff;
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 0 0 10px 0;
  box-shadow: var(--shadow-md);
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
}

/* ---------------------------------------------------------------- layout */

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

@media (min-width: 768px) {
  .container {
    padding-inline: 32px;
  }
}

/* Block spacing only: these classes may sit on a .container, so they must not
   touch the inline padding that keeps content off the screen edges. */
.section {
  padding-block: 64px 8px;
}

.section--tight {
  padding-block: 40px 0;
}

.section--surface {
  margin-top: 64px;
  padding: 64px 0;
  background: var(--surface-soft);
  border-block: 1px solid var(--line-soft);
}

.section-head {
  max-width: 62ch;
}

.section-head h2 {
  font-size: 1.55rem;
}

.section-head p {
  margin-top: 10px;
  color: var(--text);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.brand:hover {
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  flex: none;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}

.nav-link:hover {
  background: var(--primary-soft);
  color: var(--primary);
  text-decoration: none;
}

.nav-cta {
  margin-left: 8px;
}

/* Tools dropdown: opens on hover, on keyboard focus, and on click/tap */

.nav-dropdown {
  position: relative;
}

.chevron {
  transition: transform 0.18s ease;
}

.nav-dropdown:hover .chevron,
.nav-dropdown.is-open .chevron,
.nav-dropdown:focus-within .chevron {
  transform: rotate(180deg);
}

.dropdown-panel {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 340px;
  padding-top: 10px;
  transform: translate(-50%, 6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel,
.nav-dropdown.is-open .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.dropdown-card {
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
}

.dropdown-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--ink);
}

.dropdown-item:hover {
  background: var(--primary-soft);
  text-decoration: none;
}

.di-title {
  font-size: 15px;
  font-weight: 600;
}

.di-desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

/* hamburger + mobile panel */

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.menu-toggle:hover {
  border-color: #b9cdf0;
  color: var(--primary);
}

.menu-toggle .icon-close {
  display: none;
}

.menu-toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.menu-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

.mobile-menu {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 8px 0 16px;
  max-height: calc(100dvh - 66px);
  overflow-y: auto;
}

.mm-label {
  margin: 14px 0 2px;
  padding: 0 24px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.mm-link {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 24px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
}

.mm-link:hover {
  background: var(--surface-soft);
  text-decoration: none;
}

@media (max-width: 900px) {
  .primary-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: #fff;
}

.btn-ghost {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: #b9cdf0;
  background: #fbfdff;
  color: var(--primary);
}

.btn-sm {
  min-height: 38px;
  padding: 0 14px;
  font-size: 14.5px;
}

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

.hero {
  padding: 64px 0 8px;
}

.eyebrow {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

.hero h1,
.page-hero h1 {
  font-size: clamp(1.9rem, 3.8vw, 2.7rem);
  letter-spacing: -0.025em;
}

.page-hero h1 {
  max-width: 30ch;
}

.lede {
  margin-top: 16px;
  max-width: 64ch;
  font-size: 1.0625rem;
  color: var(--text);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.page-hero {
  padding: 48px 0 0;
}

/* ---------------------------------------------------------------- cards */

.cards {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.card {
  display: flex;
  flex-direction: column;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

a.card:hover {
  border-color: #b9cdf0;
  box-shadow: var(--shadow-md);
  text-decoration: none;
  transform: translateY(-1px);
}

.card h2,
.card h3 {
  font-size: 1.0625rem;
  margin-bottom: 6px;
}

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

.card-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  border-radius: 11px;
  background: var(--primary-soft);
  color: var(--primary);
}

.card-more {
  display: inline-block;
  margin-top: auto;
  padding-top: 12px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--primary);
}

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

.steps {
  display: grid;
  gap: 16px;
  margin-top: 28px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.step {
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.step h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.step p {
  font-size: 15px;
  color: var(--text);
}

/* ---------------------------------------------------------------- tool shell */

.tool-shell {
  max-width: var(--tool);
  margin: 32px auto 0;
}

/* The homepage mount point stays invisible until the editor fills it: the
   dashed frame only exists while the div is empty. */
#combine-tool:empty {
  min-height: 380px;
  border: 1px dashed #c4d2e4;
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
}

.tool-note {
  margin-top: 10px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

/* preset shortcut under the editor */
.preset-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  margin-top: 14px;
}

.preset-bar .btn[aria-pressed="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.preset-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.65;
}

.preset-status {
  font-size: 13.5px;
  color: var(--muted);
  min-height: 1em;
}

/* ---------------------------------------------------------------- tables */

.table-wrap {
  margin-top: 24px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.sizes-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.sizes-table th,
.sizes-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}

.sizes-table thead th {
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sizes-table tbody tr:last-child td {
  border-bottom: 0;
}

.sizes-table td:first-child {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.section-note {
  margin-top: 22px;
  max-width: 74ch;
  font-size: 15px;
  color: var(--text);
}

.tool-placeholder {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 320px;
  padding: 48px 24px;
  background: var(--surface-soft);
  border: 1px dashed #c4d2e4;
  border-radius: var(--radius-lg);
  text-align: center;
}

.tool-placeholder svg {
  color: var(--muted);
  opacity: 0.7;
}

.tp-title {
  font-size: 1.0625rem;
  font-weight: 650;
  color: var(--ink);
}

.tp-note {
  max-width: 44ch;
  font-size: 14.5px;
  color: var(--muted);
}

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

.prose {
  max-width: 72ch;
  padding-block: 44px 24px;
}

.prose h1 {
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  margin-bottom: 6px;
}

.prose .updated {
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--muted);
}

.prose h2 {
  margin: 34px 0 10px;
  font-size: 1.2rem;
}

.prose p + p {
  margin-top: 12px;
}

.prose ul {
  margin: 10px 0 0;
  padding-left: 1.15em;
  list-style: disc;
}

.prose li {
  margin: 4px 0;
}

.prose .lede {
  margin-top: 4px;
  margin-bottom: 8px;
}

.callout {
  margin: 18px 0 10px;
  padding: 14px 18px;
  border-left: 3px solid var(--primary);
  border-radius: 0 10px 10px 0;
  background: var(--primary-soft);
  font-size: 15px;
  color: var(--ink);
}

/* ---------------------------------------------------------------- lists */

.check-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 26px;
  font-size: 15px;
  color: var(--text);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: rotate(-45deg);
}

/* ---------------------------------------------------------------- faq */

.faq-list {
  display: grid;
  gap: 20px;
  margin-top: 28px;
  max-width: 82ch;
}

.faq-item h3 {
  margin-bottom: 6px;
  font-size: 1.0625rem;
}

.faq-item p {
  color: var(--text);
}

/* ---------------------------------------------------------------- plans */

.plans {
  display: grid;
  gap: 16px;
  margin-top: 32px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1080px) {
  .plans {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.plan--featured {
  border-color: #b9cdf0;
  box-shadow: var(--shadow-md);
}

.plan-badge {
  position: absolute;
  top: -11px;
  left: 20px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.plan-note {
  margin-top: 24px;
  max-width: 80ch;
  font-size: 15px;
  color: var(--text);
}

.plan-status {
  margin-top: 12px;
  min-height: 1.4em;
  font-size: 14.5px;
  color: var(--muted);
}

.plan-status.is-error {
  color: #b42318;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 6px;
  color: var(--ink);
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.plan-price small {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}

.plan .check-list {
  margin-top: 12px;
  margin-bottom: 20px;
}

.plan .btn {
  margin-top: auto;
  align-self: stretch;
  width: 100%;
}

.tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  vertical-align: middle;
}

/* ---------------------------------------------------------------- templates */

.tpl-block {
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  align-items: center;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--line-soft);
}

.tpl-block:first-of-type {
  border-top: 0;
  margin-top: 8px;
  padding-top: 0;
}

@media (max-width: 760px) {
  .tpl-block {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
}

.tpl-preview {
  padding: 14px;
  background: var(--surface);
  border-radius: var(--radius-lg);
}

.tpl-preview svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.tpl-body h2 {
  font-size: 1.25rem;
  scroll-margin-top: 90px;
}

.tpl-body p {
  margin-top: 10px;
  color: var(--text);
}

.tpl-body .tpl-link {
  display: inline-block;
  margin-top: 14px;
  font-weight: 600;
}

/* ---------------------------------------------------------------- breadcrumb */

.breadcrumb {
  padding-top: 22px;
  font-size: 14px;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb span {
  color: var(--ink);
}

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

.cta-band {
  margin-top: 64px;
  padding: 44px 32px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  text-align: center;
}

.cta-band h2 {
  font-size: 1.5rem;
}

.cta-band p {
  margin-top: 10px;
  color: var(--text);
}

.cta-band .hero-actions {
  justify-content: center;
}

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

.site-footer {
  margin-top: 80px;
  padding: 56px 0 28px;
  background: var(--surface-soft);
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 760px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
  }
}

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

.footer-title {
  margin-bottom: 14px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

.footer-list {
  display: grid;
  gap: 10px;
  list-style: none;
}

.footer-list a {
  color: var(--text);
  font-size: 15px;
}

.footer-list a:hover {
  color: var(--primary);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}

.footer-bottom p {
  margin: 0;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
