/* =========================================================
   BHK Cloud — Apple-Inspired Design System
   ========================================================= */

/* ---------------------------------------------------------
   1. Design Tokens
   --------------------------------------------------------- */
:root {
  --color-primary:       #0071E3;
  --color-primary-hover: #006EDB;
  --color-primary-press: #0076DF;
  --color-primary-light: rgba(0, 113, 227, 0.05);

  --color-text:          #1D1D1F;
  --color-text-secondary:#333336;
  --color-text-tertiary: #6E6E73;

  --color-bg:            #FFFFFF;
  --color-bg-secondary:  #F5F5F7;
  --color-bg-tertiary:   #FBFBFD;

  --color-border:        #EDEDF2;
  --color-border-strong: rgba(0, 0, 0, 0.12);

  --nav-bg:              rgba(255, 255, 255, 0.8);
  --nav-border:          rgba(0, 0, 0, 0.1);
  --nav-blur:            saturate(180%) blur(20px);

  --overlay-soft:        rgba(0, 0, 0, 0.8);

  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body:    'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --text-hero:    clamp(2.25rem, 1.5rem + 3vw, 2.5rem);
  --text-section: clamp(1.5rem, 1rem + 2vw, 2.125rem);
  --text-card:    clamp(1rem, 0.9rem + 0.5vw, 1.5rem);
  --text-body:    1.0625rem;
  --text-small:   0.875rem;
  --text-caption:  0.75rem;

  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-14: 56px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  --container-max: none;
  --container-pad: clamp(16px, 4vw, 64px);

  --radius-none: 0px;
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   20px;
  --radius-pill:  9999px;

  --shadow-none:   none;
  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-card:   0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-float:  0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-deep:   0 12px 32px rgba(0, 0, 0, 0.12);

  --ease:     cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast:  150ms;
  --dur-base:  250ms;
  --dur-slow:  500ms;

  --btn-height: 44px;
  --nav-height: 52px;

  --section-v: clamp(64px, 8vw, 96px);
}

