/* ============================================
   Capture Landing Page — styles.css
   Reference: .superpowers/brainstorm/.../full-page-v7.html
   ============================================ */

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

html {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: #faf9f7;
  color: #000;
  transition: background 0.6s ease, color 0.6s ease;
  overflow-x: hidden;
}
body.dark {
  background: #0a0a0a;
  color: #f0ede8;
}

/* ---- Page shell ---- */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hero {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 72px 32px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

/* ---- Fade utility ---- */
.fade-element {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.8s ease, transform 0.6s ease;
}
.fade-element.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Header group — compact at top ---- */
.header-group {
  width: 100%;
  margin-bottom: 40px;
  text-align: center;
}

/* ---- Light bulb ---- */
.bulb-container {
  cursor: pointer;
  user-select: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto 16px;
  background: none;
  border: none;
  padding: 0;
  position: relative;
  z-index: 3;
}
.bulb {
  font-size: 36px;
  transition: filter 0.6s ease, transform 0.15s ease;
}
.bulb:hover { transform: scale(1.15); }
body.dark .bulb { filter: saturate(0.4) brightness(0.5); }

/* ---- Headline ---- */
.headline {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1.05;
  margin-bottom: 12px;
  color: #000;
  transition: color 0.6s ease;
}
body.dark .headline { color: #f0ede8; }

/* ---- Subtitle ---- */
.subtitle {
  font-size: 20px;
  line-height: 1.4;
  max-width: 500px;
  margin: 0 auto;
  color: #9f9b93;
  transition: color 0.6s ease;
}
body.dark .subtitle { color: #666; }

/* ---- Window tagline ---- */
.window-tagline {
  font-size: 15px;
  line-height: 1.6;
  color: #9f9b93;
  max-width: 420px;
  text-align: center;
  margin: 0 auto;
  padding-bottom: 32px;
  transition: color 0.6s ease;
}
body.dark .window-tagline { color: #666; }

.mini-keycap {
  display: inline-block;
  padding: 1px 6px;
  margin: 0 1px;
  font-size: 12px;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  color: #333;
  background: linear-gradient(180deg, #f8f8f8 0%, #e8e8e8 100%);
  border: 1px solid #c4c4c4;
  border-bottom: 2px solid #b0b0b0;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.8);
  vertical-align: baseline;
  line-height: 1.4;
  transition: color 0.6s ease, background 0.6s ease, border-color 0.6s ease;
}
body.dark .mini-keycap {
  color: #ccc;
  background: linear-gradient(180deg, #333 0%, #222 100%);
  border-color: #444;
  border-bottom-color: #555;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05);
}

/* ---- Email signup (Ghost form) ---- */
.email-area {
  padding-top: 0;
  position: relative;
  z-index: 3;
}
.ghost-form-wrapper {
  max-width: 440px;
  margin: 0 auto;
}

/* ---- Footer ---- */
.page-footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 32px 32px 40px;
  font-size: 14px;
  color: #9f9b93;
  transition: color 0.6s ease;
}
body.dark .page-footer { color: #444; }
.page-footer a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---- Blackout overlay ---- */
.blackout {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  z-index: 1000;
  transition: opacity 0.2s ease;
}
.blackout.flash {
  opacity: 1;
  pointer-events: all;
}

/* ============================================
   Capture Window
   ============================================ */

.window-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 0 56px;
  min-height: 380px;
}

.capture-window {
  width: 480px;
  border-radius: 16px;
  overflow: hidden;
  opacity: 0;
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.07);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
  transition: box-shadow 1s ease, border-color 0.6s ease, background 0.6s ease, opacity 0.6s ease;
  position: relative;
  z-index: 3;
}
.capture-window.visible { opacity: 1; }

/* Orange glow — initial bloom */
.capture-window.orange-glow {
  box-shadow: 0 0 40px rgba(242,122,26,0.3), 0 0 80px rgba(242,122,26,0.15), 0 8px 32px rgba(0,0,0,0.08);
}

/* Breathing glow — persistent after load */
.capture-window.light-settled {
  animation: orange-breathe 4s ease-in-out infinite;
}

@keyframes orange-breathe {
  0%, 100% {
    box-shadow: 0 0 32px rgba(242,122,26,0.25), 0 0 62px rgba(242,122,26,0.1), 0 8px 32px rgba(0,0,0,0.06);
    transform: translateY(0px);
  }
  50% {
    box-shadow: 0 0 55px rgba(242,122,26,0.33), 0 0 99px rgba(242,122,26,0.154), 0 0 143px rgba(242,122,26,0.066), 0 12px 36px rgba(0,0,0,0.08);
    transform: translateY(-3px);
  }
}

/* Dark mode window */
body.dark .capture-window {
  background: rgba(30,30,32,0.85);
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
body.dark .capture-window.glowing {
  box-shadow: 0 0 40px rgba(242,122,26,0.22), 0 0 80px rgba(242,122,26,0.13), 0 0 120px rgba(242,122,26,0.066), 0 8px 32px rgba(0,0,0,0.5);
  animation: breathe-dark 4s ease-in-out infinite;
}

@keyframes breathe-dark {
  0%, 100% {
    box-shadow: 0 0 38px rgba(242,122,26,0.19), 0 0 75px rgba(242,122,26,0.1), 0 8px 32px rgba(0,0,0,0.5);
    transform: translateY(0px);
  }
  50% {
    box-shadow: 0 0 55px rgba(242,122,26,0.275), 0 0 110px rgba(242,122,26,0.154), 0 0 154px rgba(242,122,26,0.066), 0 12px 36px rgba(0,0,0,0.5);
    transform: translateY(-3px);
  }
}

/* ---- Window internals ---- */
.cw-header {
  display: flex;
  align-items: center;
  padding: 14px 16px 10px;
  gap: 10px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  transition: border-color 0.6s ease;
}
body.dark .cw-header { border-bottom: 1px solid rgba(255,255,255,0.08); }

.cw-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.cw-title-group { flex: 1; min-width: 0; text-align: left; }
.cw-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: #000;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.6s ease;
}
body.dark .cw-title { color: #e0ddd8; }

.cw-subtitle {
  font-size: 11px;
  color: #8e8e93;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.6s ease;
}
body.dark .cw-subtitle { color: #666; }

.cw-close {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 500;
  background: rgba(0,0,0,0.05);
  color: #8e8e93;
  flex-shrink: 0;
  transition: background 0.6s ease, color 0.6s ease;
}
body.dark .cw-close { background: rgba(255,255,255,0.08); color: #666; }

.cw-body {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cw-textarea {
  font-size: 14px;
  line-height: 1.5;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  color: #333;
  min-height: 72px;
  transition: color 0.6s ease;
  text-align: left;
}
body.dark .cw-textarea { color: #bbb; }

.cw-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(0,0,0,0.03);
  transition: background 0.6s ease;
}
body.dark .cw-tags { background: rgba(255,255,255,0.04); }

.cw-tag {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 100px;
  font-weight: 500;
  background: rgba(0,0,0,0.06);
  color: #333;
  transition: background 0.6s ease, color 0.6s ease;
}
body.dark .cw-tag { background: rgba(255,255,255,0.08); color: #aaa; }

.cw-tag-suggestion {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 100px;
  font-weight: 500;
  background: transparent;
  color: rgba(251,146,60,0.9);
  border: 1px dashed rgba(251,146,60,0.35);
  transition: color 0.6s ease, border-color 0.6s ease;
}
body.dark .cw-tag-suggestion { color: rgba(251,146,60,0.7); border-color: rgba(251,146,60,0.25); }

.cw-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-top: 1px solid rgba(0,0,0,0.05);
  transition: border-color 0.6s ease;
}
body.dark .cw-footer { border-top: 1px solid rgba(255,255,255,0.05); }

.cw-folder {
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #8e8e93;
  padding: 5px 9px;
  border-radius: 7px;
  transition: color 0.6s ease;
}
body.dark .cw-folder { color: #555; }
.cw-folder .chevron { font-size: 8px; margin-left: 2px; }

.cw-capture-btn {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 22px;
  border-radius: 8px;
  border: 1px solid rgba(249,115,22,0.3);
  background: rgb(249,115,22);
  color: #fff;
  box-shadow: 0 2px 8px rgba(249,115,22,0.4);
  transition: box-shadow 0.8s ease;
}
body.dark .cw-capture-btn {
  box-shadow: 0 2px 8px rgba(249,115,22,0.4), 0 0 16px rgba(249,115,22,0.2);
}

/* ============================================
   Keycaps Intro Animation
   ============================================ */

.keycaps-intro {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.keycaps-intro.visible { opacity: 1; }
.keycaps-intro.gone { display: none; }

.keycap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  height: 56px;
  padding: 0 16px;
  background: linear-gradient(180deg, #f8f8f8 0%, #e8e8e8 100%);
  border: 1px solid #c4c4c4;
  border-bottom: 3px solid #b0b0b0;
  border-radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: #333;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.8);
  transition: transform 0.1s ease, box-shadow 0.1s ease, border-bottom-width 0.1s ease;
}
.keycap.pressed {
  transform: translateY(2px);
  border-bottom-width: 1px;
  box-shadow: 0 0px 2px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.5);
}

.keycap-option { font-size: 16px; letter-spacing: 1px; }
.keycap-c { font-size: 20px; font-weight: 600; }

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

@media (max-width: 560px) {
  .headline {
    font-size: 32px;
    letter-spacing: -1.2px;
  }
  .subtitle { font-size: 17px; }

  .capture-window { width: calc(100vw - 48px); max-width: 480px; }

  .keycap {
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    font-size: 15px;
  }
  .keycap-option { font-size: 13px; }
  .keycap-c { font-size: 17px; }

  .hero { padding: 48px 16px 32px; }
  .window-area { padding: 32px 0 40px; min-height: 300px; }
}
