/* =========================================================
   WolfChart landing page
   Sage palette: paler tints of the base colour rgb(104, 154, 104).
   "--ink" is a darkened version of the base so text and buttons
   pass WCAG AA contrast on white.
   ========================================================= */

:root {
  --base:   rgb(104, 154, 104);
  --ink:    #3d6a3d;
  --tint-1: #f4f8f4;   /* page wash */
  --tint-2: #e3eee3;   /* panels */
  --tint-3: #c3dac3;   /* borders, rules */

  --white:  #ffffff;
  --text:   #1f2a2e;
  --muted:  #5b676b;
  --radius: 6px;
  --font-sans: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Consolas", "SFMono-Regular", "Menlo", monospace;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  line-height: 1.6;
  background: var(--white);
}

.page {
  min-height: 100vh;
  background:
    linear-gradient(var(--tint-1), var(--white) 520px);
}

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

h1, h2 { line-height: 1.15; margin: 0; }

a { color: var(--ink); }

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--tint-3);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  color: var(--text);
}

.brand__logo {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 0 0 1px var(--tint-3);
}

/* logo background = palette base colour */
.brand__logo-bg {
  fill: var(--base);
}

.brand__name {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: .01em;
}
.brand__name--small { font-size: 1rem; }

.site-nav { display: flex; gap: 1.75rem; }

.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: .95rem;
  padding-block: .3rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--base);
}

/* ---------- Hero ---------- */
.hero { padding: 4.5rem 0 3.5rem; }

.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 1rem;
  display: inline-block;
  padding: .3rem .65rem;
  background: var(--tint-2);
  border-radius: 4px;
}

.hero h1 {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -.02em;
}

.hero__tagline {
  font-size: 1.35rem;
  color: var(--muted);
  margin: .6rem 0 2rem;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; }

/* Screenshots as prints scattered on a desk */
.prints {
  position: relative;
  aspect-ratio: 1 / 0.8;
  /* soft "desk" pool of colour behind the prints */
  background: radial-gradient(closest-side, var(--tint-2), transparent);
}

.print {
  position: absolute;
  width: 58%;
  margin: 0;
  padding: 3% 3% 0;
  background: var(--white);
  border-radius: 2px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, .12),
    0 12px 28px -10px rgba(0, 0, 0, .28);
  transform: rotate(var(--tilt));
  transition: transform .25s ease, box-shadow .25s ease;
}

.print img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #e3e6e8;
}

.print figcaption {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .02em;
  line-height: 1.35;
  color: var(--muted);
  padding: .55rem 0 .65rem;
  border-bottom: 3px solid var(--base);  /* base-colour edge */
}

/* Spread out so each print's centre stays visible:
   two across the top, one centred below, overlapping only at the edges */
.print--back   { --tilt: -5deg;   top: 0;    left: 0;   z-index: 1; }
.print--middle { --tilt: 4deg;    top: 4%;   right: 0;  z-index: 2; }
.print--front  { --tilt: -1.5deg; bottom: 0; left: 21%; z-index: 3; }

/* lift a print to the top of the pile */
.print:hover,
.print:focus-visible {
  z-index: 5;
  transform: rotate(0deg) scale(1.04);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, .12),
    0 28px 50px -16px rgba(0, 0, 0, .35);
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  .print { transition: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: .75rem 1.35rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  border: 1.5px solid var(--ink);
  transition: background-color .15s, color .15s;
}

.btn--primary { background: var(--ink); color: var(--white); }
.btn--primary:hover { background: var(--base); border-color: var(--base); }

.btn--ghost { background: var(--white); color: var(--ink); }
.btn--ghost:hover { background: var(--tint-2); }

.btn:focus-visible {
  outline: 3px solid var(--tint-3);
  outline-offset: 2px;
}

/* ---------- Warning modal (opened via :target) ---------- */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  place-items: center;
  padding: 1.5rem;
}

/* open when any of its markers is the URL target (no JS),
   or when script.js adds .is-open */
.modal:has(.modal__marker:target),
.modal.is-open { display: grid; }

/* stop the page scrolling behind the open modal */
html:has(.modal__marker:target),
html:has(.modal.is-open) { overflow: hidden; }