/* ---------------------------------------------------------
   2. Reset
   --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
[id] { scroll-margin-top: calc(var(--nav-height) + 20px); }
img, svg { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.47;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  animation: page-in .4s var(--ease-out) both;
}

@keyframes page-in { from { opacity: 0 } to { opacity: 1 } }

a { color: var(--color-primary); text-decoration: none; transition: color var(--dur-fast) var(--ease); }
a:hover { color: var(--color-primary-hover); }
*:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; top: -100px; left: 16px;
  background: var(--color-primary); color: #fff;
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: var(--text-small); font-weight: 600; z-index: 9999;
}
.skip-link:focus { top: 8px; }

/* ---------------------------------------------------------
   3. Typography
   --------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-text);
  margin: 0;
  line-height: 1.1;
}
h1 { font-size: var(--text-hero); font-weight: 600; line-height: 1.1; }
h2 { font-size: var(--text-section); font-weight: 600; line-height: 1.14; }
h3 { font-size: var(--text-card); font-weight: 600; line-height: 1.2; }
p  { margin: 0 0 var(--space-4) 0; }

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-caption);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

.subtitle {
  font-size: var(--text-body);
  color: var(--color-text-tertiary);
  line-height: 1.47;
  max-width: 600px;
}

.section-header { text-align: center; margin-bottom: var(--space-12); }
.section-header .subtitle { margin: var(--space-4) auto 0; }

/* ---------------------------------------------------------
   4. Layout
   --------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

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

.section--alt {
  background: var(--color-bg-secondary);
}

.grid {
  display: grid;
  gap: var(--space-6);
}

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

@media (max-width: 1023px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------
   5. Navigation
   --------------------------------------------------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 1000;
  background: transparent;
  transition: background var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease), backdrop-filter var(--dur-base) var(--ease);
  border-bottom: 1px solid transparent;
}

.nav.is-scrolled {
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(200%) blur(24px);
  backdrop-filter: saturate(200%) blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.nav__inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: var(--space-2);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  text-decoration: none;
  margin-right: auto;
}
.nav__brand:hover { color: var(--color-text); }

.nav__mark {
  display: inline-block;
  width: 32px;
  height: 32px;
  background: url("../assets/logo-mark.png") center / contain no-repeat;
  flex-shrink: 0;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  list-style: none;
  margin: 0; padding: 0;
}
.nav__links a {
  display: flex; align-items: center;
  height: var(--btn-height);
  padding: 0 var(--space-3);
  color: var(--color-text);
  font-size: var(--text-body);
  font-weight: 400;
  transition: color var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.nav__links a:hover { color: var(--color-primary); }

.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: var(--space-4);
}

.nav__toggle {
  display: none;
  align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: none; border: none;
  color: var(--color-text);
  cursor: pointer;
  padding: 0;
}
.nav__toggle svg { width: 24px; height: 24px; }

.nav__mobile {
  display: none;
  position: fixed; top: var(--nav-height); left: 0; right: 0;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-4) var(--container-pad) var(--space-6);
  z-index: 999;
}
.nav__mobile.is-open { display: block; }
.nav__mobile a {
  display: block;
  padding: var(--space-3) 0;
  color: var(--color-text);
  font-size: var(--text-body);
  border-bottom: 1px solid var(--color-border);
}
.nav__mobile a:last-child { border-bottom: none; }
.nav__mobile a:hover { color: var(--color-primary); }

@media (max-width: 767px) {
  .nav__links, .nav__actions .btn--ghost { display: none; }
  .nav__toggle { display: flex; }
}

/* ---------------------------------------------------------
   6. Buttons
   --------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center; justify-content: center;
  height: var(--btn-height);
  padding: 0 var(--space-6);
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: 1;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--dur-fast) var(--ease);
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
}
.btn--primary:hover {
  background: var(--color-primary-hover);
  color: #fff;
  transform: scale(1.02);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.18);
}
.btn--primary:active {
  background: var(--color-primary-press);
  transform: scale(0.98);
}

.btn--secondary {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border: none;
}
.btn--secondary:hover {
  background: rgba(0, 113, 227, 0.08);
  color: var(--color-primary-hover);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text);
  padding: 0 var(--space-3);
}
.btn--ghost:hover {
  color: var(--color-primary);
}

.btn--sm {
  height: 36px;
  padding: 0 var(--space-4);
  font-size: var(--text-small);
}

.btn--link {
  display: inline-flex; align-items: center; gap: 4px;
  background: none; border: none; padding: 0;
  height: auto;
  color: var(--color-primary);
  font-weight: 600;
  font-size: var(--text-body);
}
.btn--link:hover { color: var(--color-primary-hover); }
.btn--link svg { width: 16px; height: 16px; transition: transform var(--dur-fast) var(--ease); }
.btn--link:hover svg { transform: translateX(3px); }

/* ---------------------------------------------------------
   7. Cards
   --------------------------------------------------------- */
.card {
  background: var(--color-bg);
  border: none;
  padding: var(--space-8) var(--space-8);
  transition: border-color var(--dur-base) var(--ease), transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}
.card:hover {
  border-color: transparent;
  transform: translateY(-4px);
  box-shadow: var(--shadow-deep);
}

.card__icon {
  width: 40px; height: 40px;
  margin-bottom: var(--space-4);
  color: var(--color-primary);
}
.card__icon svg { width: 100%; height: 100%; }

.card__title {
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--color-text);
}

.card__desc {
  font-size: var(--text-body);
  color: var(--color-text-tertiary);
  line-height: 1.47;
  margin: 0;
}

/* Pricing card */
.card--pricing {
  border: none;
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  display: grid;
  grid-template-rows: auto minmax(60px, auto) auto auto auto 1fr;
  align-content: start;
  min-width: 0;
  position: relative;
}
.card--pricing.is-featured {
  border-color: transparent;
  box-shadow: none;
}

