/* Openline marketing site: page sections on the white page, at rest.
   Patterns (Retell-derived): grey #f5f5fa cards with a floating white UI
   fragment and the caption at the bottom left; hairline rows with the title at
   left and the copy at right; 8px gaps between cards; one card radius (10px).
   motion.css (loaded last) adds entrances, vignette sequences and hover. */

/* ---------- hairline rows: how it works, more use cases, trust ---------- */

.rows {
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--line-strong);
}

.row {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 32px;
  row-gap: 8px;
  align-items: baseline;
  padding: 32px 0 48px;
}

.rows-split .row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.row::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--line-strong);
  transform-origin: left center;
}

.row-num {
  font-size: var(--fs-micro);
  color: var(--muted);
}

.row p {
  max-width: 360px;
  font-size: var(--fs-sm);
  line-height: 1.43;
  color: var(--text);
}

/* ---------- features: 2 x 2 bento ---------- */

.bento,
.channels {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.tile,
.channel {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  border-radius: var(--r-sm);
  background: var(--surface);
}

.tile {
  min-height: clamp(420px, 36vw, 520px);
  padding-bottom: clamp(24px, 2.4vw, 32px);
}

.viz {
  display: grid;
  place-items: center;
  padding: 48px 24px 32px;
}

.tile-cap,
.channel-cap {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 0 clamp(24px, 2.4vw, 32px);
}

.tile-cap p,
.channel-cap p {
  max-width: 44ch;
  font-size: var(--fs-sm);
  line-height: 1.43;
  color: var(--muted);
}

/* ---------- channels: three equal cards, fragment above, caption below ---------- */

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

.channel {
  grid-template-rows: minmax(220px, 1fr) auto;
  min-height: 400px;
  padding-bottom: 28px;
}

.channel .viz {
  padding: 40px 24px 28px;
}

/* ---------- product fragments: white UI floating on the grey cards ---------- */

.frag {
  width: 100%;
  max-width: 320px;
  margin: 0;
  padding: 14px;
  border-radius: var(--r-sm);
  background: var(--paper);
  box-shadow: var(--shadow-frag);
  font-size: var(--fs-frag);
  line-height: 1.45;
  letter-spacing: -0.02em;
  color: var(--ink);
  list-style: none;
  text-align: left;
}

.frag b {
  font-weight: 500;
}

.frag i {
  font-style: normal;
}

.frag-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 0 2px 12px;
  border-bottom: 1px solid var(--line);
}

.msg {
  max-width: 86%;
  padding: 8px 12px;
  border-radius: 14px 14px 4px 14px;
  background: var(--ink);
  color: var(--bg);
}

.msg-file {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.msg-file svg {
  flex: none;
  width: 18px;
  height: 18px;
}

.msg-file > span {
  display: grid;
}

.frag-log {
  padding: 6px;
}

.frag-log li {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  gap: 0 10px;
  padding: 10px 8px;
}

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

.frag-log svg {
  grid-row: span 2;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--muted);
}

.frag-log i {
  grid-column: 2 / -1;
}

.fact {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
}

.fact span {
  flex: 1;
}

.fact i {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: var(--fs-micro);
  font-weight: 500;
}

.fact[data-a="hl"]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 8px;
  background: var(--surface);
}

.contact-note {
  color: var(--text);
}

.contact-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-weight: 500;
}

.contact-check svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-check path {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.frag-record {
  max-width: 400px;
}

.tabs {
  display: flex;
  gap: 4px;
}

.tabs span {
  padding: 5px 10px;
  border-radius: 6px;
}

.tabs .is-on {
  background: var(--surface);
  font-weight: 500;
  color: var(--ink);
}

.record-text {
  margin: 14px 2px;
  line-height: 1.55;
}

.record-task {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 2px 0;
  border-top: 1px solid var(--line);
}

.record-task .meta {
  margin-left: auto;
}

.side-box {
  flex: none;
  width: 14px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-radius: 4px;
  opacity: 0.45;
}

.frag-channel {
  display: grid;
  justify-items: start;
  max-width: 300px;
}

.frag-channel .frag-head {
  justify-self: stretch;
}

.frag-channel .msg {
  max-width: 100%;
  border-radius: 14px 14px 14px 4px;
}

/* ---------- languages: photograph + hairline rows ---------- */

.language-story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: stretch;
}