.modal__marker { position: absolute; top: 0; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 28, 30, .55);
  backdrop-filter: blur(3px);
  cursor: default;
}

.modal__box {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  background: var(--white);
  border-top: 5px solid var(--base);
  border-radius: var(--radius);
  padding: 2rem 2rem 1.75rem;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .45);
  animation: modal-in .2s ease-out;
}

.modal__box .notice__icon { margin-bottom: 1rem; }

.modal__box p { margin: 0 0 1.75rem; }

.modal__close {
  position: absolute;
  top: .6rem;
  right: .8rem;
  font-size: 1.6rem;
  line-height: 1;
  text-decoration: none;
  color: var(--muted);
  padding: .2rem .4rem;
  border-radius: 4px;
}
.modal__close:hover { color: var(--ink); background: var(--tint-2); }

.modal__actions { display: flex; flex-wrap: wrap; gap: .7rem; }

/* show only the Continue button for the link that opened the modal */
.modal__go { display: none; }
.modal:has(#go-online:target)   .modal__go--online,
.modal:has(#go-download:target) .modal__go--download,
.modal:has(#go-android:target)  .modal__go--android,
.modal:has(#go-ios:target)      .modal__go--ios,
.modal[data-go="online"]   .modal__go--online,
.modal[data-go="download"] .modal__go--download,
.modal[data-go="android"]  .modal__go--android,
.modal[data-go="ios"]      .modal__go--ios { display: inline-block; }

@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .modal__box { animation: none; }
}

/* "app-link--direct": links straight to the app, no warning modal.
   Behaviour comes from its real href; the class marks the intent and keeps styling hooks. */
.app-link--direct {}

.notice__icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 2px solid var(--ink);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.15rem;
}

.notice__title {
  font-family: var(--font-mono);
  font-size: .85rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: .4rem;
}


/* ---------- Option cards ---------- */
.options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 3.5rem 0 5rem;
}

/* Each card spans 4 shared rows (index, heading, text, buttons) via subgrid,
   so headings and text line up across cards and buttons sit on one baseline. */
.card {
  display: grid;
  grid-row: span 4;
  grid-template-rows: subgrid;
  row-gap: 0;
  justify-items: start;
  background: var(--white);
  border: 1px solid var(--tint-3);
  border-top: 4px solid var(--base);
  border-radius: var(--radius);
  padding: 1.75rem;
  scroll-margin-top: 90px;
}

.card__index {
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--ink);
  margin: 0 0 1rem;
  letter-spacing: .08em;
}
.card__index span {
  color: var(--muted);
  text-transform: uppercase;
  margin-left: .5rem;
  padding-left: .6rem;
  border-left: 1px solid var(--tint-3);
}

.card h2 { font-size: 1.3rem; margin-bottom: .75rem; }

.card h2 { align-self: start; }

.card p { color: var(--muted); margin: 0 0 1.5rem; align-self: start; }

.card > .btn,
.card__actions { align-self: end; }

.card__actions { display: flex; gap: .6rem; }

/* ---------- Unavailable (e.g. native apps not yet released) ----------
   Add/remove the "is-unavailable" class on a nav link or card. */
.site-nav a.is-unavailable {
  color: #a9b0b3;
  pointer-events: none;
  border-bottom-color: transparent;
}
.site-nav a.is-unavailable::after {
  content: " (soon)";
  font-size: .8em;
}

.card.is-unavailable {
  background: #f6f7f7;
  border-color: #e1e4e5;
  border-top-color: #c9ced0;
  filter: grayscale(1);
  opacity: .7;
}
.card.is-unavailable .card__index span::after {
  content: "Coming soon";
  margin-left: .6rem;
  padding: .1rem .45rem;
  border: 1px solid currentColor;
  border-radius: 3px;
  font-size: .9em;
}
.card.is-unavailable .btn {
  pointer-events: none;
  background: #d5d9db;
  border-color: #d5d9db;
  color: #6f777a;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--tint-3);
  background: var(--tint-1);
  font-size: .85rem;
  color: var(--muted);
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  padding-block: 1.5rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .options { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .site-nav { display: none; }
  .print figcaption { font-size: .6rem; padding: .35rem 0 .45rem; }
}