.card__badge {
  position: absolute;
  top: calc(-1 * var(--space-3));
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: #fff;
  font-size: var(--text-caption);
  font-weight: 600;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.card__plan-name {
  font-family: var(--font-display);
  font-size: var(--text-card);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.card__plan-desc {
  font-size: var(--text-small);
  color: var(--color-text-tertiary);
  line-height: 1.5;
  min-height: 60px;
  margin-bottom: var(--space-6);
}

.card__price {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 2vw, 2.125rem);
  font-weight: 600;
  color: var(--color-text);
  min-height: 42px;
  margin-bottom: var(--space-1);
}

.card__period {
  font-size: var(--text-small);
  color: var(--color-text-tertiary);
  min-height: 21px;
  margin-bottom: var(--space-6);
}

.card--pricing > .btn {
  align-self: stretch;
  max-width: 100%;
  margin-bottom: var(--space-6);
}

.card__features {
  list-style: none;
  margin: 0;
  padding: var(--space-6) 0 0;
  border-top: none;
}
.card__features li {
  display: flex; align-items: center; gap: var(--space-2);
  padding: var(--space-2) 0;
  font-size: var(--text-small);
  color: var(--color-text-secondary);
}
.card__features li svg {
  width: 16px; height: 16px;
  color: var(--color-primary);
  flex-shrink: 0;
}

/* ---------------------------------------------------------
   8. Hero
   --------------------------------------------------------- */
.hero {
  padding: calc(var(--nav-height) + var(--space-16)) 0 var(--section-v);
  min-height: 580px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% -10%, rgba(0, 113, 227, 0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.hero > * { position: relative; z-index: 1; }

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  font-size: var(--text-caption);
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 6px 16px;
  margin-bottom: var(--space-6);
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 600;
  line-height: 1.1;
  color: var(--color-text);
  margin-bottom: var(--space-6);
}

.hero__desc {
  font-size: var(--text-body);
  color: var(--color-text-tertiary);
  line-height: 1.47;
  max-width: 500px;
  margin-bottom: var(--space-8);
}

.hero__actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* Hero mockup */
.hero__visual {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-deep);
  overflow: hidden;
  max-width: 560px;
  margin-left: auto;
}
.hero__visual img {
  width: 100%;
  height: auto;
  display: block;
}

/* Hero mockup */
.hero__mockup {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-deep);
  overflow: hidden;
  max-width: 560px;
  margin-left: auto;
}

.mockup__chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-border);
}
.mockup__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--color-border);
}
.mockup__dot:nth-child(1) { background: #FF5F57; }
.mockup__dot:nth-child(2) { background: #FEBC2E; }
.mockup__dot:nth-child(3) { background: #28C840; }

.mockup__title {
  flex: 1;
  text-align: center;
  font-size: var(--text-caption);
  color: var(--color-text-tertiary);
  font-weight: 500;
}

.mockup__body {
  display: grid;
  grid-template-columns: 180px 1fr;
  min-height: 340px;
}

.mockup__sidebar {
  padding: var(--space-4);
  border-right: 1px solid var(--color-border);
  background: var(--color-bg-tertiary);
}

.mockup__search {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px 10px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-4);
  font-size: 11px;
  color: var(--color-text-tertiary);
}
.mockup__search svg { width: 12px; height: 12px; color: var(--color-text-tertiary); }

.mockup__nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--color-text-secondary);
  cursor: default;
}
.mockup__nav-item svg { width: 14px; height: 14px; }
.mockup__nav-item.is-active {
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 500;
}

.mockup__upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  padding: 8px;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: var(--space-4);
}
.mockup__upload-btn svg { width: 14px; height: 14px; }

.mockup__storage {
  margin-top: auto;
  padding: var(--space-3) 0 0;
  font-size: 10px;
  color: var(--color-text-tertiary);
}
.mockup__storage-bar {
  width: 100%;
  height: 4px;
  background: var(--color-border);
  border-radius: 2px;
  margin-top: 4px;
  overflow: hidden;
}
.mockup__storage-fill {
  width: 3%;
  height: 100%;
  background: var(--color-primary);
  border-radius: 2px;
}

.mockup__content {
  padding: var(--space-4);
}

.mockup__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-3);
}
.mockup__toolbar-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}
.mockup__toolbar-sort {
  font-size: 11px;
  color: var(--color-text-tertiary);
}

