/* ImageSetta marketing site
   Palette from the iOS app: system grouped backgrounds + AccentColor #3683F6
   (sRGB 0.212, 0.576, 0.965). Tool tile hues match HomeView. */

:root {
  --bg: #f2f2f7;
  --bg-elevated: #ffffff;
  --ink: #1c1c1e;
  --ink-secondary: #3a3a3c;
  --muted: #636366;
  --line: rgba(60, 60, 67, 0.18);
  --line-strong: rgba(60, 60, 67, 0.28);
  --accent: #3683f6;
  --accent-ink: #ffffff;
  --focus: #0055d4;
  --radius-app: 22.37%;
  --radius-device: 44px;
  --radius-panel: 16px;
  --space: 8px;
  --measure: 38rem;
  --page: min(1120px, calc(100% - 40px));
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Segoe UI", system-ui, sans-serif;
  --font-rounded: -apple-system, BlinkMacSystemFont, "SF Pro Rounded",
    "Segoe UI", system-ui, sans-serif;
  --blue: #007aff;
  --purple: #af52de;
  --teal: #30b0c7;
  --orange: #ff9500;
  --indigo: #5856d6;
  --brown: #a2845e;
  --green: #34c759;
  --cyan: #32ade6;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--focus);
}

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

.skip {
  position: absolute;
  inset-inline-start: 12px;
  top: 12px;
  z-index: 20;
  padding: 8px 12px;
  background: var(--bg-elevated);
  color: var(--ink);
  transform: translateY(-200%);
}

.skip:focus {
  transform: none;
}

.wrap {
  width: var(--page);
  max-width: 100%;
  margin-inline: auto;
  min-width: 0;
  overflow: visible;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 94%, white);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 12px;
  min-height: 56px;
  padding-block: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
  flex: 1 1 auto;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  margin-inline-start: auto;
  position: relative;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: calc(32px * 0.2237);
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-rounded);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  unicode-bidi: isolate;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

html[dir="rtl"] .nav {
  justify-content: flex-start;
}

.nav a {
  color: var(--ink-secondary);
  text-decoration: none;
  font-size: 0.94rem;
}

.nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

.nav a:hover {
  color: var(--ink);
}

.nav-panel {
  position: static;
}

.nav-panel > summary {
  list-style: none;
  cursor: pointer;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--ink);
  font-size: 0.86rem;
}

.nav-panel > summary::-webkit-details-marker {
  display: none;
}

.lang-switch {
  position: relative;
}

.lang-switch > summary {
  list-style: none;
  cursor: pointer;
  min-height: 44px;
  max-width: 12.5rem;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--ink);
  font-size: 0.86rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lang-switch > summary::-webkit-details-marker {
  display: none;
}

.lang-switch[open] > summary,
.nav-panel[open] > summary {
  font-weight: 600;
}

