/* Shared design system for gryphonclaw.net and its apps.
   Pages add their own stylesheet after this one for anything app-specific
   (device mockups, feature-specific layouts, etc). */

:root {
  --accent: #1F8F61;
  --accent-soft: rgba(31, 143, 97, 0.12);
  --bg: #FFFFFF;
  --bg-secondary: #EDEDF2;
  --card: #FFFFFF;
  --text: #1D1D1F;
  --text-secondary: #6E6E73;
  --separator: rgba(0, 0, 0, 0.1);
  --device: #1D1D1F;
  --radius: 22px;
  --gutter: 20px;
  --max: 1080px;
  color-scheme: light dark;
}

/* Dark colors follow the system unless the visitor picked a theme with the toggle (theme.js). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #40C280;
    --accent-soft: rgba(64, 194, 128, 0.16);
    --bg: #000000;
    --bg-secondary: #111113;
    --card: #1C1C1E;
    --text: #F5F5F7;
    --text-secondary: #A1A1A6;
    --separator: rgba(255, 255, 255, 0.14);
    --device: #3A3A3C;
  }
}

:root[data-theme="dark"] {
  --accent: #40C280;
  --accent-soft: rgba(64, 194, 128, 0.16);
  --bg: #000000;
  --bg-secondary: #111113;
  --card: #1C1C1E;
  --text: #F5F5F7;
  --text-secondary: #A1A1A6;
  --separator: rgba(255, 255, 255, 0.14);
  --device: #3A3A3C;
  color-scheme: dark;
}

:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.47;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { display: block; max-width: 100%; height: 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));
}

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--separator);
  padding-top: env(safe-area-inset-top);
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text);
}
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.nav-links { display: flex; align-items: center; gap: 20px; font-size: 15px; }
.theme-toggle {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: -4px -6px -4px -8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
}
.theme-toggle:hover { color: var(--text); background: var(--bg-secondary); }
.theme-toggle svg { width: 20px; height: 20px; }
/* Show the moon in light mode (tap for dark) and the sun in dark mode (tap for light). */
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: none; }
}
.nav-links a { color: var(--text-secondary); }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a[aria-current] {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

/* Hero */
/* The top of the page fades from a hint of the accent color into the page background. */
.hero-area {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 14%, var(--bg)) 0%, var(--bg) 85%);
}

.hero {
  text-align: center;
  padding: 56px 0 24px;
}
.hero .icon {
  width: 112px;
  height: 112px;
  margin: 0 auto 24px;
  border-radius: 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}
h1 {
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.tagline {
  font-size: 21px;
  color: var(--text-secondary);
  max-width: 34ch;
  margin: 0 auto 14px;
}
/* Apple's official badge artwork, unmodified, with clear space of at least 1/4 its height */
.app-store-badge {
  display: inline-block;
  padding: 14px;
}
.app-store-badge img { height: 54px; width: auto; }
.platforms {
  margin-top: 4px;
  font-size: 14px;
  color: var(--text-secondary);
}

/* Sections */
section { padding: 64px 0; border-top: 1px solid var(--separator); }
/* Sections alternate backgrounds by position, starting shaded, so new sections fit in automatically. */
main > section:nth-of-type(odd) { background: var(--bg-secondary); }
h2 {
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
  text-align: center;
}
.lead {
  text-align: center;
  color: var(--text-secondary);
  max-width: 40ch;
  margin: 0 auto 40px;
}

/* Feature / link cards */
.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.feature {
  display: block;
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  color: inherit;
  text-decoration: none;
}
.feature[href]:hover { background: var(--bg-secondary); text-decoration: none; }
.feature .symbol {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 14px;
}
.feature .symbol svg { width: 24px; height: 24px; }
.feature h3 { font-size: 19px; margin: 0 0 6px; }
.feature p { margin: 0; color: var(--text-secondary); font-size: 16px; }

/* Eyebrow label */
.eyebrow {
  width: fit-content;
  margin: 0 auto 12px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bg);
}

/* Spotlight rows: an image beside a block of copy */
.spotlight {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  text-align: center;
}
.spotlight + .spotlight { margin-top: 72px; }
.spotlight .copy { max-width: 440px; }
.spotlight .copy h2 { margin-bottom: 12px; }
.spotlight .copy p { color: var(--text-secondary); margin: 0; }

/* Privacy policy */
.privacy {
  max-width: 720px;
  margin: 0 auto;
}
.privacy h2 { text-align: left; }
.privacy .badge {
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 24px 0 32px;
  font-weight: 600;
}
.privacy .badge svg { flex: none; width: 28px; height: 28px; color: var(--accent); }
.privacy h3 { font-size: 19px; margin: 28px 0 8px; }
.privacy p, .privacy li { color: var(--text-secondary); }
.privacy ul { padding-left: 20px; }
.privacy .updated { font-size: 14px; color: var(--text-secondary); margin: 0; }

footer {
  border-top: 1px solid var(--separator);
  padding: 28px 0 calc(28px + env(safe-area-inset-bottom));
  font-size: 13px;
  color: var(--text-secondary);
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

/* Share buttons */
.share-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.share-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 150px;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--separator);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.share-button[hidden] { display: none; }
.share-button:hover { text-decoration: none; background: var(--bg-secondary); }
.share-button svg { width: 22px; height: 22px; flex: none; }
/* Brand colors from each network's guidelines; Threads and X use black (white in Dark Mode). */
.share-facebook svg { color: #0866FF; }
.share-bluesky svg { color: #1185FE; }
.share-whatsapp svg { color: #25D366; }
.share-email svg,
.share-more svg { color: var(--accent); }

/* iPad Air portrait (820 points) and wider */
@media (min-width: 744px) {
  :root { --gutter: 40px; }
  .hero { padding-top: 80px; }
  h1 { font-size: 56px; }
  .tagline { font-size: 24px; }
  h2 { font-size: 40px; }
  .features { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .spotlight {
    flex-direction: row;
    justify-content: center;
    text-align: left;
    gap: 56px;
  }
  .spotlight.reverse { flex-direction: row-reverse; }
  .spotlight .copy h2 { text-align: left; }
}

/* iPad Air landscape (1180 points) and wider */
@media (min-width: 1100px) {
  .features { grid-template-columns: repeat(3, 1fr); }
}

/* iPhone layout: the app icon and name on top, with the section links on their own row below */
@media (max-width: 480px) {
  .nav .wrap {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
    height: auto;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .nav-links { flex-wrap: wrap; gap: 4px 14px; font-size: 14px; }
}