.mockup__file {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.mockup__file-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-4) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  text-align: center;
  cursor: default;
}
.mockup__file-icon {
  width: 36px; height: 36px;
  margin-bottom: var(--space-2);
  color: var(--color-text-tertiary);
}
.mockup__file-icon svg { width: 100%; height: 100%; }
.mockup__file-icon--folder svg { color: #F6C24D; }
.mockup__file-icon--pdf svg { color: #E84D3D; }
.mockup__file-name {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

@media (max-width: 1023px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual, .hero__mockup { max-width: 100%; margin-left: 0; }
  .hero { min-height: auto; }
}

@media (max-width: 767px) {
  .hero { padding-top: calc(var(--nav-height) + var(--space-10)); }
  .mockup__body { grid-template-columns: 1fr; }
  .mockup__sidebar { display: none; }
}

/* ---------------------------------------------------------
   9. Feature Sections (Sharing, Teams, Previews)
   --------------------------------------------------------- */
.feature-section__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: start;
}

.feature-section__content { max-width: 520px; }

.feature-section__items {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  margin-top: var(--space-8);
}

.feature-item {
  padding-left: var(--space-5);
  border-left: 2px solid var(--color-border);
}
.feature-item__title {
  font-weight: 600;
  font-size: var(--text-body);
  color: var(--color-text);
  margin-bottom: var(--space-1);
}
.feature-item__desc {
  font-size: var(--text-small);
  color: var(--color-text-tertiary);
  line-height: 1.5;
  margin: 0;
}

.feature-section__visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-section__visual-box {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.feature-section__visual-box--workspace {
  aspect-ratio: 38 / 89;
  max-width: 380px;
  margin: 0 auto;
}

.feature-section__visual-icon {
  width: 80px; height: 80px;
  color: var(--color-primary);
  opacity: 0.3;
}

.feature-section__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.feature-section__image--contain {
  object-fit: contain;
  background: var(--color-bg);
}

@media (max-width: 1023px) {
  .feature-section__inner { grid-template-columns: 1fr; gap: var(--space-10); }
}

/* ---------------------------------------------------------
   10. Pricing
   --------------------------------------------------------- */
.pricing__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-10);
}

.pricing__toggle-label {
  font-size: var(--text-small);
  font-weight: 500;
  color: var(--color-text-tertiary);
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease);
}
.pricing__toggle-label.is-active { color: var(--color-text); }

.pricing__toggle-label .pricing__save {
  font-size: 11px;
  color: var(--color-primary);
  font-weight: 600;
}

.pricing__switch {
  position: relative;
  width: 44px; height: 24px;
  background: var(--color-primary);
  border-radius: 12px;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background var(--dur-fast) var(--ease);
}
.pricing__switch::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--dur-base) var(--ease);
}
.pricing__switch[aria-checked="true"]::after {
  transform: translateX(20px);
}

.pricing__cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: stretch;
  gap: var(--space-6);
  max-width: none;
  margin: 0 auto;
}

@media (max-width: 767px) {
  #pricing .container {
    max-width: 100vw;
    overflow: hidden;
  }
  .pricing__cards {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: 100%;
  }
  .card--pricing {
    display: flex;
    flex-direction: column;
    padding: var(--space-6);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }
  .card__badge {
    position: static;
    align-self: center;
    transform: none;
    margin-bottom: var(--space-5);
  }
  .card--pricing > a.btn {
    width: min(280px, 100%) !important;
    max-width: calc(100vw - 96px) !important;
    align-self: flex-start;
  }
  .card__plan-desc,
  .card__price,
  .card__period {
    min-height: 0;
  }
}

/* ---------------------------------------------------------
   11. CTA Section
   --------------------------------------------------------- */
.cta-section {
  text-align: center;
  padding: var(--section-v) 0;
  background: var(--color-bg-secondary);
}
.cta-section h2 { margin-bottom: var(--space-4); }
.cta-section .subtitle {
  margin: 0 auto var(--space-8);
  max-width: 620px;
}

/* ---------------------------------------------------------
   12. Page-specific: About
   --------------------------------------------------------- */
.page-header {
  padding: calc(var(--nav-height) + var(--space-16)) 0 var(--space-12);
  text-align: center;
}

