/*
The landing for a visitor (web/landing_page.html, its hero alone) and the terms page. The hero is bg-neutral, lit by
.landing-glow. The signed-in dashboard (web/app_home.html) loads this file too, for its icons and its glowing band, and
home.css for the rest.
*/

/* the large buttons keep the body's size */
.landing-btn { --fontsize: 15px; }

/* ---- hero ---- */

/* a dark section lit from two corners, over a faint grid that fades out towards its edges */
.landing-glow {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-image:
    radial-gradient(36rem 24rem at 85% 0%, color-mix(in oklab, var(--color-accent) 38%, transparent), transparent 70%),
    radial-gradient(30rem 22rem at 0% 100%, color-mix(in oklab, var(--color-primary) 30%, transparent), transparent 70%);
  &::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
      linear-gradient(to right, color-mix(in oklab, var(--neutral-bright) 5%, transparent) 1px, transparent 1px),
      linear-gradient(to bottom, color-mix(in oklab, var(--neutral-bright) 5%, transparent) 1px, transparent 1px);
    background-size: 3rem 3rem;
    /* a mask reads only the alpha: black is opaque, not a colour */
    mask-image: radial-gradient(ellipse at 70% 30%, black, transparent 75%);
  }
}
.landing-hero > .page {
  padding-block: 4.5rem;
  @media (width >= 64rem) { padding-block: 6.5rem; }
}
.landing-hero-grid {
  display: grid;
  align-items: center;
  gap: 3.5rem;
  @media (width >= 64rem) { grid-template-columns: minmax(0, 1fr) minmax(0, 30rem); gap: 4rem; }
}
/* headings on the dark neutral are white, a step above its text */
.landing-hero h1 {
  font-size: 3.25rem;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--neutral-bright);
  @media (width >= 40rem) { font-size: 4.5rem; }
}
.landing-hero-lead {
  max-width: 32rem;
  margin-top: 1.25rem;
  font-size: 1.1875rem;
  line-height: 1.6;
}
.landing-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.25rem;
}
/* an outline button on the dark: a faint white line that brightens on hover, set through daisyUI's variables */
.landing-hero-ghost {
  --btn-color: var(--neutral-bright);
  --btn-fg: var(--neutral-bright);
  --btn-bg: transparent;
  --btn-border: color-mix(in oklab, var(--neutral-bright) 25%, transparent);
  &:hover {
    --btn-bg: color-mix(in oklab, var(--neutral-bright) 10%, transparent);
    --btn-border: color-mix(in oklab, var(--neutral-bright) 40%, transparent);
  }
}

/* the hero's picture of the assistant: a question, its answer with two sources, and the box to ask in */
.landing-preview {
  overflow: hidden;
  border-radius: 0.875rem;
  box-shadow:
    0 0 0 1px color-mix(in oklab, var(--neutral-bright) 12%, transparent),
    0 24px 64px -16px color-mix(in oklab, var(--color-accent) 45%, transparent);
  font-size: 13.5px;
}
.landing-preview-bar {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--color-base-200);
  & > span { width: 0.625rem; height: 0.625rem; border-radius: 50%; background: var(--color-base-300); }
  & p { margin-left: 0.5rem; font-size: 12px; font-weight: 600; }
}
.landing-preview-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.5rem 1.25rem 1.25rem;
}
.landing-preview-question {
  align-self: flex-end;
  max-width: 85%;
  padding: 0.5rem 0.875rem;
  border-radius: 1rem;
  background: var(--color-base-200);
}
.landing-preview-answer {
  display: flex;
  gap: 0.75rem;
  line-height: 1.6;
  & .landing-icon { flex: none; width: 1.75rem; height: 1.75rem; border-radius: 0.4375rem; }
  & .landing-icon svg { width: 0.75rem; height: 0.75rem; }
}
.landing-preview-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.75rem;
}
.landing-preview-composer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 1.25rem 1.25rem;
  padding: 0.375rem 0.375rem 0.375rem 0.875rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-sm);
  & .btn { cursor: default; }
  & svg { width: 1rem; height: 1rem; }
}

/* ---- icons ---- */

/* a square icon (the hero's answer, the dashboard's cards); the assistant's is in the brand gradient */
.landing-icon {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border-radius: 0.5rem;
  font-size: 13px;
  font-weight: 700;
  & svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
  }
}
.landing-icon-ai {
  background-image: linear-gradient(135deg, var(--color-accent), var(--color-primary));
  & svg { width: 1rem; height: 1rem; fill: currentColor; stroke: none; }
}

/* ---- terms ---- */

.terms {
  width: 100%;
  max-width: 48rem;
  margin-inline: auto;
  padding: 3rem 1.5rem;
}
.terms-card {
  padding: 2rem;
  & h1 { margin-bottom: 0.75rem; }
  & p { font-size: 15px; }
}