.language-photo {
  position: relative;
  min-height: clamp(420px, 42vw, 580px);
  margin: 0;
  overflow: hidden;
  border-radius: var(--r-sm);
  background: var(--surface);
}

.language-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.language-photo figcaption,
.photo-note {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(0, 18, 46, 0.66);
  font-size: var(--fs-micro);
  color: #ffffff;
}

.langs {
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--line-strong);
}

.lang {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 22px 0 24px;
  border-top: 1px solid var(--line-strong);
}

.lang-name {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.lang-en {
  font-size: var(--fs-micro);
  letter-spacing: -0.01em;
  color: var(--muted);
}

/* Arabic lines read right to left inside the same row */
.lang-line[dir="rtl"] {
  text-align: right;
}

.lang-line {
  max-width: 34em;
  font-size: var(--fs-body);
  line-height: 1.5;
  color: var(--ink);
}

.lang-tr {
  font-size: var(--fs-sm);
  color: var(--muted);
}

/* ---------- use cases: photo cards ---------- */

.industry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.industry-card {
  display: grid;
  align-content: start;
  padding: 8px;
  overflow: hidden;
  border-radius: var(--r-sm);
  background: var(--surface);
}

.industry-image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--r-btn);
  background: var(--surface-2);
}

.industry-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.industry-copy {
  display: grid;
  gap: 8px;
  padding: 20px 16px 16px;
}

.industry-tag {
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.industry-copy > p:last-child {
  font-size: var(--fs-sm);
  line-height: 1.43;
  color: var(--muted);
}

.industry-disclosure {
  margin: 16px 0 clamp(56px, 7vw, 96px);
  font-size: var(--fs-micro);
  color: var(--muted);
}

/* ---------- FAQ: centred title, full-width rows, round chevrons ---------- */

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

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  color: var(--ink);
  font-size: var(--fs-faq);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.03em;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::before {
  content: "";
  order: 2;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface);
  transition: background-color 200ms var(--ease);
}

.faq summary::after {
  content: "";
  position: absolute;
  right: 12.5px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -5px;
  border-right: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  transform: rotate(45deg);
  transition: transform 300ms var(--ease-out);
}

.faq details[open] summary::after {
  transform: translateY(3px) rotate(225deg);
}

@media (hover: hover) {
  .faq summary:hover::before {
    background: var(--surface-2);
  }
}

.faq details p {
  max-width: 64ch;
  padding: 0 56px 28px 0;
  line-height: 1.55;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* ---------- responsive ---------- */

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

  .industry-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .bento,
  .channels,
  .industry-grid,
  .language-story {
    grid-template-columns: minmax(0, 1fr);
  }

  .industry-card:last-child {
    grid-column: auto;
  }

  .channel {
    min-height: 0;
  }

  .tile {
    min-height: 0;
  }

  .row,
  .rows-split .row {
    grid-template-columns: minmax(0, 1fr);
    padding: 24px 0 32px;
  }

  .language-photo {
    min-height: 0;
    aspect-ratio: 4 / 5;
  }
}

@media (max-width: 560px) {
  .viz {
    padding: 36px 16px 28px;
  }

  .faq details p {
    padding-right: 0;
  }
}

/* ---------- features: full-width payments tile ---------- */

.tile-wide {
  grid-column: 1 / -1;
  min-height: clamp(380px, 30vw, 460px);
}

.frag-pay {
  max-width: 300px;
}

.pay-invoice {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface);
}

.pay-invoice b {
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.pay-btn {
  margin: 10px 0 0;
  padding: 9px 12px;
  border-radius: var(--r-btn);
  background: var(--ink);
  color: var(--bg);
  font-weight: 500;
  text-align: center;
}

.pay-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 2px 0;
  color: #1f8a4c;
}

:root[data-theme="dark"] .pay-status {
  color: #4ade80;
}

.pay-status svg {
  width: 18px;
  height: 11px;
}

.pay-status .meta {
  margin-left: auto;
  color: var(--muted);
}

@media (min-width: 761px) {
  .tile-wide {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: none;
    align-items: center;
    min-height: clamp(320px, 26vw, 400px);
  }

  .tile-wide .tile-cap {
    order: -1;
    max-width: 420px;
  }
}
