/* ============================================
   Roost — Marketing Site
   Aesthetic: Digital Hearth
   Warm, trustworthy, approachable
   ============================================ */

:root {
  /* Palette */
  --bg-deep:       #121010;
  --bg:            #1a1714;
  --bg-surface:    #23201a;
  --bg-raised:     #2e2a22;
  --accent:        #c8a44e;
  --accent-soft:   #c8a44e33;
  --accent-glow:   #c8a44e18;
  --green:         #7d9b76;
  --green-soft:    #7d9b7622;
  --text:          #ede8df;
  --text-muted:    #9a9488;
  --text-dim:      #6b6560;
  --border:        #2e2a2244;

  /* Typography */
  --font-display:  'Fraunces', Georgia, serif;
  --font-body:     'Outfit', system-ui, sans-serif;

  /* Spacing */
  --section-pad:   clamp(80px, 12vw, 160px);
  --inner-max:     1120px;
}

/* ---- Reset & Base ---- */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--text);
}

img {
  display: block;
  max-width: 100%;
}

/* ---- Shared ---- */

.section-inner {
  max-width: var(--inner-max);
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 48px);
}

.section-eyebrow {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.section-eyebrow--green {
  color: var(--green);
}

.section-heading {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.15;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}

.section-subheading {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 540px;
  margin-bottom: 56px;
}

/* ---- Buttons ---- */

.btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  padding: 14px 32px;
  border-radius: 8px;
  transition: all 0.25s ease;
  cursor: pointer;
  text-decoration: none;
}

.btn--primary {
  background: var(--accent);
  color: var(--bg);
}
.btn--primary:hover {
  background: #d9b45a;
  color: var(--bg);
  transform: translateY(-1px);
  box-shadow: 0 8px 32px #c8a44e33;
}

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn--ghost:hover {
  color: var(--text);
  border-color: var(--text-dim);
}

.btn--large {
  padding: 18px 40px;
  font-size: 16px;
  border-radius: 10px;
}
.btn-meta {
  font-size: 12px;
  font-weight: 400;
  opacity: 0.6;
}

/* ---- Nav ---- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 clamp(24px, 5vw, 48px);
  background: #1a1714e6;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--inner-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.02em;
}
.nav-logo:hover {
  color: var(--text);
}

.logo-mark {
  display: block;
  width: 24px;
  height: 24px;
  background: var(--accent);
  border-radius: 5px;
  position: relative;
}
.logo-mark::after {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 2px;
  background: var(--bg);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}
.nav-links a:hover {
  color: var(--text);
}
.nav-cta {
  background: var(--bg-raised);
  padding: 8px 20px;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.nav-cta:hover {
  border-color: var(--accent-soft);
}

/* ---- Hero ---- */

.hero {
  position: relative;
  padding-top: calc(64px + var(--section-pad));
  padding-bottom: var(--section-pad);
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-bg-grain {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px;
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
}
.hero-glow--1 {
  width: 600px;
  height: 600px;
  top: -100px;
  right: -100px;
  background: radial-gradient(circle, #c8a44e10 0%, transparent 70%);
}
.hero-glow--2 {
  width: 500px;
  height: 500px;
  bottom: -50px;
  left: -150px;
  background: radial-gradient(circle, #7d9b7609 0%, transparent 70%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--inner-max);
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 48px);
}

.hero-eyebrow {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.2s forwards;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(44px, 7vw, 80px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.35s forwards;
}
.hero-title em {
  font-style: italic;
  color: var(--accent);
}

.hero-subtitle {
  font-size: clamp(17px, 2vw, 19px);
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.5s forwards;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.65s forwards;
}

/* ============================================
   FOR YOU — End-user audience
   ============================================ */

.audience--users {
  padding: var(--section-pad) 0;
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.audience-intro {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 64px;
  line-height: 1.7;
}

/* Pillars — the three core promises */

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 80px;
}

.pillar {
  padding: 44px 36px;
  background: var(--bg);
  transition: background 0.3s ease;
}
.pillar:hover {
  background: var(--bg-surface);
}

.pillar-icon {
  color: var(--accent);
  margin-bottom: 24px;
}

.pillar-title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 500;
  margin-bottom: 12px;
}

.pillar-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Setup box — terminal + stats */

.setup-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.setup-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.5vw, 32px);
  font-weight: 500;
  margin-bottom: 16px;
}

.setup-desc {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 440px;
}

.setup-stats {
  display: flex;
  gap: 40px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-number {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 400;
  line-height: 1;
  color: var(--accent);
}
.stat-label {
  font-size: 14px;
  color: var(--text-dim);
}

/* Terminal */

.setup-terminal {
  border-radius: 12px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow:
    0 4px 24px rgba(0,0,0,0.3),
    0 0 0 1px rgba(200,164,78,0.04);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  background: #1a17140a;
  border-bottom: 1px solid var(--border);
}
.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-raised);
}
.terminal-title {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-dim);
}

.terminal-body {
  padding: 20px 20px 24px;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 13.5px;
  line-height: 1.85;
}

.terminal-line {
  white-space: nowrap;
}
.terminal-line--output {
  padding-left: 20px;
}
.terminal-prompt {
  color: var(--accent);
  margin-right: 8px;
}
.terminal-cmd {
  color: var(--text);
}
.terminal-muted {
  color: var(--text-dim);
}
.terminal-accent {
  color: var(--accent);
}
.terminal-highlight {
  color: var(--green);
}
.terminal-line--success {
  color: var(--green);
}
.terminal-check {
  margin-right: 4px;
}

/* ============================================
   APPS — bridges both audiences
   ============================================ */

