/* Looky Looky website. One stylesheet, no build step.
   Colours come from Branding/BRAND.md. Light mode sits on Paper, dark mode on Night Sky. */

:root {
  color-scheme: light dark;

  --font: ui-rounded, "SF Pro Rounded", system-ui, sans-serif;

  /* Light (Paper) */
  --bg-top: #FFF6EA;        /* Paper */
  --bg-bottom: #FFE6D2;     /* Paper, bottom of gradient */
  --ink: #2A1840;           /* Plum Ink, 13:1 or better on Paper */
  --muted: #5A4670;         /* 6.9:1 on #FFE6D2 */
  --link: #4A27B0;          /* Deep Violet, 7.9:1 on #FFE6D2 */
  --link-hover: #2A1840;
  --accent: #7C52EC;        /* Peek Violet, large text and fills only */
  --surface: #FFFFFF;
  --surface-border: rgba(42, 24, 64, 0.10);
  --soft: #FFF1BE;          /* Sun Glow */
  --badge-bg: #FFC23D;      /* Marigold */
  --badge-ink: #2A1840;     /* Plum Ink on Marigold, 10:1 */
  --focus: #7C52EC;
  --shadow: 0 1px 2px rgba(42, 24, 64, 0.06), 0 10px 28px rgba(42, 24, 64, 0.08);
  --tile-shadow: 0 14px 34px rgba(124, 82, 236, 0.22), 0 3px 8px rgba(42, 24, 64, 0.12);

  --band-1: #FF6A5C;        /* Sunrise Coral */
  --band-2: #FFC23D;        /* Marigold */
  --band-3: #14B8C8;        /* Lens Teal */

  --radius: 22px;
  --gutter: 16px;
  --max: 68rem;
  --prose: 42rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-top: #1C1236;      /* Night Sky */
    --bg-bottom: #2C1A55;   /* Night Dusk */
    --ink: #F2EEFF;         /* Night Eye, 13:1 or better */
    --muted: #CFC4F0;       /* 9:1 on Night Dusk */
    --link: #B39BFF;        /* Night Lip, 6.5:1 on Night Dusk */
    --link-hover: #F2EEFF;
    --accent: #B39BFF;
    --surface: #2A1B50;
    --surface-border: #46286E; /* Night Low */
    --soft: #46286E;        /* Night Low; Night Eye text on it is 10:1 */
    --focus: #FFD66B;       /* Gold Star */
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 10px 28px rgba(0, 0, 0, 0.25);
    --tile-shadow: 0 14px 40px rgba(183, 164, 255, 0.22), 0 3px 8px rgba(0, 0, 0, 0.35);
  }
}

/* Base */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background-color: var(--bg-bottom);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.6;
  overflow-wrap: break-word;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 6vw, 2.75rem); font-weight: 900; }
h2 { font-size: clamp(1.4rem, 3.6vw, 1.75rem); }
h3 { font-size: 1.2rem; }

p,
ul,
ol {
  margin: 0 0 1em;
}

a {
  color: var(--link);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--link-hover);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

strong {
  font-weight: 700;
}

main {
  flex: 1 0 auto;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

.wrap.narrow {
  max-width: calc(var(--prose) + 2 * var(--gutter));
}

/* Skip link */

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg-top);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
  color: var(--bg-top);
}

/* Header */

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.site-header.no-brand .wrap {
  justify-content: flex-end;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 900;
  font-size: 1.125rem;
  text-decoration: none;
  /* Clear space around the 36px tile: at least a quarter of its width (9px). */
  padding: 10px 0;
}

.brand:hover {
  color: var(--ink);
}

.brand img {
  width: 36px;
  height: 36px;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding: 10px 11px;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover {
  background: var(--surface);
}

.site-nav a[aria-current="page"] {
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--surface-border);
}

/* Hero */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px 0 48px;
}

.hero-mark {
  width: 152px;
  height: 152px;
  /* Clear space: a quarter of the tile's width on every side. */
  margin: 38px;
  border-radius: 23%;
  box-shadow: var(--tile-shadow);
}

.wordmark {
  margin: 0;
  font-size: clamp(2.6rem, 11vw, 4.5rem);
  font-weight: 900;
  letter-spacing: normal;
  line-height: 1.05;
  color: var(--ink);
}

.tagline {
  margin: 0.4em 0 0;
  font-size: clamp(1.3rem, 4.6vw, 1.75rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--accent);
}

.pitch {
  max-width: 34rem;
  margin: 1em auto 0;
  font-size: 1.15rem;
  color: var(--muted);
}

.store-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 28px;
  padding: 14px 24px;
  min-height: 48px;
  border-radius: 999px;
  background: var(--badge-bg);
  color: var(--badge-ink);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.25;
  text-decoration: none;
  box-shadow: 0 2px 0 rgba(42, 24, 64, 0.18);
}

.store-badge:not([href]) {
  cursor: default;
}

@media (min-width: 52rem) {
  .hero {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 8px;
    padding: 32px 0 72px;
  }

  .hero-mark {
    flex: 0 0 auto;
    width: 208px;
    height: 208px;
    margin: 52px;
    margin-left: 0;
  }

  .pitch {
    margin-left: 0;
  }
}

/* Sections */

.section {
  padding: 8px 0 48px;
}

.section-title {
  margin-bottom: 20px;
}

/* Feature cards */

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 48rem) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

.card {
  position: relative;
  padding: 26px 22px 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card p:last-child,
.card ul:last-child {
  margin-bottom: 0;
}

.feature-grid .card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: var(--band-1);
}

.feature-grid .card:nth-child(2)::before { background: var(--band-2); }
.feature-grid .card:nth-child(3)::before { background: var(--band-3); }

.feature-grid h3 {
  margin-top: 4px;
}

.feature-grid p {
  color: var(--muted);
}

/* Duo note and privacy strip */

.note {
  display: grid;
  gap: 16px;
}

@media (min-width: 48rem) {
  .note {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
}

.note .card h2 {
  font-size: 1.4rem;
}

.note .card p {
  color: var(--muted);
}

.eyebrow {
  display: inline-block;
  margin: 0 0 10px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.5;
}

.fine {
  font-size: 0.95rem;
}

.nowrap {
  white-space: nowrap;
}

/* Prose pages (privacy, support) */

.page-head {
  padding: 16px 0 8px;
}

.page-head .meta {
  color: var(--muted);
  font-weight: 600;
}

.prose {
  padding-bottom: 56px;
}

.prose h2 {
  margin-top: 1.8em;
}

.prose h3 {
  margin-top: 1.6em;
  margin-bottom: 0.4em;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose li + li {
  margin-top: 0.35em;
}

.prose .card {
  margin: 8px 0 28px;
}

.prose .card h2 {
  margin-top: 0;
  font-size: 1.25rem;
}

.prose .card ul {
  margin-bottom: 0;
}

.faq h3 {
  margin-top: 1.8em;
}

.faq h3:first-of-type {
  margin-top: 0.6em;
}

.contact-email {
  font-size: 1.15rem;
  font-weight: 700;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--surface-border);
  padding: 28px 0 calc(32px + env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.site-footer a {
  display: inline-block;
  padding: 8px 0;
  font-weight: 600;
}

.site-footer p {
  margin: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .site-nav a {
    transition: background-color 0.15s ease;
  }
}