.prose {
  max-width: 680px;
  margin: 0 auto;
  padding-bottom: var(--section-v);
}
.prose p {
  color: var(--color-text-secondary);
  line-height: 1.65;
  margin-bottom: var(--space-6);
}
.prose a { font-weight: 500; }
.prose h2 {
  font-size: var(--text-card);
  margin: var(--space-10) 0 var(--space-4);
}

.contact-block {
  margin-top: var(--space-8);
  padding: var(--space-6);
  background: var(--color-bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}
.contact-block p { margin-bottom: var(--space-2); color: var(--color-text); }
.contact-block a { font-weight: 600; }

/* ---------------------------------------------------------
   13. Page-specific: Features
   --------------------------------------------------------- */
.features-page__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  margin-bottom: var(--space-16);
}

.features-page__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-8) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--dur-base) var(--ease), transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}
.features-page__card:hover {
  border-color: var(--color-border-strong);
  transform: translateY(-4px);
  box-shadow: var(--shadow-deep);
}
.features-page__card svg {
  width: 40px; height: 40px;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}
.features-page__card-title {
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
}

@media (max-width: 1023px) {
  .features-page__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 479px) {
  .features-page__grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
}

.video-section {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-bg-secondary);
  padding: var(--space-8);
}
.video-section__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: center;
}
.video-section__text h3 { margin-bottom: var(--space-3); }
.video-section__text p {
  color: var(--color-text-tertiary);
  font-size: var(--text-small);
  line-height: 1.5;
}
.video-section__visual {
  aspect-ratio: 16 / 10;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.video-section__visual svg { width: 48px; height: 48px; color: var(--color-text-tertiary); opacity: 0.4; }
.video-section__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 767px) {
  .video-section__inner { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------
   14. Page-specific: Contact
   --------------------------------------------------------- */
.contact-form {
  max-width: 560px;
  margin: 0 auto;
  padding-bottom: var(--section-v);
}

.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-size: var(--text-caption);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.form-input { height: var(--btn-height); }
.form-textarea { min-height: 160px; resize: vertical; line-height: 1.5; }

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder { color: var(--color-text-tertiary); }

.form-error {
  font-size: var(--text-caption);
  color: #E84D3D;
  margin-top: var(--space-1);
  display: none;
}
.form-group.has-error .form-error { display: block; }
.form-group.has-error .form-input,
.form-group.has-error .form-textarea { border-color: #E84D3D; }

.form-success {
  text-align: center;
  padding: var(--space-8);
  color: var(--color-text-secondary);
}

/* ---------------------------------------------------------
   15. Footer
   --------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-10) 0 var(--space-8);
}

.footer__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
}

.footer__links-title {
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.footer__links {
  list-style: none; margin: 0; padding: 0;
}
.footer__links a {
  display: inline-block;
  padding: var(--space-1) 0;
  color: var(--color-text-tertiary);
  font-size: var(--text-small);
  transition: color var(--dur-fast) var(--ease);
}
.footer__links a:hover { color: var(--color-primary); }

.footer__social {
  display: flex; gap: var(--space-4);
  list-style: none; margin: 0; padding: 0;
}
.footer__social a {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  color: var(--color-text-tertiary);
  transition: color var(--dur-fast) var(--ease);
}
.footer__social a:hover { color: var(--color-primary); }
.footer__social svg { width: 18px; height: 18px; }

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-caption);
  color: var(--color-text-tertiary);
}

@media (max-width: 767px) {
  .footer__inner { grid-template-columns: 1fr; gap: var(--space-6); }
  .footer__bottom { flex-direction: column; gap: var(--space-3); text-align: center; }
}

/* ---------------------------------------------------------
   16. Animations
   --------------------------------------------------------- */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.fade-up.in-view {
  opacity: 1;
  transform: translateY(0);
}

.stagger-1 { transition-delay: 80ms; }
.stagger-2 { transition-delay: 160ms; }
.stagger-3 { transition-delay: 240ms; }
.stagger-4 { transition-delay: 320ms; }
.stagger-5 { transition-delay: 400ms; }

/* ---------------------------------------------------------
   17. Reduced Motion
   --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .fade-up { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------
   18. Print
   --------------------------------------------------------- */
@media print {
  .nav, .footer, .hero__visual, .hero__mockup, .btn { display: none; }
  body { color: #000; background: #fff; font-size: 12pt; }
  a { color: #000; text-decoration: underline; }
}

/* ---------------------------------------------------------
   19. Developer Hub Cards
   --------------------------------------------------------- */
.dev-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  padding-bottom: var(--section-v);
}

.dev-card {
  display: flex;
  flex-direction: column;
  padding: var(--space-8);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease), transform var(--dur-base) var(--ease);
}
.dev-card:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-float);
  transform: translateY(-2px);
  color: inherit;
}

.dev-card__icon {
  width: 48px;
  height: 48px;
  color: var(--color-primary);
  margin-bottom: var(--space-5);
}
.dev-card__icon svg { width: 100%; height: 100%; }

.dev-card__title {
  font-family: var(--font-display);
  font-size: var(--text-card);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.dev-card__desc {
  font-size: var(--text-small);
  color: var(--color-text-tertiary);
  line-height: 1.5;
  margin: 0 0 var(--space-5);
  flex: 1;
}

.dev-card__arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--color-primary);
}
.dev-card__arrow svg {
  width: 16px; height: 16px;
  transition: transform var(--dur-fast) var(--ease);
}
.dev-card:hover .dev-card__arrow svg { transform: translateX(3px); }

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

