/* DeficitAI — site styles
   ---------------------------------------------------------------
   Palette and type are lifted from the app itself rather than
   invented: someone arriving here from the App Store listing should
   recognise the same surface. Cream #FCF3E7 is AppColors.gradientTop,
   ink #141312 is the text and button colour, and the amber is the
   accent used on the trend lines and the watermelon mark.
   --------------------------------------------------------------- */

:root {
  --cream-top: #fcf3e7;
  --cream-bottom: #fbeae0;
  --ink: #141312;
  --ink-70: rgba(20, 19, 18, 0.7);
  --ink-50: rgba(20, 19, 18, 0.5);
  --amber: #c68b2c;
  --amber-deep: #9a6b1b;
  --white: #ffffff;
  --rule: rgba(20, 19, 18, 0.12);

  --measure: 62ch;
  --radius: 22px;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(150deg, var(--cream-top) 0%, var(--cream-bottom) 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: "Instrument Sans", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
.wordmark,
.pill {
  font-family: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  font-variation-settings: "wdth" 100;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

a {
  color: inherit;
}

.shell {
  width: min(1120px, 100% - 2.5rem);
  margin-inline: auto;
}

/* ── Header ──────────────────────────────────────────────────── */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 2rem 1rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.35rem;
  font-weight: 800;
  text-decoration: none;
}

.wordmark svg {
  width: 1.6em;
  height: 1.6em;
  flex: none;
}

.masthead nav {
  display: flex;
  gap: 1.6rem;
  font-size: 0.95rem;
}

.masthead nav a {
  color: var(--ink-70);
  text-decoration: none;
  text-underline-offset: 4px;
}

.masthead nav a:hover,
.masthead nav a:focus-visible {
  color: var(--ink);
  text-decoration: underline;
}

/* ── Hero ────────────────────────────────────────────────────── */

.hero {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  padding-block: clamp(2.5rem, 7vw, 6rem) clamp(3rem, 8vw, 7rem);
}

.eyebrow {
  margin: 0 0 1.1rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber-deep);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.6rem, 5.6vw, 4.3rem);
  font-weight: 800;
}

.hero p {
  max-width: 46ch;
  margin: 1.4rem 0 0;
  font-size: 1.08rem;
  color: var(--ink-70);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  margin-top: 2.2rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.95rem 1.7rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.18s ease;
}

.pill:hover,
.pill:focus-visible {
  transform: translateY(-2px);
}

.pill--quiet {
  background: transparent;
  border-color: var(--rule);
  color: var(--ink-70);
  font-weight: 500;
}

.pill--quiet:hover,
.pill--quiet:focus-visible {
  border-color: var(--ink);
  color: var(--ink);
}

/* The one deliberate flourish: a plate behind the phone. It ties the
   page to the app's subject without a second decorative idea
   competing with it. */
.stage {
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.stage::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: min(94%, 420px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 40%,
    rgba(198, 139, 44, 0.16) 0%,
    rgba(198, 139, 44, 0.05) 55%,
    transparent 72%
  );
}

.stage img {
  display: block;
  width: min(100%, 320px);
  height: auto;
  filter: drop-shadow(0 30px 60px rgba(20, 19, 18, 0.18));
}

/* ── Feature strip ───────────────────────────────────────────── */

.ways {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border-block: 1px solid var(--rule);
}

.ways > div {
  background: transparent;
  padding: clamp(1.6rem, 3vw, 2.4rem) clamp(1.2rem, 2.5vw, 2rem);
}

.ways h2 {
  margin: 0 0 0.5rem;
  font-size: 1.12rem;
  font-weight: 700;
}

.ways p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-70);
}

/* ── Footer ──────────────────────────────────────────────────── */

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: 2.5rem 3rem;
  font-size: 0.92rem;
  color: var(--ink-50);
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.foot a {
  color: var(--ink-70);
  text-decoration: none;
  text-underline-offset: 4px;
}

.foot a:hover,
.foot a:focus-visible {
  color: var(--ink);
  text-decoration: underline;
}

/* ── Legal documents ─────────────────────────────────────────── */

.doc {
  max-width: var(--measure);
  margin-inline: auto;
  padding-block: clamp(2rem, 5vw, 3.5rem) 4rem;
}

.doc h1 {
  font-size: clamp(2rem, 4.5vw, 2.9rem);
  font-weight: 800;
  margin: 0 0 0.4rem;
}

.doc .updated {
  margin: 0 0 2.5rem;
  font-size: 0.92rem;
  color: var(--ink-50);
}

.doc h2 {
  margin: 2.8rem 0 0.8rem;
  font-size: 1.22rem;
  font-weight: 700;
}

.doc p,
.doc li {
  color: var(--ink-70);
  font-size: 1rem;
}

.doc p {
  margin: 0 0 1rem;
}

.doc ul {
  margin: 0 0 1.2rem;
  padding-left: 1.2rem;
}

.doc li {
  margin-bottom: 0.5rem;
}

.doc strong {
  color: var(--ink);
  font-weight: 600;
}

.doc hr {
  margin: 2.6rem 0;
  border: 0;
  border-top: 1px solid var(--rule);
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-size: 0.95rem;
  color: var(--ink-70);
  text-decoration: none;
}

.back:hover,
.back:focus-visible {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ── Quality floor ───────────────────────────────────────────── */

:focus-visible {
  outline: 2px solid var(--amber-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: left;
  }

  /* Mockup first on narrow screens: it explains the product faster
     than the headline does. */
  .stage {
    order: -1;
  }

  .stage img {
    width: min(72%, 260px);
  }

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

  .masthead nav {
    gap: 1.1rem;
    font-size: 0.9rem;
  }
}

.rise {
  animation: rise 0.7s cubic-bezier(0.22, 0.7, 0.3, 1) backwards;
}

.rise:nth-of-type(2) {
  animation-delay: 0.08s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}