:root {
  --bg: #f8f8f6;
  --bg-card: #ffffff;
  --bg-elevated: #efefeb;
  --border: rgba(0, 0, 0, 0.06);
  --border-light: rgba(0, 0, 0, 0.12);
  --text: #18181a;
  --text-muted: #63636a;
  --text-dim: #9c9ca3;
  --accent: #1a7a4e;
  --accent-dim: rgba(26, 122, 78, 0.08);
  --accent-glow: rgba(26, 122, 78, 0.12);
  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: "Space Grotesk", "DM Sans", sans-serif;
  --shell-width: 1180px;
  --section-pad: 110px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
  --shadow-elevated: 0 12px 40px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] {
  --bg: #0b0b0e;
  --bg-card: #131316;
  --bg-elevated: #1c1c21;
  --border: rgba(255, 255, 255, 0.05);
  --border-light: rgba(255, 255, 255, 0.09);
  --text: #e4e4e7;
  --text-muted: #7f7f88;
  --text-dim: #55555c;
  --accent: #4fa87a;
  --accent-dim: rgba(79, 168, 122, 0.12);
  --accent-glow: rgba(79, 168, 122, 0.2);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-elevated: 0 12px 40px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.25);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background 400ms cubic-bezier(0.4, 0, 0.2, 1), color 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.02;
  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: 256px 256px;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
ul, ol { list-style: none; }

.section-shell {
  width: min(var(--shell-width), calc(100% - 64px));
  margin: 0 auto;
}

.section-eyebrow {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 18px;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 560px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 26px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  transition: transform 250ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 300ms ease, background 250ms ease;
  text-decoration: none;
}

.button.primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 8px 28px var(--accent-glow);
}

.button.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px var(--accent-glow);
}

[data-theme="dark"] .button.primary {
  color: #0b0b0e;
  box-shadow: 0 8px 28px rgba(79, 168, 122, 0.25);
}

[data-theme="dark"] .button.primary:hover {
  box-shadow: 0 14px 36px rgba(79, 168, 122, 0.35);
}

.button.secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border-light);
}

.button.secondary:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  color: var(--accent);
}

.button.small {
  min-height: 36px;
  padding: 0 16px;
  font-size: 0.82rem;
  border-radius: 8px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(248, 248, 246, 0.82);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  transition: background 400ms ease;
}

[data-theme="dark"] .site-header {
  background: rgba(11, 11, 14, 0.75);
}

.nav-shell {
  width: min(var(--shell-width), calc(100% - 64px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
}

.brand-name::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: 4px;
  vertical-align: middle;
  box-shadow: 0 0 8px var(--accent-glow);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.nav-links a {
  transition: color 200ms ease;
  position: relative;
}

.nav-links a:hover { color: var(--accent); }
.nav-links a.is-current { color: var(--accent); }

.nav-links a.is-current::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.theme-toggle {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: border-color 200ms ease, transform 200ms ease;
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.theme-icon {
  position: absolute;
  transition: transform 300ms ease, opacity 300ms ease;
}

.theme-icon-sun {
  opacity: 1;
  transform: translateY(0) rotate(0deg);
}

.theme-icon-moon {
  opacity: 0;
  transform: translateY(20px) rotate(-90deg);
}

[data-theme="dark"] .theme-icon-sun {
  opacity: 0;
  transform: translateY(-20px) rotate(90deg);
}

[data-theme="dark"] .theme-icon-moon {
  opacity: 1;
  transform: translateY(0) rotate(0deg);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.menu-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 200ms ease, opacity 200ms ease;
}

.hero {
  position: relative;
  padding: 100px 0 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, var(--accent-dim), transparent 70%);
}

.hero-shell {
  position: relative;
  z-index: 2;
  max-width: 780px;
}

.hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 24px;
}

.hero-line {
  display: block;
}

.hero-text {
  max-width: 580px;
  color: var(--text-muted);
  font-size: clamp(1rem, 1.8vw, 1.12rem);
  line-height: 1.7;
  margin-bottom: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 32px 0 0;
}

.hero-animate {
  opacity: 0;
  transform: translateY(24px);
  animation: heroFadeUp 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes heroFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

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

.apps-section::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-light), transparent);
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.app-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 350ms cubic-bezier(0.34, 1.56, 0.64, 1), border-color 300ms ease, box-shadow 350ms ease;
}

.app-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: var(--shadow-elevated);
}

.app-card-visual {
  position: relative;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-elevated), var(--bg-card));
  overflow: hidden;
}

.app-card-visual::after {
  content: "";
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.1;
  background: var(--accent);
  transition: opacity 300ms ease;
}

.app-card:hover .app-card-visual::after { opacity: 0.25; }

.app-icon-wrap {
  position: relative;
  z-index: 2;
  font-size: 3.5rem;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
  transition: transform 300ms ease;
}

.app-card:hover .app-icon-wrap { transform: scale(1.1) translateY(-4px); }

.app-card-body {
  padding: 28px 24px 24px;
}

.app-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.app-card-top h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
}

.app-status {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
}

.app-status.soon {
  background: var(--accent-dim);
  color: var(--accent);
  opacity: 0.7;
}

.app-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 16px;
}

.app-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.app-card-actions {
  display: flex;
  gap: 8px;
}

.about-section {
  padding: var(--section-pad) 0;
  position: relative;
}

.about-section::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-light), transparent);
}

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

.philosophy-card {
  padding: 32px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: transform 350ms cubic-bezier(0.34, 1.56, 0.64, 1), border-color 300ms ease, box-shadow 350ms ease;
}

.philosophy-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow-elevated);
}

.phil-icon {
  font-size: 2rem;
  margin-bottom: 14px;
  display: block;
}

.philosophy-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.philosophy-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.contact-section {
  padding: var(--section-pad) 0;
  position: relative;
}

.contact-section::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-light), transparent);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 48px;
  max-width: 500px;
}

.contact-card {
  padding: 32px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  text-align: center;
  transition: transform 350ms cubic-bezier(0.34, 1.56, 0.64, 1), border-color 300ms ease, box-shadow 350ms ease;
  display: block;
}

.contact-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow-elevated);
}

.contact-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  display: block;
}

.contact-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.contact-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.contact-card:hover p { color: var(--accent); }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  background: var(--bg-card);
}

.footer-shell {
  width: min(var(--shell-width), calc(100% - 64px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
}

.footer-copy {
  color: var(--text-dim);
  font-size: 0.82rem;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--text-dim);
  font-size: 0.82rem;
  transition: color 200ms ease;
}

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

.scroll-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

@media (max-width: 900px) {
  .hero {
    padding: 80px 0 60px;
  }

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

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

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

@media (max-width: 700px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(248, 248, 246, 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 20px 32px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }

  [data-theme="dark"] .nav-links {
    background: rgba(11, 11, 14, 0.97);
  }

  .nav-links.is-open { display: flex; }

  .menu-toggle { display: flex; }

  .hero-shell {
    max-width: 100%;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 8vw, 3rem);
  }

  .footer-shell {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .button {
    width: 100%;
  }
}
