/* thetical.co — one family across both scripts (IBM Plex Sans + Plex Sans Arabic). One accent,
   emerald, reserved for the moment the user approves something. */
:root {
  --paper: #f5f6f3;
  --ink: #18233a;
  --slate: #566173;
  --line: #d8dde3;
  --bubble: #e4eaf3;
  --approve: #1f7a5a;
  --approve-ink: #ffffff;
  --measure: 66ch;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, sans-serif;
}

:lang(ar), .ar { font-family: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, sans-serif; }

a { color: inherit; text-underline-offset: 0.18em; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--approve); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; }

/* ---------------------------------------------------------------- header */
.site-head { display: flex; align-items: center; justify-content: space-between; padding: 1.5rem 0; }
.brand { font-weight: 600; font-size: 1.25rem; letter-spacing: -0.01em; text-decoration: none; }
.brand .ar { font-weight: 500; color: var(--slate); margin-inline-start: 0.5rem; font-size: 1.05rem; }
.site-head nav a { color: var(--slate); text-decoration: none; margin-inline-start: 1.25rem; font-size: 0.95rem; }
.site-head nav a:hover { color: var(--ink); text-decoration: underline; }

/* ---------------------------------------------------------------- hero */
.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 4rem; align-items: center; padding: 3.5rem 0 5rem; }
.hero h1 { margin: 0; font-weight: 600; font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1.02; letter-spacing: -0.035em; }
.hero h1 .ar { display: block; width: fit-content; margin-top: 0.6rem; font-weight: 500; font-size: 0.62em; letter-spacing: 0; line-height: 1.35; color: var(--slate); }
.hero .lede { max-width: 34rem; margin: 2rem 0 2.25rem; font-size: 1.2rem; color: var(--slate); }
.cta { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.85rem 1.4rem; border-radius: 999px; background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 500; }
.cta:hover { background: #24324f; }
.cta-note { display: block; margin-top: 0.9rem; font-size: 0.9rem; color: var(--slate); }

/* The chat: the one rich element on the page. */
.chat { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 1.25rem; box-shadow: 0 30px 60px -40px rgba(24, 35, 58, 0.45); }
.chat-top { display: flex; align-items: center; gap: 0.6rem; padding: 0 0.25rem 1rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; font-weight: 600; font-size: 0.95rem; }
.chat-top .dot { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-size: 0.85rem; }
.chat-top small { display: block; font-weight: 400; color: var(--slate); font-size: 0.8rem; }
.msg { max-width: 88%; padding: 0.7rem 0.95rem; border-radius: 16px; margin: 0 0 0.6rem; font-size: 0.95rem; line-height: 1.45; }
.msg.them { background: var(--bubble); border-bottom-left-radius: 6px; }
.msg.me { background: var(--ink); color: var(--paper); margin-inline-start: auto; margin-top: 1rem; border-bottom-right-radius: 6px; width: fit-content; }
.card { border: 1px solid var(--line); border-radius: 14px; padding: 0.9rem 1rem; margin: 0.2rem 0 0.6rem; max-width: 92%; font-size: 0.92rem; }
.card strong { display: block; margin-bottom: 0.35rem; }
.card p { margin: 0 0 0.75rem; color: var(--slate); }
.card .buttons { display: flex; gap: 0.5rem; }
.card .yes, .card .no { flex: 1; border-radius: 10px; padding: 0.55rem 0; text-align: center; font-weight: 600; font-size: 0.9rem; }
.card .yes { background: var(--approve); color: var(--approve-ink); }
.card .no { border: 1px solid var(--line); color: var(--slate); }
.done { font-size: 0.88rem; color: var(--approve); font-weight: 500; margin: 0.4rem 0 0; }
@media (prefers-reduced-motion: no-preference) {
  .card .yes { animation: press 3.2s ease-in-out 1.2s 1 both; }
  .done { animation: appear 0.4s ease-out 2.4s both; }
}
@keyframes press { 0%, 60% { transform: none; } 66% { transform: scale(0.95); } 72%, 100% { transform: none; } }
@keyframes appear { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- sections */
section.band { border-top: 1px solid var(--line); padding: 4.5rem 0; }
.band-grid { display: grid; grid-template-columns: 16rem 1fr; gap: 3rem; }
.band h2 { margin: 0; font-size: 1.6rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.band .intro { margin: 0.75rem 0 0; color: var(--slate); }

.does { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem 3rem; }
.does div { max-width: 30rem; }
.does dt { font-weight: 600; margin-bottom: 0.3rem; }
.does dd { margin: 0; color: var(--slate); }

.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.steps li { counter-increment: s; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; border: 1.5px solid var(--ink); font-weight: 600; font-size: 0.9rem; margin-bottom: 0.9rem; }
.steps li:nth-child(3)::before { background: var(--approve); border-color: var(--approve); color: var(--approve-ink); }
.steps strong { display: block; margin-bottom: 0.3rem; }
.steps span { color: var(--slate); }

.promises { margin: 0; padding: 0; list-style: none; max-width: var(--measure); }
.promises li { padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.promises li:first-child { padding-top: 0; }
.promises strong { font-weight: 600; }
.promises + p { max-width: var(--measure); color: var(--slate); margin-top: 1.5rem; }

/* ---------------------------------------------------------------- footer */
.site-foot { border-top: 1px solid var(--line); padding: 2.5rem 0 3rem; color: var(--slate); font-size: 0.92rem; display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; }
.site-foot nav a { margin-inline-end: 1.25rem; }

/* ---------------------------------------------------------------- legal pages */
.legal { max-width: var(--measure); padding: 2rem 0 5rem; }
.legal h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); letter-spacing: -0.03em; line-height: 1.1; margin: 1rem 0 0.5rem; }
.legal .meta { color: var(--slate); margin: 0 0 2.5rem; }
.legal h2 { font-size: 1.3rem; letter-spacing: -0.01em; margin: 2.75rem 0 0.75rem; }
.legal h3 { font-size: 1.05rem; margin: 1.75rem 0 0.5rem; }
.legal p, .legal li { line-height: 1.7; }
.legal ul { padding-inline-start: 1.25rem; }
.legal li { margin-bottom: 0.4rem; }
.legal .limited { border-inline-start: 3px solid var(--approve); padding: 0.25rem 0 0.25rem 1rem; margin: 1.5rem 0; }
.legal table { border-collapse: collapse; width: 100%; font-size: 0.95rem; margin: 1rem 0; }
.legal th, .legal td { text-align: start; padding: 0.6rem 0.75rem 0.6rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { font-weight: 600; }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 3rem; padding-top: 2rem; }
  .band-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .does { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .wrap { padding: 0 1rem; }
  .steps { grid-template-columns: 1fr; }
  .site-head nav a:not(:last-child) { display: none; }
  .legal table, .legal thead, .legal tbody, .legal tr, .legal th, .legal td { display: block; }
  .legal thead { display: none; }
  .legal td { border: 0; padding: 0.15rem 0; }
  .legal tr { border-bottom: 1px solid var(--line); padding: 0.6rem 0; }
}
