/* ============================================
   Dobase — Landing Page
   ============================================ */

/* --- Tokens: Dark mode (default) --- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:             #111113;
    --bg-elevated:    #19191d;
    --bg-card:        #1e1e23;
    --bg-card-hover:  #25252b;
    --bg-subtle:      #16161a;

    --text:           #ededef;
    --text-secondary: #9898a0;
    --text-tertiary:  #6c6c76;

    --border:         #2a2a32;
    --border-light:   #222228;

    --accent:         #4f8ff7;
    --accent-hover:   #6ba1f9;
    --accent-subtle:  rgba(79, 143, 247, 0.10);

    --green:          #3dd68c;
    --green-subtle:   rgba(61, 214, 140, 0.10);

    --screenshot-shadow:
      0 0 0 1px rgba(255,255,255,0.04),
      0 25px 80px rgba(0,0,0,0.5),
      0 8px 24px rgba(0,0,0,0.3);

    --nav-bg:         rgba(17, 17, 19, 0.85);
    color-scheme: dark;
  }
}

/* --- Tokens: Light mode --- */
@media (prefers-color-scheme: light) {
  :root {
    --bg:             #f5f5f7;
    --bg-elevated:    #ffffff;
    --bg-card:        #ffffff;
    --bg-card-hover:  #f0f0f2;
    --bg-subtle:      #ececee;

    --text:           #1d1d1f;
    --text-secondary: #6e6e73;
    --text-tertiary:  #a1a1a6;

    --border:         #d2d2d7;
    --border-light:   #e5e5ea;

    --accent:         #0071e3;
    --accent-hover:   #0077ed;
    --accent-subtle:  rgba(0, 113, 227, 0.10);

    --green:          #1a9e5c;
    --green-subtle:   rgba(26, 158, 92, 0.10);

    --screenshot-shadow:
      0 0 0 1px rgba(0,0,0,0.06),
      0 25px 80px rgba(0,0,0,0.12),
      0 8px 24px rgba(0,0,0,0.08);

    --nav-bg:         rgba(245, 245, 247, 0.85);
    color-scheme: light;
  }
}

/* --- Fallback tokens (no media query — used when neither matches, e.g. forced colors) --- */
:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
               Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", SFMono-Regular, ui-monospace, Menlo, Monaco,
               "Cascadia Mono", monospace;

  --page-max:     1120px;
  --page-padding: clamp(1.25rem, 5vw, 3rem);

  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  14px;

  /* Tool accent colors — intentionally vibrant, same in both modes */
  --tool-mail:     #4f8ff7;
  --tool-board:    #fb923c;
  --tool-docs:     #a78bfa;
  --tool-chat:     #3dd68c;
  --tool-todos:    #f472b6;
  --tool-files:    #60c5f1;
  --tool-calendar: #f87171;
  --tool-room:     #fbbf24;
}



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

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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


/* --- Layout --- */
.page-width {
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--page-padding);
}


/* --- Navigation --- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border-light);
}

.site-nav .page-width {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}

.nav-logo svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
}

.nav-link-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color 150ms ease;
}

.nav-link-text:hover {
  color: var(--text);
}

.nav-try {
  display: inline-flex;
  align-items: center;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-sm);
  transition: background 150ms ease, box-shadow 150ms ease;
}

.nav-try:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

@media (prefers-color-scheme: light) {
  .nav-try {
    color: #fff;
  }
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text) !important;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-sm);
  transition: background 150ms ease, border-color 150ms ease;
}

.nav-cta:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-tertiary);
}

.nav-cta svg {
  width: 15px;
  height: 15px;
}


/* --- Hero --- */
.hero {
  padding-top: clamp(6rem, 14vh, 9rem);
  padding-bottom: 0;
}

.hero-center {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: var(--text);
}

.hero-accent {
  color: var(--accent);
}

.hero-subtitle {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.6;
  color: var(--text-secondary);
  margin-top: 1rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 150ms ease;
  text-decoration: none;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-tertiary);
}


/* --- Hero Screenshots --- */
.hero-screenshots {
  position: relative;
  width: 100%;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  aspect-ratio: 1290 / 856;
}

.hero-screenshot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 1s ease, transform 1s ease;
  will-change: opacity, transform;
}

.hero-screenshot.active {
  opacity: 1;
  transform: scale(1.0);
}


/* --- Tools Section (Bento Grid) --- */
.tools-section {
  padding-top: clamp(4rem, 8vh, 6rem);
  padding-bottom: clamp(4rem, 8vh, 6rem);
  border-top: 1px solid var(--border-light);
}

.tools-intro {
  margin-bottom: 2.5rem;
}

.tools-intro h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.tools-intro p {
  margin-top: 0.5rem;
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 500px;
}

