/* trymokhtas.com. Slate & Terracotta, the app's own palette, dark only like
   the app. Values mirror client/constants/theme.ts; change them there first. */

:root {
  --canvas: #111418;
  --surface: #1b2026;
  --surface-raised: #272d35;
  --surface-active: #333a44;
  --text: #eceef1;
  --muted: #a2a9b3;
  --disabled: #6f7883;
  --accent: #d96a44;
  --accent-soft: rgba(217, 106, 68, 0.14);
  --on-accent: #16110e;
  --success: #78b88f;
  --warning: #d9a650;
  --destructive: #d9645c;
  --hairline: rgba(236, 238, 241, 0.08);
  --shadow: #05070a;

  --r-control: 10px;
  --r-card: 16px;
  --r-sheet: 24px;
  --r-pill: 999px;

  --gutter: 20px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; background: var(--canvas); color: var(--text); }
body {
  font-family: "IBM Plex Sans Arabic", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Icons: Phosphor glyphs from the sprite at the top of each page. */
.icon { width: 20px; height: 20px; fill: currentColor; flex: none; }
[dir="rtl"] .icon.flip { transform: scaleX(-1); }

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.top .brand img { height: 32px; width: auto; }
/* Hero: text on the reading side, the app on the other. */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 32px;
  align-items: stretch;
  padding-block: 16px 48px;
  min-height: min(760px, calc(100dvh - 72px));
}
.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 32px;
  padding-inline-end: 24px;
}
h1 {
  margin: 0;
  font-size: clamp(40px, 5.2vw, 68px);
  line-height: 1.2;
  font-weight: 700;
  text-wrap: balance;
}
h1 .soft { color: var(--muted); font-weight: 600; }
.heat {
  width: 56px;
  height: 3px;
  border-radius: var(--r-pill);
  background: var(--accent);
  margin-block: 28px 24px;
  transform-origin: inline-start;
}
[dir="rtl"] .heat { transform-origin: right; }
[dir="ltr"] .heat { transform-origin: left; }
.lead {
  margin: 0;
  max-width: 34ch;
  font-size: clamp(17px, 1.5vw, 19px);
  color: var(--muted);
}
.points {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}
.points li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
  font-weight: 500;
}
.points .icon { color: var(--accent); width: 24px; height: 24px; }

.get {
  margin-top: 40px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding-inline: 20px 24px;
  border-radius: var(--r-pill);
  background: var(--surface-raised);
  color: var(--text);
  text-decoration: none;
}
.store .icon { width: 24px; height: 24px; }
.store span { display: grid; line-height: 1.25; }
.store small { font-size: 12px; font-weight: 500; color: var(--muted); }
.store strong { font-size: 17px; font-weight: 600; }
a.store { background: var(--accent); color: var(--on-accent); transition: transform 0.2s var(--ease), opacity 0.2s; }
a.store small { color: var(--on-accent); }
a.store:hover { opacity: 0.92; }
a.store:active { transform: scale(0.97); }

/* The visual panel: one surface, the dripper mark drawn large, the phone. */
.stage {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-sheet);
  background: var(--surface);
  display: grid;
  place-items: center;
  padding: 48px 24px;
  isolation: isolate;
}
.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/img/grain.png") repeat;
  background-size: 256px;
  opacity: 0.06;
  pointer-events: none;
  z-index: -1;
}
.stage .mark {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 88%;
  height: auto;
  color: var(--accent);
  opacity: 0.14;
  z-index: -1;
  pointer-events: none;
}

.phone {
  --pw: 300px;
  --k: 0.712468; /* (300 - 20) / 393: the app's width into the screen */
  position: relative;
  width: var(--pw);
  border-radius: 52px;
  padding: 10px;
  background: #0b0d10;
  box-shadow:
    0 0 0 1.5px #2b3139,
    0 40px 80px -20px var(--shadow),
    0 16px 32px -12px rgba(5, 7, 10, 0.6);
}
.phone .screen {
  position: relative;
  width: 100%;
  aspect-ratio: 393 / 852;
  border-radius: 42px;
  overflow: hidden;
  background: var(--canvas);
}
.phone .island {
  position: absolute;
  top: 12px;
  left: 50%;
  width: 30%;
  height: 26px;
  border-radius: var(--r-pill);
  background: #000;
  transform: translateX(-50%);
  z-index: 2;
}
/* Roasteries */
.roasters {
  padding-block: 96px;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}