/* ---------------------------------------------------------
   20. Docs Sidebar Layout
   --------------------------------------------------------- */
.docs-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--space-10);
  padding-bottom: var(--section-v);
}

.docs-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-6));
  align-self: start;
}

.docs-sidebar__title {
  font-size: var(--text-caption);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-tertiary);
  margin-bottom: var(--space-4);
}

.docs-sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.docs-sidebar__link {
  display: block;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-small);
  color: var(--color-text-tertiary);
  border-left: 2px solid transparent;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.docs-sidebar__link:hover {
  color: var(--color-primary);
  background: var(--color-primary-light);
}
.docs-sidebar__link.is-active {
  color: var(--color-primary);
  border-left-color: var(--color-primary);
  font-weight: 600;
  background: var(--color-primary-light);
}

.docs-content {
  min-width: 0;
}

.docs-content .prose {
  max-width: 800px;
  margin: 0;
  padding-bottom: 0;
}

.docs-content .prose h2:first-child {
  margin-top: 0;
}

@media (max-width: 767px) {
  .docs-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .docs-sidebar {
    position: static;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: var(--space-4);
    margin-bottom: var(--space-6);
  }
  .docs-sidebar__nav {
    flex-direction: row;
    overflow-x: auto;
    gap: var(--space-2);
    -webkit-overflow-scrolling: touch;
  }
  .docs-sidebar__link {
    border-left: none;
    border-bottom: 2px solid transparent;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    padding: var(--space-2) var(--space-3);
  }
  .docs-sidebar__link.is-active {
    border-left-color: transparent;
    border-bottom-color: var(--color-primary);
  }
}

/* ---------------------------------------------------------
   21. Code Blocks
   --------------------------------------------------------- */
.code-block {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin-bottom: var(--space-6);
}

.code-block__header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--color-bg-tertiary);
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-caption);
  font-weight: 600;
  color: var(--color-text-tertiary);
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
}

.code-block pre {
  margin: 0;
  padding: var(--space-4);
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-size: var(--text-small);
  line-height: 1.6;
  color: var(--color-text);
  white-space: pre;
  overflow-x: auto;
}

