/* ToText — marketing + legal site.
   Design system mirrors Lovelace Loom (cream/teal/gold, Cormorant + Inter,
   weave motif, soft shadows). App screenshots are dark and pop on the warm frame. */

@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500;1,600&family=Inter:wght@400;500;600;700&display=swap");

:root {
  --background: 42 38% 97%;
  --background-soft: 40 35% 94%;
  --ink: 210 15% 8%;
  --ink-muted: 210 10% 32%;
  --ink-soft: 210 10% 39%;
  --teal: 185 82% 24%;
  --teal-deep: 188 88% 16%;
  --teal-soft: 184 35% 84%;
  --gold: 38 62% 62%;
  --line: 210 12% 84%;
  --panel: 210 16% 7%;

  --r-control: 14px;
  --r-card: 24px;
  --r-card-lg: 32px;
  --r-panel: 36px;
  --r-panel-lg: 44px;

  --shadow-soft: 0 24px 80px rgba(13, 24, 27, 0.10), 0 4px 16px rgba(13, 24, 27, 0.05);
  --shadow-card: 0 12px 40px rgba(13, 24, 27, 0.07), 0 2px 6px rgba(13, 24, 27, 0.04);
  --shadow-card-hover: 0 28px 90px rgba(13, 24, 27, 0.14), 0 8px 22px rgba(13, 24, 27, 0.06);
  --shadow-phone: 0 50px 120px rgba(13, 24, 27, 0.30), 0 16px 40px rgba(13, 24, 27, 0.20);

  --ease-weave: cubic-bezier(0.16, 1, 0.3, 1);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: clip;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: hsl(var(--ink));
  background-color: hsl(var(--background));
  background-image:
    radial-gradient(1100px 700px at 8% -4%, hsl(40 60% 96% / 0.85), transparent 55%),
    radial-gradient(900px 600px at 100% 0%, hsl(184 38% 86% / 0.34), transparent 60%),
    radial-gradient(700px 800px at 102% 88%, hsl(38 62% 88% / 0.22), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
  line-height: 1.6;
}

::selection { background: hsl(var(--teal-deep) / 0.16); color: hsl(var(--ink)); }
a { color: hsl(var(--teal-deep)); text-decoration: none; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid hsl(var(--teal-deep)); outline-offset: 3px; border-radius: 6px; }

/* ---------- layout ---------- */
.container { max-width: var(--max); margin: 0 auto; padding-inline: clamp(20px, 5vw, 64px); }
section { padding: 92px 0; position: relative; }
.eyebrow { font-size: 12.5px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: hsl(var(--teal-deep)); margin: 0 0 18px; }
.muted { color: hsl(var(--ink-muted)); }

/* ---------- type ---------- */
h1, h2, h3 { font-family: "Cormorant Garamond", Garamond, Georgia, serif; font-weight: 600; color: hsl(var(--ink)); margin: 0; letter-spacing: -0.025em; line-height: 1.05; }
h1 { font-size: clamp(44px, 6.4vw, 78px); letter-spacing: -0.045em; }
h2 { font-size: clamp(32px, 4.2vw, 50px); letter-spacing: -0.035em; }
h3 { font-size: 23px; letter-spacing: -0.02em; }
p { margin: 0 0 16px; }
.lead { font-size: clamp(17px, 1.7vw, 20px); color: hsl(var(--ink-muted)); max-width: 56ch; }
.accent { font-style: italic; background: linear-gradient(96deg, hsl(var(--teal-deep)) 0%, hsl(var(--teal)) 52%, hsl(var(--gold)) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15.5px; font-family: inherit;
  padding: 13px 24px; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  transition: transform .25s var(--ease-weave), box-shadow .25s var(--ease-weave), background .25s, color .25s, border-color .25s; }
.btn-primary { background: linear-gradient(180deg, hsl(186 80% 21%), hsl(188 88% 15%)); color: hsl(42 40% 97%); box-shadow: 0 10px 30px hsl(188 88% 16% / 0.30); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 44px hsl(188 88% 16% / 0.38); }
.btn-ghost { background: hsl(0 0% 100% / 0.5); color: hsl(var(--ink)); border-color: hsl(var(--line)); }
.btn-ghost:hover { border-color: hsl(var(--teal-deep) / .5); transform: translateY(-2px); }
/* "coming soon" — looks like a primary button but is not a link */
.btn-soon { background: linear-gradient(180deg, hsl(186 80% 21%), hsl(188 88% 15%)); color: hsl(42 40% 97%); cursor: default;
  box-shadow: 0 10px 30px hsl(188 88% 16% / 0.22); }
.btn-soon::after { content: "soon"; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  background: hsl(38 62% 62% / 0.95); color: hsl(200 30% 12%); padding: 2px 7px; border-radius: 999px; margin-inline-start: 4px; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(150%) blur(16px); -webkit-backdrop-filter: saturate(150%) blur(16px);
  background: hsl(var(--background) / 0.72); border-bottom: 1px solid hsl(var(--line) / 0.65); box-shadow: 0 1px 0 hsl(0 0% 100% / 0.6) inset; }
.nav .container { display: flex; align-items: center; justify-content: space-between; padding-top: 15px; padding-bottom: 15px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: var(--shadow-card); }
.brand .word { font-family: "Cormorant Garamond", serif; font-weight: 700; font-size: 25px; letter-spacing: -0.02em; color: hsl(var(--ink)); }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a.txt { color: hsl(var(--ink-muted)); font-size: 15px; font-weight: 500; }
.nav-links a.txt:hover { color: hsl(var(--ink)); }

/* ---------- hero ---------- */
.hero { padding-top: 72px; padding-bottom: 44px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; }
.he { font-family: "Cormorant Garamond", serif; font-style: italic; font-size: 23px; color: hsl(var(--ink-soft)); direction: rtl; margin: 8px 0 0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-note { margin-top: 22px; font-size: 13.5px; color: hsl(var(--ink-soft)); display: flex; align-items: center; gap: 8px; }
.hero-note .dot { width: 5px; height: 5px; border-radius: 50%; background: hsl(var(--gold)); flex: none; }

/* phone showcase */
.phones { position: relative; display: flex; justify-content: center; align-items: flex-end; min-height: 540px; }
.phone { border-radius: 44px; padding: 9px; background: linear-gradient(150deg, #2a2a2e, #0d0d0f); box-shadow: var(--shadow-phone); border: 1px solid rgba(255,255,255,0.06); }
.phone img { border-radius: 36px; width: 244px; display: block; }
.phone-back { position: absolute; transform: translateX(60px) translateY(-26px) rotate(4deg) scale(0.9); opacity: 0.97; z-index: 1; }
.phone-front { position: relative; transform: translateX(-56px) rotate(-3deg); z-index: 2; }
.glow { position: absolute; inset: 8% 6% auto; height: 70%; z-index: 0; background: radial-gradient(60% 60% at 50% 40%, hsl(185 82% 30% / 0.22), transparent 70%); filter: blur(20px); }

/* ---------- weave divider ---------- */
.divider { display: flex; justify-content: center; padding: 4px 0; }
.divider svg { width: min(880px, 86%); height: 26px; opacity: 0.7; }

/* ---------- trust strip ---------- */
.strip { border-top: 1px solid hsl(var(--line) / .7); border-bottom: 1px solid hsl(var(--line) / .7); background: hsl(var(--background-soft) / .5); }
.strip .container { display: flex; flex-wrap: wrap; gap: 14px 40px; justify-content: center; padding-top: 22px; padding-bottom: 22px; }
.strip span { font-size: 14.5px; color: hsl(var(--ink-muted)); font-weight: 500; display: inline-flex; align-items: center; gap: 9px; }
.strip svg { color: hsl(var(--teal-deep)); flex: none; }

/* ---------- section head ---------- */
.section-head { max-width: 640px; margin-bottom: 48px; }

/* ---------- feature cards (Lovelace glass) ---------- */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.card { position: relative; border-radius: var(--r-card-lg); padding: 30px 30px 32px; isolation: isolate;
  background: linear-gradient(180deg, hsl(42 55% 99% / 0.72), hsl(40 35% 94% / 0.55));
  backdrop-filter: blur(18px) saturate(120%); -webkit-backdrop-filter: blur(18px) saturate(120%);
  box-shadow: inset 0 1px 0 hsl(0 0% 100% / 0.7), var(--shadow-card);
  transition: transform .35s var(--ease-weave), box-shadow .35s var(--ease-weave); }
.card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, hsl(var(--gold) / 0.55), transparent 42%, hsl(var(--teal) / 0.38));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); mask-composite: exclude; }
.card:hover { transform: translateY(-4px); box-shadow: inset 0 1px 0 hsl(0 0% 100% / 0.8), var(--shadow-card-hover); }
.card .ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 18px;
  background: hsl(var(--teal-deep) / 0.08); color: hsl(var(--teal-deep)); }
.card h3 { margin-bottom: 9px; }
.card p { color: hsl(var(--ink-muted)); font-size: 15.5px; margin: 0; }

/* ---------- how it works ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; counter-reset: step; }
.step { position: relative; padding-top: 16px; }
.step .num { font-family: "Cormorant Garamond", serif; font-size: 17px; font-weight: 700; color: hsl(var(--teal-deep)); width: 36px; height: 36px;
  border-radius: 50%; display: grid; place-items: center; background: hsl(var(--teal-deep) / 0.08); border: 1px solid hsl(var(--teal-deep) / 0.18); margin-bottom: 16px; }
.step h3 { margin-bottom: 7px; }
.step p { color: hsl(var(--ink-muted)); font-size: 15.5px; margin: 0; }

/* ---------- dark panel ---------- */
.panel { border-radius: var(--r-panel-lg); color: hsl(40 30% 92%); padding: 70px 56px; position: relative; overflow: hidden;
  background:
    radial-gradient(78% 60% at 82% 12%, hsl(184 70% 30% / 0.30), transparent 60%),
    radial-gradient(70% 55% at 6% 92%, hsl(38 55% 34% / 0.18), transparent 62%),
    linear-gradient(180deg, hsl(205 22% 9%), hsl(206 26% 5%));
  border: 1px solid hsl(184 60% 70% / 0.16); box-shadow: 0 34px 100px rgba(0,0,0,0.34); }
.panel h2 { color: #fff; }
.panel .lead { color: hsl(40 18% 80%); }
.panel .gold-line { width: 54px; height: 2px; background: hsl(var(--gold)); margin-bottom: 26px; }
.panel-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.panel ul { list-style: none; padding: 0; margin: 22px 0 0; }
.panel li { padding: 12px 0 12px 30px; position: relative; color: hsl(40 22% 85%); border-top: 1px solid rgba(255,255,255,0.09); }
.panel li:first-child { border-top: none; }
.panel li::before { content: ""; position: absolute; left: 0; top: 20px; width: 13px; height: 2px; background: hsl(var(--teal-soft)); }

/* ---------- showcase ---------- */
.showcase-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: center; }
.showcase .phone img { width: 268px; }

/* ---------- final cta ---------- */
.cta { text-align: center; }
.cta .inner { background: linear-gradient(180deg, #fff, hsl(var(--background-soft))); border: 1px solid hsl(var(--line) / .7);
  border-radius: var(--r-panel-lg); padding: 72px 32px; box-shadow: var(--shadow-soft); }
.cta h2 { margin-bottom: 16px; }
.cta .hero-cta { justify-content: center; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid hsl(var(--line) / .7); padding: 52px 0 60px; }
.footer .container { display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; align-items: flex-start; }
.footer .brand .word { font-size: 22px; }
.footer .tag { color: hsl(var(--ink-soft)); font-size: 14px; margin-top: 10px; max-width: 34ch; }
.footer nav { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.footer nav a { color: hsl(var(--ink-muted)); font-size: 14.5px; font-weight: 500; }
.footer nav a:hover { color: hsl(var(--ink)); }
.footer .legal { width: 100%; border-top: 1px solid hsl(var(--line) / .7); margin-top: 34px; padding-top: 22px; font-size: 13px; color: hsl(var(--ink-soft)); display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; }

/* ---------- reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease-weave), transform .7s var(--ease-weave); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ---------- reader (legal / support) ---------- */
.reader { max-width: 760px; margin: 0 auto; padding: 56px clamp(20px,5vw,24px) 96px; }
.reader .doc-tag { font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: hsl(var(--teal-deep)); font-weight: 600; }
.reader h1 { font-size: clamp(36px, 5vw, 52px); margin: 12px 0 6px; }
.reader h2 { font-size: 27px; margin: 44px 0 10px; letter-spacing: -0.02em; }
.reader h3 { font-size: 20px; margin: 26px 0 8px; }
.reader p, .reader li { color: hsl(var(--ink-muted)); font-size: 16.5px; }
.reader a { text-decoration: underline; text-underline-offset: 2px; }
.reader hr { border: none; border-top: 1px solid hsl(var(--line)); margin: 56px 0; }
.reader .rtl { direction: rtl; text-align: right; }
.reader .rtl p, .reader .rtl li { unicode-bidi: plaintext; }
.reader .meta { color: hsl(var(--ink-soft)); font-size: 14.5px; }
.reader code { font-size: 0.92em; background: hsl(var(--background-soft)); padding: 1px 6px; border-radius: 6px; direction: ltr; unicode-bidi: isolate; }
.back-link { display: inline-flex; align-items: center; gap: 7px; font-size: 14.5px; font-weight: 500; color: hsl(var(--ink-muted)); margin-bottom: 8px; }
.back-link:hover { color: hsl(var(--ink)); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .panel-grid, .showcase-grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 22px; }
  .phones { min-height: 460px; margin-top: 16px; overflow: hidden; width: 100%; }
  .phone img { width: clamp(190px, 56vw, 244px); }
  .phone-front { transform: translateX(-16px) rotate(-3deg) scale(0.94); }
  .phone-back { transform: translateX(26px) translateY(-14px) rotate(4deg) scale(0.82); }
  section { padding: 66px 0; }
  .panel { padding: 48px 26px; }
  .nav-links .txt { display: none; }
}
@media (max-width: 430px) {
  .phones { min-height: 400px; }
  .phone { padding: 7px; border-radius: 38px; }
  .phone img { border-radius: 31px; width: min(60vw, 210px); }
  .phone-front { transform: translateX(-10px) rotate(-3deg) scale(0.92); }
  .phone-back { transform: translateX(18px) translateY(-12px) rotate(4deg) scale(0.8); }
  .hero-cta .btn { width: 100%; justify-content: center; }
}