.roasters .intro { position: sticky; top: 32px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding-inline: 14px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}
.chip .icon { color: var(--accent); width: 18px; height: 18px; }
h2 {
  margin: 20px 0 0;
  font-size: clamp(30px, 3.4vw, 42px);
  line-height: 1.25;
  font-weight: 700;
  text-wrap: balance;
}
.roasters .intro p {
  margin: 16px 0 0;
  max-width: 40ch;
  color: var(--muted);
  font-size: 17px;
}

.form {
  background: var(--surface);
  border-radius: var(--r-sheet);
  padding: 32px;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 16px;
}
.field { display: grid; gap: 8px; align-content: start; }
.field.wide { grid-column: 1 / -1; }
label { font-size: 14px; color: var(--muted); }
label .opt { color: var(--muted); opacity: 0.8; }
input, textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 0;
  border-radius: var(--r-control);
  background: var(--surface-raised);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  transition: background-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
textarea { min-height: 112px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, textarea:focus { outline: none; background: var(--surface-active); box-shadow: 0 0 0 2px var(--accent); }
input[type="email"], input[type="tel"], input[type="url"] { direction: ltr; text-align: start; }
[dir="rtl"] input[type="email"], [dir="rtl"] input[type="tel"], [dir="rtl"] input[type="url"] { text-align: right; }
.err { min-height: 0; margin: 0; font-size: 14px; color: var(--destructive); }
.err:empty { display: none; }

.send {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
button {
  font: inherit;
  cursor: pointer;
  border: 0;
}
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  min-width: 160px;
  padding-inline: 28px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 17px;
  font-weight: 600;
  transition: transform 0.2s var(--ease), opacity 0.2s;
}
.primary:hover { opacity: 0.92; }
.primary:active { transform: scale(0.97); }
.primary[disabled] { background: var(--surface-raised); color: var(--disabled); cursor: default; transform: none; }
.send .note { font-size: 14px; color: var(--muted); margin: 0; }
.send .note a { color: var(--text); }

.done { display: none; text-align: start; padding-block: 24px; }
.done .icon { width: 40px; height: 40px; color: var(--success); }
.done h3 { margin: 16px 0 4px; font-size: 22px; line-height: 1.3; }
.done p { margin: 0; color: var(--muted); }
.form.sent .done { display: block; }
.form.sent form { display: none; }

/* Footer */
.foot {
  border-top: 1px solid var(--hairline);
  padding-block: 32px calc(32px + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
}
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.foot a { text-decoration: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.foot a:hover { color: var(--text); }
.foot .icon { width: 18px; height: 18px; }

/* Entry motion: the phone settles, the heat line draws. Transform and
   opacity only, and nothing at all under reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise 0.7s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation: draw 0.6s var(--ease) 0.15s both; }
  .hero-copy > :nth-child(3) { animation-delay: 0.08s; }
  .hero-copy > :nth-child(4) { animation-delay: 0.14s; }
  .hero-copy > :nth-child(5) { animation-delay: 0.2s; }
  .phone { animation: rise-far 1s var(--ease) 0.1s both; }
  .stage .mark { animation: fade 1.4s var(--ease) both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes rise-far { from { opacity: 0; transform: translateY(48px) scale(0.98); } }
@keyframes draw { from { transform: scaleX(0); } }
@keyframes fade { from { opacity: 0; } }

/* Tablet and down: one column, the app under the words. */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; min-height: 0; gap: 8px; padding-bottom: 24px; }
  .hero-copy { padding-inline-end: 0; padding-block: 24px 32px; }
  .stage { padding: 40px 16px; min-height: 0; }
  .roasters { grid-template-columns: 1fr; gap: 32px; padding-block: 64px; }
  .roasters .intro { position: static; }
}
@media (max-width: 380px) {
  .phone { --pw: 264px; --k: 0.620865; border-radius: 46px; }
  .phone .screen { border-radius: 37px; }
}
@media (max-width: 560px) {
  :root { --gutter: 16px; }
  .top { height: 64px; }
  .top .brand img { height: 28px; }
  .points li { font-size: 16px; }
  .get { margin-top: 32px; }
  .store { width: 100%; justify-content: center; }
  .form { padding: 20px; border-radius: var(--r-card); }
  .fields { grid-template-columns: 1fr; }
  .primary { width: 100%; }
  .foot { flex-direction: column; align-items: flex-start; }
}

/* The Shelf inside the phone, drawn at the app's own 393pt and scaled down,
   so every size below is the app's (lib/screens/shelf_screen.dart). */
.app {
  position: absolute;
  top: 0;
  left: 0;
  width: 393px;
  height: 852px;
  transform: scale(var(--k));
  transform-origin: 0 0;
  background: var(--canvas);
  font-size: 16px;
  line-height: 22px;
  overflow: hidden;
  user-select: none;
}
.app .icon { width: 20px; height: 20px; }
.app b { font-weight: 600; }
.app small { display: block; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--muted); }
.app .pad { margin-inline: 20px; }
.sb {
  height: 54px;
  padding: 16px 36px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: -apple-system, "SF Pro Text", system-ui, sans-serif;
  font-size: 17px;
  font-weight: 600;
}
.sb-icons { display: flex; gap: 6px; }
.sb-icons .icon { width: 18px; height: 18px; }
.nav {
  height: 44px;
  padding-inline: 20px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.nav-btn {
  justify-self: start;
  width: 32px;
  height: 32px;
  border-radius: var(--r-pill);
  background: var(--surface-raised);
  display: grid;
  place-items: center;
}
.nav-title { font-size: 17px; font-weight: 600; }
.nav-text { justify-self: end; font-size: 17px; font-weight: 600; color: var(--accent); }
.greet { margin-top: 16px; display: flex; align-items: center; gap: 12px; }
.greet-text { flex: 1; display: grid; gap: 4px; }
.greet-name { font-size: 22px; line-height: 28px; font-weight: 600; }
.greet-meta { font-size: 14px; line-height: 20px; color: var(--muted); }
.avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--r-pill);
  background: var(--surface-raised);
  object-fit: cover;
}
.search {
  margin-top: 20px;
  height: 48px;
  padding-inline: 14px;
  border-radius: var(--r-control);
  background: var(--surface-raised);
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
}
.seg {
  margin-top: 12px;
  padding: 4px;
  border-radius: var(--r-control);
  background: var(--surface-raised);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.seg span {
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
  font-weight: 500;
}
.seg span.on { background: var(--surface-active); color: var(--text); }
.seg .icon { width: 16px; height: 16px; }
.sec { margin-top: 32px; font-size: 22px; line-height: 28px; font-weight: 600; }
.strip { margin-top: 12px; padding-inline: 20px; display: flex; gap: 12px; }
.gc {
  position: relative;
  flex: none;
  width: 170px;
  height: 156px;
  border-radius: var(--r-card);
  background: var(--surface);
  overflow: hidden;
}
.gc::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(217, 106, 68, 0.16), rgba(217, 106, 68, 0) 68%);
}
.gc.iced::before { background: linear-gradient(to bottom, rgba(140, 176, 204, 0.16), rgba(140, 176, 204, 0) 68%); }
.app .gc-disc { position: absolute; top: 12px; inset-inline-start: 12px; width: 16px; height: 16px; color: var(--accent); }
.gc.iced .gc-disc { color: #8cb0cc; }
.gc-body {
  position: absolute;
  inset: 0;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.gc-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gc-meta { margin-top: 2px; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--muted); }
.gc-stats { margin-top: 8px; display: flex; gap: 16px; }
.gc-stats b { display: block; font-size: 17px; line-height: 22px; }
.lg { margin-top: 12px; border-radius: var(--r-card); background: var(--surface); overflow: hidden; }
.lr { min-height: 52px; padding: 12px 16px; display: flex; align-items: center; gap: 12px; }
.lr-icon { color: var(--accent); }
.lr.iced .lr-icon { color: #8cb0cc; }
.lr-text { flex: 1; display: grid; }
.lr-label { font-weight: 500; }
.lr-meta { font-size: 14px; line-height: 20px; color: var(--muted); }
.lr-end { min-width: 46px; text-align: center; }
.lr-end b { display: block; font-size: 17px; }
.hair { display: block; height: 1px; margin-inline-start: 16px; background: var(--hairline); }
.bar {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 30px;
  display: flex;
  gap: 12px;
}
.bar-pill {
  flex: 1;
  height: 56px;
  padding-inline: 12px;
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: 0 8px 20px rgba(5, 7, 10, 0.5);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tab { min-width: 44px; height: 40px; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.tab .icon { width: 24px; height: 24px; }
.tab.on {
  gap: 6px;
  padding-inline: 12px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
}
.tab.on .icon { color: var(--accent); }
.fab {
  width: 56px;
  height: 56px;
  flex: none;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 8px 20px rgba(5, 7, 10, 0.5);
  display: grid;
  place-items: center;
}
.fab .icon { width: 24px; height: 24px; }
.home {
  position: absolute;
  bottom: 8px;
  left: 50%;
  width: 134px;
  height: 5px;
  margin-left: -67px;
  border-radius: var(--r-pill);
  background: var(--text);
}
.phone .island { width: 90px; height: 26px; top: 8px; }

/* Support */
.page { padding-block: 48px 96px; }
.page-lead { max-width: 640px; }
.page-title {
  margin: 20px 0 0;
  font-size: clamp(34px, 4.4vw, 52px);
  line-height: 1.2;
}
.page-lead p { margin: 16px 0 0; color: var(--muted); font-size: 18px; }
.faq {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.faq section { background: var(--surface); border-radius: var(--r-card); padding: 24px; }
.faq h2 { margin: 0 0 8px; font-size: 18px; line-height: 1.4; font-weight: 600; }
.faq p { margin: 0; color: var(--muted); }
.mail {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  border-radius: var(--r-card);
  background: var(--accent-soft);
  text-decoration: none;
  transition: transform 0.2s var(--ease), background-color 0.2s;
}
.mail:hover { background: rgba(217, 106, 68, 0.2); }
.mail:active { transform: scale(0.99); }
.mail-icon {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--on-accent);
  display: grid;
  place-items: center;
}
.mail-icon .icon { width: 24px; height: 24px; }
.mail-text { flex: 1; display: grid; }
.mail-text strong { font-size: 18px; font-weight: 600; }
.mail-text span { color: var(--muted); }
.mail-addr { unicode-bidi: isolate; font-weight: 600; }

/* 404 */
.nf { padding-block: 32px 96px; display: grid; gap: 40px; }
.nf > * { max-width: 720px; }
.nf-code { margin: 0; font-size: clamp(96px, 16vw, 168px); line-height: 1; font-weight: 700; color: var(--surface-raised); }
.nf-block .page-title { margin-top: 0; font-size: clamp(30px, 3.6vw, 42px); }
.nf-block p { margin: 12px 0 24px; color: var(--muted); font-size: 17px; max-width: 46ch; }
.nf-block + .nf-block { padding-top: 40px; border-top: 1px solid var(--hairline); }
.nf-block .primary { text-decoration: none; }
.primary .icon { width: 20px; height: 20px; }

@media (max-width: 760px) {
  .faq { grid-template-columns: 1fr; }
  .mail { flex-wrap: wrap; }
  .mail-addr { flex-basis: 100%; }
}