.lang-switch ul {
  position: absolute;
  inset-inline-end: 0;
  z-index: 30;
  margin: 8px 0 0;
  padding: 8px;
  max-height: min(70vh, 420px);
  overflow: auto;
  list-style: none;
  background: var(--bg-elevated);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  min-width: 14rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.lang-switch-label {
  margin: 8px 12px 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.lang-switch a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  unicode-bidi: isolate;
  text-align: start;
}

.lang-switch a[aria-current="true"] {
  font-weight: 600;
  background: var(--bg);
}

.lang-switch a:hover {
  background: var(--bg);
}

.store-chip {
  display: inline-flex;
  align-items: center;
  margin-inline-start: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  background: var(--bg-elevated);
  cursor: default;
}

.store-chip[href] {
  color: var(--ink);
  text-decoration: none;
}

/* Hero */

.hero {
  padding: 40px 0 28px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

.hero-grid > * {
  min-width: 0;
}

.hero figure {
  max-width: 100%;
}

.kicker {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  letter-spacing: -0.03em;
  line-height: 1.12;
  overflow-wrap: break-word;
}

h1 {
  margin: 0 0 16px;
  font-size: clamp(2.05rem, 7vw, 3.35rem);
  font-weight: 700;
  text-wrap: balance;
}

h2 {
  text-wrap: pretty;
}

.lede {
  margin: 0;
  max-width: 36rem;
  color: var(--ink-secondary);
  font-size: 1.125rem;
  text-wrap: pretty;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  color: var(--accent-ink);
  background: var(--focus);
}

.btn-quiet {
  color: var(--ink-secondary);
  background: transparent;
  border: 1px solid var(--line-strong);
}

.btn-quiet:hover {
  color: var(--ink);
}

.btn[aria-disabled="true"] {
  background: var(--bg-elevated);
  color: var(--muted);
  border: 1px solid var(--line);
  cursor: not-allowed;
}

.note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

/* Device / screenshot frame */

.device {
  width: min(100%, 320px);
  max-width: 100%;
  margin-inline: auto;
  padding: 12px;
  background: #1c1c1e;
  border-radius: var(--radius-device);
  box-shadow: 0 24px 48px rgba(28, 28, 30, 0.16);
}

.device-screen {
  position: relative;
  aspect-ratio: 9 / 19.5;
  overflow: hidden;
  background: var(--bg);
  border-radius: calc(var(--radius-device) - 8px);
}

.device-screen .placeholder {
  overflow: auto;
}

.shot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.placeholder {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 12px;
  height: 100%;
  padding: 22px 18px;
  color: var(--ink);
}

.placeholder-label {
  align-self: flex-start;
  padding: 3px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-secondary);
}

.placeholder h3 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.placeholder p,
.placeholder ol {
  margin: 0;
  color: var(--ink-secondary);
  font-size: 0.86rem;
}

.placeholder ol {
  padding-inline-start: 1.1rem;
}

.shot-caption {
  margin: 12px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  overflow-wrap: break-word;
}

/* Sections */

.section {
  padding: 56px 0;
  overflow: visible;
  min-width: 0;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: var(--measure);
  margin-bottom: 28px;
  overflow: visible;
}

.section-head h2 {
  margin: 0 0 10px;
  font-size: clamp(1.55rem, 3vw, 2rem);
}

.section-head p {
  margin: 0;
  color: var(--ink-secondary);
}

/* Tools — one grouped list, matching HomeView */

.tool-list {
  overflow: hidden;
  background: var(--bg-elevated);
  border-radius: var(--radius-panel);
}

.tool {
  display: grid;
  grid-template-columns: 30px minmax(0, 11rem) 1fr;
  gap: 12px 16px;
  align-items: start;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.tool:last-child {
  border-bottom: 0;
}

.tool-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: calc(30px * 0.2237);
  color: #fff;
}

.tool-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tool h3 {
  margin: 0;
  padding-top: 5px;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.3;
}

.tool p {
  margin: 0;
  padding-top: 4px;
  color: var(--ink-secondary);
  font-size: 0.94rem;
}

/* Product shots */

.shot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.shot-card .device {
  width: min(100%, 280px);
}

.shot-card h3 {
  margin: 16px 0 6px;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.shot-card p {
  margin: 0;
  max-width: 28rem;
  color: var(--ink-secondary);
  font-size: 0.94rem;
}

/* Facts */

.facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  background: var(--bg-elevated);
  border-radius: var(--radius-panel);
}

.fact {
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.fact:last-child {
  border-bottom: 0;
}

.fact h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  letter-spacing: -0.015em;
}

.fact p {
  margin: 0;
  color: var(--ink-secondary);
}

.languages {
  color: var(--ink-secondary);
  font-size: 0.95rem;
  max-width: 46rem;
}

/* Footer */

.site-footer {
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  align-items: baseline;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.footer-links a {
  color: var(--ink-secondary);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink);
}

/* Inner pages */

.page {
  padding: 40px 0 72px;
}

.page h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}

.prose {
  max-width: 40rem;
}