.prose code,
.docs-content code:not(.code-block code) {
  background: var(--color-bg-secondary);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-size: 0.88em;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

.method-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-size: var(--text-caption);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.method-badge--get { background: #E8F5E9; color: #2E7D32; }
.method-badge--post { background: #E3F2FD; color: #1565C0; }
.method-badge--put { background: #FFF3E0; color: #E65100; }
.method-badge--delete { background: #FFEBEE; color: #C62828; }

.endpoint-path {
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--color-text);
}

.endpoint-block {
  padding: var(--space-6) 0;
  border-bottom: 1px solid var(--color-border);
}
.endpoint-block:last-child { border-bottom: none; }

.endpoint-block h3 {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

/* ---------------------------------------------------------
   22. Status Page
   --------------------------------------------------------- */
.status-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-6);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--text-body);
  margin-bottom: var(--space-8);
}

.status-banner--ok {
  background: #E8F5E9;
  color: #2E7D32;
  border: 1px solid #C8E6C9;
}
.status-banner--warn {
  background: #FFF8E1;
  color: #F57F17;
  border: 1px solid #FFF0B3;
}
.status-banner--down {
  background: #FFEBEE;
  color: #C62828;
  border: 1px solid #FFCDD2;
}

.status-list {
  margin-bottom: var(--space-10);
}

.status-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border);
}
.status-item:first-child { border-top: 1px solid var(--color-border); }

.status-item__name {
  font-weight: 600;
  font-size: var(--text-body);
  color: var(--color-text);
}

.status-item__state {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-small);
  font-weight: 500;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot--ok { background: #43A047; }
.status-dot--warn { background: #F9A825; }
.status-dot--down { background: #E53935; }

.status-item__state--ok { color: #2E7D32; }
.status-item__state--warn { color: #F57F17; }
.status-item__state--down { color: #C62828; }

.incident-history h2 {
  font-size: var(--text-card);
  margin-bottom: var(--space-6);
}

.incident {
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--color-border);
}
.incident:first-of-type { border-top: 1px solid var(--color-border); }

.incident__date {
  font-size: var(--text-caption);
  font-weight: 600;
  color: var(--color-text-tertiary);
  margin-bottom: var(--space-2);
}

.incident__title {
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.incident__desc {
  font-size: var(--text-small);
  color: var(--color-text-tertiary);
  line-height: 1.5;
  margin: 0;
}

.incident__resolved {
  display: inline-block;
  font-size: var(--text-caption);
  font-weight: 600;
  color: #2E7D32;
  margin-top: var(--space-2);
}

/* ---------------------------------------------------------
   23. Changelog
   --------------------------------------------------------- */
.changelog {
  max-width: 740px;
  margin: 0 auto;
  padding-bottom: var(--section-v);
}

.changelog-entry {
  padding: var(--space-6) 0 var(--space-8);
  border-bottom: 1px solid var(--color-border);
}
.changelog-entry:last-child { border-bottom: none; }

.changelog-entry__header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.changelog-entry__version {
  display: inline-block;
  padding: 3px 12px;
  background: var(--color-primary);
  color: #fff;
  font-size: var(--text-caption);
  font-weight: 700;
  border-radius: var(--radius-pill);
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
}

.changelog-entry__date {
  font-size: var(--text-small);
  color: var(--color-text-tertiary);
}

.changelog-entry__body ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.changelog-entry__body li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  font-size: var(--text-small);
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.changelog-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  margin-top: 1px;
}
.changelog-tag--new { background: #E8F5E9; color: #2E7D32; }
.changelog-tag--improved { background: #E3F2FD; color: #1565C0; }
.changelog-tag--fixed { background: #FFF3E0; color: #E65100; }

/* ---------------------------------------------------------
   24. Docs Page Header (with subtitle)
   --------------------------------------------------------- */
.page-header .subtitle {
  margin: var(--space-4) auto 0;
  text-align: center;
}

/* ---------------------------------------------------------
   25. Prose Additions for Docs
   --------------------------------------------------------- */
.prose h3 {
  font-size: var(--text-body);
  font-weight: 600;
  margin: var(--space-8) 0 var(--space-3);
}

.prose ul, .prose ol {
  margin: 0 0 var(--space-6);
  padding-left: var(--space-6);
  color: var(--color-text-secondary);
  line-height: 1.65;
}

.prose li {
  margin-bottom: var(--space-2);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-6);
  font-size: var(--text-small);
}

.prose th,
.prose td {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.prose th {
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-bg-secondary);
}

.prose td {
  color: var(--color-text-secondary);
}

.prose hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-8) 0;
}