.apps {
  padding: var(--section-pad) 0;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.app-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 36px 32px 32px;
  transition: all 0.3s ease;
  position: relative;
}
.app-card:hover {
  border-color: var(--accent-soft);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

.app-card--soon {
  border-style: dashed;
  opacity: 0.7;
}
.app-card--soon:hover {
  opacity: 1;
}

.app-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.app-card-icon--music {
  background: #c8a44e15;
  color: var(--accent);
}
.app-card-icon--chat {
  background: #7d9b7615;
  color: var(--green);
}
.app-card-icon--video {
  background: #9b767d15;
  color: #c07a82;
}
.app-card-icon--photos {
  background: #7d8b9b15;
  color: #7d8b9b;
}
.app-card-icon--writer {
  background: #9b8b7d15;
  color: #c0a07a;
}
.app-card-icon--books {
  background: #9b8b7d15;
  color: #c0a07a;
}
.app-card-icon--passwords {
  background: #7d9b9615;
  color: #7d9b96;
}
.app-card-icon--more {
  background: #9a948815;
  color: var(--text-muted);
}

.app-card-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 10px;
}

.app-card-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.app-card-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: var(--bg-raised);
  padding: 4px 12px;
  border-radius: 4px;
}

/* ============================================
   NATIVE APPS
   ============================================ */

.native {
  padding: var(--section-pad) 0;
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.native-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.native-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px 28px;
  transition: all 0.3s ease;
}
.native-card:hover {
  border-color: var(--accent-soft);
  background: var(--bg-surface);
}

.native-card-icon {
  color: var(--accent);
  margin-bottom: 20px;
}

.native-card-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 16px;
}

.native-card-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.native-card-list li {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  padding-left: 20px;
  position: relative;
}
.native-card-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--accent);
  opacity: 0.4;
}

.native-card-list kbd {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 12px;
  background: var(--bg-raised);
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid var(--border);
}

/* ============================================
   FOR DEVELOPERS — Dev audience
   ============================================ */

.audience--devs {
  padding: var(--section-pad) 0;
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* Dev feature grid — 3 cols */

.dev-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 80px;
}

.dev-feature {
  padding: 32px 28px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: all 0.3s ease;
}
.dev-feature:hover {
  border-color: var(--green-soft);
  background: var(--bg-surface);
}

.dev-feature-icon {
  color: var(--green);
  margin-bottom: 20px;
}

.dev-feature-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 10px;
}

.dev-feature-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Dev showcase — list + code side by side */

.dev-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.dev-showcase-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.5vw, 30px);
  font-weight: 500;
  margin-bottom: 28px;
}

.dev-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dev-list li {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  padding-left: 24px;
  position: relative;
}
.dev-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--green);
  opacity: 0.5;
}
.dev-list li strong {
  color: var(--text);
  font-weight: 500;
}

/* Code Block */

.code-block {
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  overflow: hidden;
}

.code-header {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-raised);
}
.code-filename {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-dim);
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}

.code-body {
  padding: 24px;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 13.5px;
  line-height: 1.75;
  overflow-x: auto;
}
.code-body code {
  color: var(--text-muted);
}

.code-kw { color: #c07a82; }
.code-type { color: var(--accent); }
.code-fn { color: var(--green); }
.code-str { color: #9bb87d; }
.code-comment { color: var(--text-dim); font-style: italic; }

/* ============================================
   CTA
   ============================================ */

.cta {
  position: relative;
  padding: var(--section-pad) 0;
  text-align: center;
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  width: 600px;
  height: 400px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, #c8a44e0d 0%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
}

.cta-heading {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  position: relative;
}

.cta-body {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 48px;
  position: relative;
}

.cta-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  position: relative;
  margin-bottom: 32px;
}

.cta-signup {
  position: relative;
  margin-bottom: 32px;
}
.cta-signup-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.cta-input {
  font-family: var(--font-body);
  font-size: 16px;
  padding: 14px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-surface);
  color: var(--text);
  width: 300px;
  max-width: 100%;
  outline: none;
  transition: border-color 0.2s;
}
.cta-input::placeholder {
  color: var(--text-dim);
}
.cta-input:focus {
  border-color: var(--accent);
}
.cta-signup-msg {
  margin-top: 12px;
  font-size: 14px;
  min-height: 20px;
}
.cta-signup-msg--ok {
  color: var(--green);
}
.cta-signup-msg--err {
  color: #c45;
}

.cta-alt {
  font-size: 14px;
  color: var(--text-dim);
  position: relative;
}
.cta-alt a {
  color: var(--text-muted);
  text-decoration: underline;
  text-decoration-color: var(--text-dim);
  text-underline-offset: 3px;
}
.cta-alt a:hover {
  color: var(--text);
}

/* ============================================
   Footer
   ============================================ */

.footer {
  padding: 48px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-tagline {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 4px;
}

.footer-links {
  display: flex;
  gap: 32px;
}
.footer-links a {
  font-size: 14px;
  color: var(--text-dim);
}
.footer-links a:hover {
  color: var(--text);
}

/* ---- Animations ---- */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@media (max-width: 860px) {
  .pillars {
    grid-template-columns: 1fr;
  }

  .setup-box {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .apps-grid {
    grid-template-columns: 1fr;
  }

  .native-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .dev-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .dev-showcase {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

@media (max-width: 640px) {
  .nav-links a:not(.nav-cta) {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-top: calc(64px + 60px);
    padding-bottom: 80px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .setup-stats {
    gap: 24px;
  }

  .cta-actions {
    flex-direction: column;
    align-items: center;
  }
  .btn--large {
    width: 100%;
    max-width: 300px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 24px;
    text-align: center;
  }
}
