/* ============================================================
   openworld.run — landing page
   Sky-blue earthy theme, mirroring michaelvivirito.com structure
   ============================================================
   Dark editorial. Sky blue primary, terracotta + moss accents.
   Noise + scanlines + sky grid + glass cards + glow buttons.
   No build step. Fonts via @import. Minimal JS for scroll reveal.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,500;12..96,600;12..96,700&family=Cormorant+Garamond:ital,wght@0,400;0,500;1,300;1,400;1,500&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* LIGHT MODE — cloud cream + sky accents.
     Background reads as "looking up at sky on a clear day."
     Text is deep navy on near-white. Accents are sky-600 range
     so they have enough contrast against the bg. */

  /* Backgrounds — sky-tinted cream */
  --bg:        #f5fafd; /* near-white with a sky tint */
  --bg2:       #eaf4fb; /* slightly cooler card surface */
  --bg3:       #dbeafe; /* sky-100, deeper card surface */

  /* Sky blue accents — darker stops needed for contrast on light bg */
  --sky:       #0284c7; /* sky-600 — primary accent */
  --sky2:      #0369a1; /* sky-700 — deeper hover / heading accent */
  --sky3:      #075985; /* sky-800 — darkest for strong emphasis */
  --sky-mid:   #38bdf8; /* sky-400 — lighter splash for gradient flourishes */
  --sky-deep:  #0c4a6e; /* sky-900 — bottom stop for button gradient */
  --sky-glow:  #0284c7; /* sky-600 — top stop for button gradient */

  /* Earth accent — terracotta, deeper for light-bg contrast */
  --earth:     #b45309; /* amber-700 */
  --earth2:    #d97706; /* amber-600 */
  --earth3:    #f59e0b; /* amber-500 */

  /* Moss accent — for the "live" status badge, darker on light bg */
  --moss:      #4d7c0f; /* lime-700 */
  --moss2:     #65a30d; /* lime-600 */

  /* Pin-type semantic colors — same as the app, work in both modes */
  --pin-issue: #ef4444;
  --pin-idea:  #f59e0b;
  --pin-timer: #a855f7;
  --pin-kudos: #22c55e;

  /* Borders + glass — low-alpha sky-blue tints over light bg */
  --border:    rgba(2,132,199,0.16);
  --border-hi: rgba(2,132,199,0.38);
  --glass:     rgba(2,132,199,0.04);

  /* Text on light bg — deep navy primary, slate secondaries.
     Using solid hex values instead of alpha tints so contrast is
     predictable on the cream-with-sky-tint background. */
  --t1: #0c1828;  /* primary text — deep navy */
  --t2: #334155;  /* secondary — slate-700, ~AA on bg */
  --t3: #64748b;  /* muted — slate-500 */

  /* Typography */
  --font-display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
  --font-serif:   'Cormorant Garamond', Georgia, serif;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 0.75rem;
  --space-lg: 1rem;
  --space-xl: 1.5rem;
  --space-2xl: 2.5rem;
  --space-3xl: 4rem;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  font-size: 16px;
  background: var(--bg);
  min-height: 100vh;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--t1);
  background: var(--bg);
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-xl);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Noise overlay — full screen, low opacity, on top */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.025;
}

/* Scanlines — subtle CRT vibe */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.025) 2px,
    rgba(0,0,0,0.025) 4px
  );
}

/* ============================================================
   Typography
   ============================================================ */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--t1);
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  letter-spacing: -0.045em;
  line-height: 0.95;
  /* Cloud gradient — palest at top, soft cloud-blue at bottom */
  background: linear-gradient(135deg, var(--sky3) 0%, var(--sky2) 35%, var(--sky-mid) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: var(--sky2); /* fallback */
}

h2 {
  font-size: clamp(1.75rem, 3vw + 0.5rem, 2.5rem);
  letter-spacing: -0.035em;
  margin-bottom: var(--space-md);
}

h3 {
  font-size: clamp(1.05rem, 1.2vw + 0.5rem, 1.25rem);
  letter-spacing: -0.025em;
  margin-bottom: var(--space-sm);
}

h4 {
  font-size: 1rem;
  color: var(--sky-mid);
  letter-spacing: -0.02em;
}

p {
  margin-bottom: var(--space-md);
  color: var(--t2);
  line-height: 1.7;
}

strong { color: var(--t1); font-weight: 600; }

em {
  color: var(--sky3);
  font-style: italic;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.05em;
}

/* ============================================================
   Links
   ============================================================ */