.prose h2 {
  margin: 2rem 0 0.6rem;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.prose h3 {
  margin: 1.35rem 0 0.4rem;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

.legal-meta {
  color: var(--ink-secondary);
  font-size: 0.92rem;
  margin: 0 0 1.4rem;
}

.prose p,
.prose li {
  color: var(--ink-secondary);
}

.prose ul {
  padding-inline-start: 1.2rem;
}

.legal-banner {
  margin: 0 0 28px;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border-inline-start: 3px solid var(--accent);
  color: var(--ink-secondary);
  font-size: 0.92rem;
}

.legal-master h2 .section-no {
  unicode-bidi: isolate;
  direction: ltr;
}

.legal-master h2,
.legal-master h3,
.legal-master p,
.legal-master li {
  overflow-wrap: anywhere;
  word-break: normal;
  max-width: 100%;
}

a[href^="mailto:"],
.legal-master a[href^="mailto:"] {
  unicode-bidi: isolate;
  direction: ltr;
}

html[dir="rtl"] .kicker {
  letter-spacing: 0.04em;
}

html[dir="rtl"] .device-screen .shot {
  /* App screenshots are already captured in the page locale, including RTL UI. */
  object-position: top center;
}

.demo-pair {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  min-width: 0;
}

.compare {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
  min-width: 0;
}

.compare-pane {
  margin: 0;
  min-width: 0;
}

.compare-pane figcaption {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.compare-frame {
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 18px 40px rgba(28, 28, 30, 0.08);
}

.compare-img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.compare-join {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
}

.compare-join-end {
  display: none;
}

.compare-join-down {
  display: block;
}

html[dir="rtl"] .compare-join-end {
  transform: scaleX(-1);
}

.shot-missing {
  height: 100%;
  padding: 22px 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

html[dir="rtl"] .tool-icon svg,
html[dir="rtl"] .brand img {
  /* Brand mark and decorative icons stay unflipped. */
}

@media (max-width: 899px) {
  .lang-kicker {
    display: none;
  }

  .lang-switch > summary {
    max-width: 9.5rem;
  }

  .header-tools > .nav {
    display: none;
  }

  .nav-panel[open] ~ .nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    position: absolute;
    top: calc(100% + 6px);
    inset-inline-end: 0;
    z-index: 30;
    width: max-content;
    min-width: 12rem;
    max-width: min(18rem, calc(100vw - 24px));
    padding: 8px;
    gap: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  }

  .nav-panel[open] ~ .nav a,
  .nav-panel[open] ~ .nav .store-chip {
    display: flex;
    align-items: center;
    min-height: 44px;
    margin: 0;
    padding: 8px 12px;
    border-radius: 8px;
  }

  .nav-panel[open] ~ .nav .store-chip {
    display: none;
  }
}

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

  .header-tools > .nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    position: static;
    width: auto;
  }

  .lang-kicker {
    display: inline;
  }

  .lang-switch > summary {
    max-width: none;
  }
}

/* Breakpoints requested in the brief */

@media (min-width: 430px) {
  :root {
    --page: min(1120px, calc(100% - 48px));
  }
}

@media (min-width: 768px) {
  .hero {
    padding: 72px 0 32px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(240px, 320px);
    gap: 56px;
  }

  .hero .device {
    margin-inline: 0 0 auto;
  }

  .tool {
    grid-template-columns: 30px 13rem 1fr;
  }

  .shot-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }

  .demo-pair {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .compare {
    grid-template-columns: 1fr auto 1fr;
    gap: 20px 16px;
    align-items: center;
  }

  .compare-join {
    padding-top: 1.6rem;
  }

  .compare-join-end {
    display: block;
  }

  .compare-join-down {
    display: none;
  }

  .facts {
    grid-template-columns: 1fr 1fr;
  }

  .fact:nth-child(odd) {
    border-inline-end: 1px solid var(--line);
  }

  .fact:nth-last-child(-n + 2) {
    border-bottom: 0;
  }
}

@media (min-width: 1440px) {
  :root {
    --page: 1200px;
  }

  .hero {
    padding: 88px 0 40px;
  }
}

@media (max-width: 374px) {
  :root {
    --page: calc(100% - 24px);
  }

  .site-header .wrap {
    gap: 8px;
  }

  .lang-switch ul {
    inset-inline-end: auto;
    inset-inline-start: 0;
  }

  .tool {
    grid-template-columns: 30px 1fr;
  }

  .tool p {
    grid-column: 1 / -1;
    padding-top: 0;
  }
}