.tools-bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.bento-item {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

.bento-item:hover {
  border-color: var(--border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  transform: translateY(-2px);
}

@media (prefers-color-scheme: dark) {
  .bento-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  }
}

.bento-item svg {
  width: 28px;
  height: 28px;
  margin-bottom: 0.75rem;
  opacity: 0.8;
}

.bento-item h3 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.375rem;
}

.bento-item p {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* Tool icon accent colors */
.bento-item[data-tool="mail"] svg     { color: var(--tool-mail); }
.bento-item[data-tool="board"] svg    { color: var(--tool-board); }
.bento-item[data-tool="docs"] svg     { color: var(--tool-docs); }
.bento-item[data-tool="chat"] svg     { color: var(--tool-chat); }
.bento-item[data-tool="todos"] svg    { color: var(--tool-todos); }
.bento-item[data-tool="files"] svg    { color: var(--tool-files); }
.bento-item[data-tool="calendar"] svg { color: var(--tool-calendar); }
.bento-item[data-tool="room"] svg     { color: var(--tool-room); }


/* --- Features Subsection --- */
.features-subsection {
  margin-top: clamp(3rem, 6vh, 4.5rem);
  padding-top: clamp(2.5rem, 5vh, 4rem);
  border-top: 1px solid var(--border-light);
}

.features-heading {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 2rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem 2rem;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.feature-item > svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--accent);
  margin-top: 0.1rem;
  opacity: 0.85;
}

.feature-item h4 {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.3rem;
  color: var(--text);
}

.feature-item p {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.feature-item kbd {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-style: normal;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.05em 0.35em;
  color: var(--text-secondary);
  vertical-align: baseline;
}


/* --- Why Section --- */
.why-section {
  padding-block: clamp(4rem, 8vh, 6rem);
  border-top: 1px solid var(--border-light);
}

.why-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.why-main h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.why-main > p {
  margin-top: 0.75rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 520px;
}

.why-list {
  list-style: none;
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.why-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
}

.why-list li svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--accent);
  stroke-width: 1.75;
}

/* License card */
.license-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.license-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: 0.5rem;
}

.license-name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 0.75rem;
}

.license-card > p {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.license-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  transition: color 150ms ease;
}

.license-link:hover {
  color: var(--accent-hover);
}


/* --- Deploy Section --- */
.deploy-section {
  padding-block: clamp(3.5rem, 7vh, 5rem);
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.deploy-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

.deploy-text h2 {
  font-size: clamp(1.25rem, 2.5vw, 1.625rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.deploy-text p {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  max-width: 400px;
}

.deploy-text a {
  color: var(--accent);
}

.deploy-code {
  flex-shrink: 0;
}

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

.code-dots {
  display: flex;
  gap: 6px;
  padding: 10px 14px 0;
}

.code-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
}

.code-body {
  padding: 12px 14px 14px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--text-secondary);
  white-space: pre;
}

.code-body .prompt {
  color: var(--accent);
  user-select: none;
}

.code-body .cmd {
  color: var(--text);
}


/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border-light);
  padding-block: 2rem;
}

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

.footer-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

.footer-logo {
  display: flex;
  align-items: center;
  margin-right: 0.25rem;
}

.footer-logo svg {
  width: 18px;
  height: 18px;
  color: var(--text-tertiary);
  transition: color 150ms ease;
}

.footer-logo:hover svg {
  color: var(--accent);
}

.footer-sep {
  color: var(--border);
}

.footer-eu {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.footer-eu svg {
  width: 14px;
  height: 10px;
  flex-shrink: 0;
}

.footer-left a:not(.footer-logo) {
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--border);
  transition: color 150ms ease, text-decoration-color 150ms ease;
}

.footer-left a:not(.footer-logo):hover {
  color: var(--text);
  text-decoration-color: var(--text-secondary);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer-right a {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--border);
  transition: color 150ms ease, text-decoration-color 150ms ease;
}

.footer-right a:hover {
  color: var(--text);
  text-decoration-color: var(--text-secondary);
}


/* --- Responsive --- */
@media (max-width: 1024px) {
  .why-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 900px) {
  .tools-bento {
    grid-template-columns: repeat(2, 1fr);
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .deploy-inner {
    flex-direction: column;
    text-align: center;
    align-items: stretch;
  }

  .deploy-text p {
    max-width: none;
  }

  .code-body {
    overflow-x: auto;
  }
}

@media (max-width: 640px) {
  .tools-bento {
    grid-template-columns: 1fr 1fr;
  }

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

  .hero h1 {
    font-size: 2rem;
  }

  .nav-links {
    gap: 0.75rem;
  }

  .nav-link-text {
    display: none;
  }

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

  .footer-left {
    flex-wrap: wrap;
    justify-content: center;
  }

  .footer-right {
    justify-content: center;
  }
}