a {
  color: var(--sky-mid);
  text-decoration: none;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

a:hover {
  color: var(--sky2);
  text-decoration: underline;
  text-decoration-color: rgba(2,132,199,0.5);
  text-underline-offset: 4px;
}

a:focus-visible {
  outline: 1px solid var(--sky);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
  padding: var(--space-3xl) var(--space-xl);
  margin-bottom: var(--space-2xl);
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(2,132,199,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(2,132,199,0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

.hero-content { position: relative; z-index: 1; }

.hero-logo {
  font-size: 5rem;
  margin-bottom: var(--space-md);
  display: inline-block;
  animation: pulse-glow 3s ease-in-out infinite;
  filter: drop-shadow(0 0 30px rgba(2,132,199,0.4));
}

.hero h1 { margin-bottom: var(--space-md); }

.hero-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.2rem, 2vw + 0.4rem, 1.6rem);
  color: var(--sky3);
  margin-bottom: var(--space-lg);
  font-weight: 400;
}

.hero-description {
  font-size: 1.05rem;
  color: var(--t2);
  max-width: 620px;
  margin: 0 auto var(--space-2xl);
  line-height: 1.7;
}

.hero-note {
  max-width: 540px;
  margin: var(--space-lg) auto;
  color: var(--t2);
  font-size: 0.9rem;
  line-height: 1.55;
  font-family: var(--font-mono);
  padding: var(--space-md) var(--space-lg);
  border-left: 2px solid var(--earth2);
  text-align: left;
  background: rgba(245,158,11,0.10);
  border-radius: 0 8px 8px 0;
}

.hero-note strong { color: var(--t1); }

.hero-ctas {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  margin-top: var(--space-lg);
  flex-wrap: wrap;
}

.hero-badge {
  display: inline-block;
  margin-top: var(--space-xl);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--moss);
  background: rgba(101,163,13,0.12);
  border: 1px solid rgba(101,163,13,0.38);
}

.hero-badge::before {
  content: '●';
  margin-right: 0.4em;
  color: var(--moss);
  animation: pulse-dot 2.5s ease-in-out infinite;
}

.scroll-hint {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--sky);
  font-size: 1.4rem;
  animation: bounce 2.5s ease-in-out infinite;
  opacity: 0.6;
  z-index: 1;
}

/* ============================================================
   Sections
   ============================================================ */

section {
  margin-bottom: var(--space-2xl);
  padding: var(--space-xl) 0;
  scroll-margin-top: 2rem;
}

.container { max-width: 920px; margin: 0 auto; }

.section-heading {
  text-align: center;
  margin-bottom: var(--space-sm);
}

.section-subheading {
  text-align: center;
  color: var(--t2);
  margin-bottom: var(--space-2xl);
  font-size: 1rem;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* ============================================================
   Cards / Boxes
   ============================================================ */

.card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: var(--space-xl);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.card:hover {
  border-color: var(--border-hi);
  transform: translateY(-2px);
}

.box-title {
  color: var(--sky-mid);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border);
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid transparent;
  line-height: 1.2;
}

.btn-primary {
  background: linear-gradient(135deg, var(--sky-glow), var(--sky-deep));
  border-color: var(--sky);
  color: #fff;
  box-shadow: 0 0 24px rgba(2,132,199,0.25), 0 4px 16px rgba(0,0,0,0.5);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--sky), var(--sky-glow));
  box-shadow: 0 0 40px rgba(2,132,199,0.4), 0 4px 24px rgba(0,0,0,0.6);
  transform: translateY(-2px);
  text-decoration: none;
  color: #fff;
}

.btn-ghost {
  background: rgba(2,132,199,0.04);
  border-color: rgba(2,132,199,0.45);
  color: var(--sky2);
}

.btn-ghost:hover {
  border-color: var(--sky);
  color: var(--sky3);
  background: rgba(2,132,199,0.10);
  transform: translateY(-2px);
  text-decoration: none;
}

/* Store buttons */

.store-btns {
  display: flex;
  gap: 0.85rem;
  justify-content: center;
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 0.7rem 1.4rem;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid rgba(2,132,199,0.2);
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  min-width: 200px;
  backdrop-filter: blur(8px);
}

.store-btn:hover {
  transform: translateY(-2px);
  background: rgba(10,19,32,0.95);
  border-color: rgba(2,132,199,0.45);
  box-shadow: 0 6px 24px rgba(2,132,199,0.18);
  color: #fff;
  text-decoration: none;
}

.store-btn-icon { width: 28px; height: 28px; flex-shrink: 0; }
.store-btn-text { text-align: left; line-height: 1.15; }
.store-btn-text small { display: block; font-size: 0.7rem; opacity: 0.85; font-weight: 400; letter-spacing: 0.02em; }
.store-btn-text strong { display: block; font-size: 1.05rem; font-weight: 600; }

/* ============================================================
   Philosophy section
   ============================================================ */

.philosophy-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.4rem, 2.5vw + 0.5rem, 1.9rem);
  text-align: center;
  color: var(--t1);
  max-width: 720px;
  margin: 0 auto var(--space-2xl);
  line-height: 1.35;
  font-weight: 400;
}

.philosophy-quote::before {
  content: '';
  display: block;
  width: 3rem;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--sky), transparent);
  margin: 0 auto var(--space-xl);
}

.philosophy-text {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  color: var(--t2);
  font-size: 1.02rem;
}

.philosophy-text p { margin-bottom: var(--space-lg); }
.philosophy-text strong { color: var(--t1); }

.founder-quote {
  border-left: 3px solid var(--earth);
  padding: var(--space-md) var(--space-xl);
  margin: var(--space-2xl) auto;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--t1);
  background: rgba(217,119,6,0.08);
  border-radius: 0 8px 8px 0;
  text-align: left;
  max-width: 640px;
}

