/* Grinly pages on company31.com/grinly/. Sits on top of the site's own
   ../assets/styles.css (tokens --text, --muted, --accent, --hairline).
   Grinly's colours are fills and rules only; the --gr-*-text tokens are the
   darker (or, in dark mode, lighter) versions that are safe for text. */

:root {
  --gr-sun: #FFC23D;
  --gr-coral: #FF6F59;
  --gr-coral-text: #B7412E;
}
@media (prefers-color-scheme: dark) {
  :root { --gr-coral-text: #FF9A88; }
}
:root[data-theme="light"] { --gr-coral-text: #B7412E; }
:root[data-theme="dark"] { --gr-coral-text: #FF9A88; }

/* --- the policy page -------------------------------------------------- */

/* The policy in every language the app speaks. */
.gr-langs { display: flex; flex-wrap: wrap; gap: .4rem .5rem; margin-top: 1.2rem; }
.gr-langs a {
  font-size: .85rem;
  padding: .3rem .7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
}
.gr-langs a:hover { color: var(--text); border-color: var(--text); }
.gr-langs a[aria-current="page"] { color: var(--text); border-color: var(--gr-coral-text); font-weight: 600; }
.gr-note-translation { font-size: .9rem; color: var(--muted); margin-top: .8rem; }

.gr-policy > * { max-width: 46rem; }
.gr-policy h2 { margin: 2.4rem 0 .8rem; font-size: clamp(1.15rem, 2.2vw, 1.4rem); letter-spacing: -.01em; }
.gr-policy h2:first-child { margin-top: 0; }
.gr-policy h3 { margin: 1.6rem 0 .5rem; font-size: 1rem; }
.gr-policy p, .gr-policy li { font-size: .97rem; line-height: 1.75; color: var(--muted); }
.gr-policy p { margin: 0 0 .9rem; }
.gr-policy ul { margin: 0 0 1rem; padding-left: 1.15rem; }
.gr-policy li::marker { color: var(--gr-coral-text); }
.gr-policy strong { color: var(--text); font-weight: 600; }

.gr-updated {
  font-family: "Company31 Mono", "Spline Sans Mono", monospace;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}

.gr-policyhero .lede { max-width: 40rem; font-size: 1.1rem; line-height: 1.6; color: var(--muted); }
.gr-policyhero h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); line-height: 1.05; letter-spacing: -.02em; margin: .4rem 0 1rem; }
.gr-policyhero .gr-updated { margin-top: 1.2rem; }

.gr-tablewrap { overflow-x: auto; margin: .6rem 0 1.4rem; }
.gr-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.gr-table caption { text-align: left; color: var(--muted); font-size: .9rem; padding-bottom: .6rem; }
.gr-table th, .gr-table td { text-align: left; vertical-align: top; padding: .6rem .5rem; border-bottom: 1px solid var(--hairline); }
.gr-table th { color: var(--text); font-weight: 600; }
.gr-table td { color: var(--muted); line-height: 1.6; }
.gr-table td:first-child { color: var(--text); white-space: nowrap; }

.gr-note {
  border-left: 3px solid var(--gr-sun);
  padding: .2rem 0 .2rem 1rem;
  margin: 1.2rem 0 1.4rem;
}

.gr-contact { margin: 1.2rem 0 0; }
.gr-contact dt {
  font-family: "Company31 Mono", "Spline Sans Mono", monospace;
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 1rem;
}
.gr-contact dd { margin: .25rem 0 0; font-size: .96rem; line-height: 1.6; color: var(--muted); }
.gr-contact dd strong { color: var(--text); font-weight: 600; }

/* ===================================================================== */
/* The product page (index.html)                                          */
/* ===================================================================== */

:root {
  --gr-night: #16131F;
  --gr-night-rule: #332D45;
  --gr-paper: #FFF4E6;
  --gr-dim: #A49DB5;
  --gr-sky: #6BA8FF;
  --gr-mint: #3CCB9A;
  --gr-lilac: #A78BFA;
  --gr-sun-text: #8A5A00;
  --gr-card: #FFFFFF;
}
@media (prefers-color-scheme: dark) {
  :root { --gr-sun-text: #FFC23D; --gr-card: rgba(22, 19, 31, .55); }
}
:root[data-theme="light"] { --gr-sun-text: #8A5A00; --gr-card: #FFFFFF; }
:root[data-theme="dark"] { --gr-sun-text: #FFC23D; --gr-card: rgba(22, 19, 31, .55); }

.gr-code {
  font-family: "Company31 Mono", "Spline Sans Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: .92em;
  color: var(--text);
}

/* --- hero: a night panel, the app's own dark ground ------------------- */

.gr-hero { padding-block: clamp(1.25rem, 3vw, 2rem); }
.gr-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  background-color: var(--gr-night);
  background-image:
    linear-gradient(to right, rgba(51, 45, 69, .9) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(51, 45, 69, .9) 1px, transparent 1px),
    linear-gradient(to right, rgba(51, 45, 69, .4) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(51, 45, 69, .4) 1px, transparent 1px);
  background-size: 130px 130px, 130px 130px, 26px 26px, 26px 26px;
  border: 1px solid var(--gr-night-rule);
  border-radius: 18px;
  padding: clamp(1.6rem, 5vw, 3.6rem);
  color: var(--gr-paper);
  overflow: hidden;
}
.gr-icon { display: block; width: 72px; height: 72px; border-radius: 17px; margin-bottom: 1.3rem; }
.gr-panel .label { color: var(--gr-sun); margin-bottom: 1rem; }
.gr-panel h1 {
  font-size: clamp(2.4rem, 5.4vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -.03em;
  margin: .4rem 0 1.3rem;
  color: var(--gr-paper);
}
.gr-sun { color: var(--gr-sun); }
.gr-panel .lede { max-width: 36rem; font-size: 1.12rem; line-height: 1.6; color: rgba(255, 244, 230, .8); }
.gr-panel .lede strong { color: var(--gr-paper); font-weight: 600; }
.gr-soon {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-top: 1.8rem;
  padding: .7rem 1.1rem;
  border: 1px solid var(--gr-sun);
  border-radius: 999px;
  color: var(--gr-paper);
}
.gr-soon i {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gr-sun);
  animation: livepulse 2.4s ease-in-out infinite;
}
.gr-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.4rem;
  margin: 1.6rem 0 0;
  padding: 1rem 0 0;
  list-style: none;
  border-top: 1px solid var(--gr-night-rule);
}
.gr-platforms li {
  font-family: "Company31 Mono", "Spline Sans Mono", monospace;
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gr-dim);
}
.gr-phone {
  margin: 0 auto;
  max-width: 300px;
  border: 8px solid var(--gr-night-rule);
  border-radius: 44px;
  overflow: hidden;
  background: #FFF7EC;
}
.gr-phone img { display: block; width: 100%; height: auto; }

/* --- coming soon ------------------------------------------------------ */

.gr-getgrid { max-width: 46rem; margin-top: 1.4rem; }
.gr-get {
  border: 1px solid var(--card-border);
  border-left: 3px solid var(--gr-sun);
  border-radius: 14px;
  padding: 1.6rem;
  background: var(--ground);
}
.gr-get h3 { font-size: 1.2rem; letter-spacing: -.01em; margin-bottom: .6rem; }
.gr-get p { font-size: .95rem; line-height: 1.65; color: var(--muted); margin: 0 0 .75rem; }
.gr-get strong { color: var(--text); font-weight: 600; }
.gr-req { color: var(--accent); font-size: .72rem; line-height: 1.8; margin: 0 !important; }

/* --- the five kinds of smile ------------------------------------------ */

.gr-kinds {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 1rem;
  margin-top: 1.4rem;
  padding: 0;
  list-style: none;
}
.gr-kind {
  border: 1px solid var(--card-border);
  border-top: 4px solid var(--gr-sun);
  border-radius: 14px;
  padding: 1.1rem 1.2rem 1.2rem;
  background: var(--gr-card);
}
.gr-kind-coral { border-top-color: var(--gr-coral); }
.gr-kind-sky { border-top-color: var(--gr-sky); }
.gr-kind-mint { border-top-color: var(--gr-mint); }
.gr-kind-lilac { border-top-color: var(--gr-lilac); }
.gr-kind .gr-cap { display: block; margin-bottom: .6rem; }
.gr-kind blockquote { margin: 0; font-size: 1rem; line-height: 1.5; color: var(--text); }
.gr-kind .gr-then { margin: .55rem 0 0; font-size: .92rem; line-height: 1.5; color: var(--muted); }
.gr-cap {
  font-family: "Company31 Mono", "Spline Sans Mono", monospace;
  font-weight: 500;
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}

/* --- right now -------------------------------------------------------- */

.gr-moments {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  gap: 0 1.6rem;
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
}
.gr-moments li { border-top: 1px solid var(--hairline); padding: .9rem 0 1rem; }
.gr-moments b { display: block; font-size: 1.05rem; color: var(--text); margin-bottom: .2rem; }
.gr-moments span { font-size: .93rem; color: var(--muted); }
.gr-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .5rem; background: var(--gr-sun); }
.gr-dot-coral { background: var(--gr-coral); }
.gr-dot-sky { background: var(--gr-sky); }
.gr-dot-mint { background: var(--gr-mint); }
.gr-dot-lilac { background: var(--gr-lilac); }