.founder-quote p { font-style: italic; color: var(--t1); }
.founder-attribution {
  font-style: normal;
  font-family: var(--font-mono);
  color: var(--t3);
  font-size: 0.78rem;
  margin-top: var(--space-md) !important;
  letter-spacing: 0.04em;
}

/* ============================================================
   Origin card
   ============================================================ */

.origin-card {
  max-width: 720px;
  margin: 0 auto;
  border-left-width: 4px;
  border-left-color: var(--earth2);
  text-align: left;
}

.origin-card h2 { text-align: left; margin-bottom: var(--space-md); }

/* ============================================================
   Pin types grid
   ============================================================ */

.pin-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.pin-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-left: 4px solid;
  padding: var(--space-xl);
  border-radius: 10px;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.pin-card:hover {
  border-color: var(--border-hi);
  transform: translateY(-2px);
}

.pin-card.issue { border-left-color: var(--pin-issue); }
.pin-card.idea  { border-left-color: var(--pin-idea); }
.pin-card.timer { border-left-color: var(--pin-timer); }
.pin-card.kudos { border-left-color: var(--pin-kudos); }

.pin-card-icon { font-size: 1.5rem; margin-bottom: var(--space-sm); }
.pin-card p { font-size: 0.92rem; color: var(--t2); line-height: 1.55; margin-bottom: 0; }

/* ============================================================
   How it works — steps
   ============================================================ */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  text-align: center;
}

.step-icon {
  font-size: 2.25rem;
  margin-bottom: var(--space-sm);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--sky-mid);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--sky-mid);
  margin-bottom: var(--space-md);
  background: rgba(2,132,199,0.05);
}

.step h3 { margin-bottom: var(--space-sm); }
.step p { font-size: 0.92rem; color: var(--t2); margin-bottom: 0; }

/* ============================================================
   Coordination grid
   ============================================================ */

.coord-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.coord-item {
  background: var(--glass);
  border: 1px solid var(--border);
  padding: var(--space-lg);
  border-radius: 10px;
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.coord-item:hover {
  border-color: var(--border-hi);
  transform: translateY(-2px);
}

.coord-emoji { font-size: 1.5rem; flex-shrink: 0; margin-top: 0.15rem; }
.coord-item h3 { font-size: 1rem; margin-bottom: var(--space-xs); color: var(--t1); }
.coord-item p { font-size: 0.88rem; color: var(--t2); margin-bottom: 0; line-height: 1.55; }

/* ============================================================
   Features grid
   ============================================================ */

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

.feature-item {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  padding: var(--space-md);
  border-radius: 8px;
  transition: background 0.25s ease;
}

.feature-item:hover {
  background: rgba(2,132,199,0.03);
}

.feature-emoji { font-size: 1.5rem; flex-shrink: 0; margin-top: 0.15rem; }
.feature-item h3 { font-size: 1rem; margin-bottom: var(--space-xs); color: var(--t1); }
.feature-item p { font-size: 0.88rem; color: var(--t2); margin-bottom: 0; line-height: 1.55; }

/* ============================================================
   Trust grid
   ============================================================ */

.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  max-width: 720px;
  margin: 0 auto;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.92rem;
  color: var(--t2);
}

.trust-item:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  justify-content: center;
}

.trust-emoji { font-size: 1.2rem; flex-shrink: 0; }

/* ============================================================
   Footer CTA + bar
   ============================================================ */

.footer-cta {
  text-align: center;
  padding: var(--space-3xl) var(--space-md);
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--glass);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.footer-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(2,132,199,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(2,132,199,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

.footer-cta > * { position: relative; z-index: 1; }

.footer-cta h2 {
  margin-bottom: var(--space-md);
}

.footer-bar {
  border-top: 1px solid var(--border);
  padding: var(--space-xl) 0;
  margin-top: var(--space-2xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--t3);
}

.footer-brand { display: flex; align-items: center; gap: var(--space-sm); }

.footer-links {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: var(--t3);
  text-decoration: none;
}

.footer-links a:hover { color: var(--sky-mid); }

/* ============================================================
   Animations
   ============================================================ */

@keyframes pulse-glow {
  0%, 100% { filter: drop-shadow(0 0 0 transparent); }
  50% { filter: drop-shadow(0 0 30px rgba(2,132,199,0.5)); }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-logo { animation: none; }
  .scroll-hint { animation: none; }
  .hero-badge::before { animation: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   Scrollbar
   ============================================================ */

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: rgba(2,132,199,0.18);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(2,132,199,0.35); }

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 768px) {
  html { font-size: 15px; }
  body { padding: var(--space-md); }
  .hero { padding: var(--space-2xl) var(--space-md); }
  .pin-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: var(--space-2xl); }
  .coord-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; }
  .store-btn { min-width: 0; width: 100%; max-width: 280px; }
  .footer-bar { flex-direction: column; gap: var(--space-sm); text-align: center; }
  .scroll-hint { display: none; }
  .founder-quote, .hero-note { padding: var(--space-md); }
}