.gr-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1.6rem 2.2rem;
  margin-top: 1.6rem;
}
.gr-cols > div { border-top: 1px solid var(--hairline); padding-top: 1rem; }
.gr-cols h3 { font-size: 1.05rem; letter-spacing: -.005em; margin-bottom: .45rem; }
.gr-cols p { font-size: .95rem; line-height: 1.65; color: var(--muted); margin: 0; }

/* --- screenshots ------------------------------------------------------ */

.gr-shots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
  max-width: 880px;
  margin-top: 1.4rem;
  align-items: start;
}
.gr-shot { margin: 0; border: 1px solid var(--hairline); border-radius: 14px; overflow: hidden; background: #FFF7EC; }
.gr-shot img { display: block; width: 100%; height: auto; }
.gr-shot figcaption {
  font-family: "Company31 Mono", "Spline Sans Mono", monospace;
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--ground);
  padding: .7rem .9rem;
  border-top: 1px solid var(--hairline);
}

/* --- privacy ---------------------------------------------------------- */

.gr-privacy {
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--gr-coral);
  border-radius: 12px;
  padding: 1.5rem 1.6rem;
  margin-top: 1.4rem;
  background: var(--gr-card);
}
.gr-privacy p { font-size: .96rem; line-height: 1.7; color: var(--muted); margin: 0 0 .8rem; }
.gr-privacy p:last-child { margin-bottom: 0; }
.gr-privacy strong { color: var(--text); font-weight: 600; }
.gr-nots { list-style: none; margin: 0 0 1.2rem; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.gr-nots li {
  font-family: "Company31 Mono", "Spline Sans Mono", monospace;
  font-weight: 500;
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .35rem .75rem;
}
.gr-nots li.gr-label-dnc { background: var(--gr-night); color: var(--gr-sun); border-color: var(--gr-night); }

/* --- honest note, requirements, support -------------------------------- */

.gr-honest { max-width: 46rem; margin-top: 1.2rem; }
.gr-honest p { font-size: .97rem; line-height: 1.7; color: var(--muted); margin: 0 0 .8rem; }
.gr-honest strong { color: var(--text); font-weight: 600; }

.gr-reqs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 0 2rem;
  margin: 1.2rem 0 0;
}
.gr-reqs > div { border-top: 1px solid var(--hairline); padding: .9rem 0 1rem; }
.gr-reqs dt {
  font-family: "Company31 Mono", "Spline Sans Mono", monospace;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.gr-reqs dd { margin: .35rem 0 0; font-size: .96rem; line-height: 1.6; color: var(--muted); }
.gr-reqs dd strong {
  display: block;
  font-family: "Company31 Sans", "Bricolage Grotesque", sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: .15rem;
}
.gr-supportlede { max-width: 40rem; font-size: 1.05rem; line-height: 1.65; color: var(--muted); }
.gr-credit { margin-top: .5rem; font-size: .72rem; }

/* --- narrow screens --------------------------------------------------- */

@media (max-width: 860px) {
  .gr-panel { grid-template-columns: 1fr; }
  .gr-phone { max-width: 260px; }
}

@media (max-width: 640px) {
  .gr-hero .wrap { padding-inline: 1rem; }
  .gr-panel { border-radius: 14px; padding: 1.6rem 1.25rem 1.5rem; }
  /* The three screens scroll sideways in their own row, so the page never does. */
  .gr-shots {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 64%;
    gap: .8rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    padding-bottom: .6rem;
  }
  .gr-shot { scroll-snap-align: start; }
  .gr-privacy { padding: 1.25rem 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .gr-soon i { animation: none; }
}
html.a11y-motion .gr-soon i { animation: none; }

@media (max-width: 420px) {
  .hrow { gap: .6rem; }
  .hnav { gap: .6rem; }
}
