/* ============================================================
   ControlFloor — Product Website Stylesheet
   Design system matched to dryark.com
   ============================================================ */

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

:root {
  --navy: #0f1b2d;
  --navy-light: #1a2d47;
  --navy-mid: #243b5e;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-light: #dbeafe;
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --green: #10b981;
  --green-light: #d1fae5;
  --red: #ef4444;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji";
  --font-mono: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;
  --max-width: 1120px;
  --header-height: 72px;
}

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

body {
  font-family: var(--font-sans);
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.7;
}

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

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

/* --- Typography --- */
h1, h2, h3, h4 {
  color: var(--navy);
  line-height: 1.25;
  font-weight: 700;
}
h1 { font-size: 2.75rem; margin-bottom: 1rem; }
h2 { font-size: 2rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.35rem; margin-bottom: 0.5rem; }
h4 { font-size: 1.1rem; margin-bottom: 0.5rem; }
p  { margin-bottom: 1rem; color: var(--gray-600); }

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}
.section--gray {
  background: var(--gray-50);
}
.section--navy {
  background: var(--navy);
  color: var(--white);
}
.section--navy h2,
.section--navy h3,
.section--navy h4 {
  color: var(--white);
}
.section--navy p {
  color: var(--gray-300);
}

.text-center { text-align: center; }

/* --- Header / Nav --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--navy);
  z-index: 1000;
  border-bottom: 1px solid var(--navy-mid);
}
.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.header__logo {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.header__logo:hover {
  color: var(--white);
}
.header__logo span {
  color: var(--accent);
}
.header__logo-img {
  height: 36px;
  width: auto;
  display: inline-block;
}

.nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.nav a {
  color: var(--gray-300);
  font-size: 0.925rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav a:hover,
.nav a.active {
  color: var(--white);
}
.nav__cta {
  background: var(--accent);
  color: var(--white) !important;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.2s;
}
.nav__cta:hover {
  background: var(--accent-hover);
  color: var(--white) !important;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  margin: 5px 0;
  transition: 0.3s;
}

/* --- Hero --- */
.hero {
  padding: 10rem 0 6rem;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  margin-top: 0;
}
.hero h1 {
  color: var(--white);
  font-size: 3.25rem;
  max-width: 700px;
  letter-spacing: -0.03em;
}
.hero h1 span {
  color: var(--accent);
}
.hero__tagline {
  font-size: 1.2rem;
  color: var(--gray-300);
  max-width: 600px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}
.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-align: center;
}
.btn--primary {
  background: var(--accent);
  color: var(--white);
}
.btn--primary:hover {
  background: var(--accent-hover);
  color: var(--white);
}
.btn--outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--gray-400);
}
.btn--outline:hover {
  border-color: var(--white);
  color: var(--white);
}
.btn--dark {
  background: var(--navy);
  color: var(--white);
}
.btn--dark:hover {
  background: var(--navy-light);
  color: var(--white);
}

/* --- Pillars / Feature Grid --- */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: 3rem;
}
.pillars--4 {
  grid-template-columns: repeat(4, 1fr);
}
.pillar {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.pillar:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
  border-color: var(--accent);
}
.pillar__icon {
  width: 48px;
  height: 48px;
  background: var(--accent-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
}
.pillar h3 {
  margin-bottom: 0.5rem;
}
.pillar p {
  font-size: 0.95rem;
}

/* --- Services Grid --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 2rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.service-card:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
  border-color: var(--accent);
}
.service-card h3 {
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.service-card ul {
  list-style: none;
  padding: 0;
}
.service-card ul li {
  padding: 0.3rem 0;
  color: var(--gray-600);
  font-size: 0.95rem;
  padding-left: 1.25rem;
  position: relative;
}
.service-card ul li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

/* --- Stats Row --- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
  padding: 3rem 0;
}
.stat__number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.stat__label {
  font-size: 0.9rem;
  color: var(--gray-400);
}

/* --- Contact Form --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.contact-info h3 {
  margin-bottom: 1rem;
}
.contact-info__item {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  align-items: flex-start;
}
.contact-info__item .icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.contact-info__item p {
  margin: 0;
  color: var(--gray-700);
}
.contact-info__item a {
  color: var(--gray-700);
}
.contact-info__item a:hover {
  color: var(--accent);
}

.form {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 2.5rem;
}
.form__group {
  margin-bottom: 1.25rem;
}
.form__group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.4rem;
}
.form__group input,
.form__group textarea,
.form__group select {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  font-size: 1rem;
  font-family: var(--font-sans);
  color: var(--gray-800);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form__group input:focus,
.form__group textarea:focus,
.form__group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.form__group textarea {
  resize: vertical;
  min-height: 120px;
}
.form__trap {
  position: absolute;
  left: auto;
  right: -9000px;
  height: 1px;
  width: 1px;
  overflow: hidden;
}
.form__group--verify label {
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--gray-400);
}
.form__status {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
  display: none;
}
.form__status--success {
  display: block;
  background: var(--green-light);
  color: #065f46;
}
.form__status--error {
  display: block;
  background: #fef2f2;
  color: #991b1b;
}

/* --- Footer --- */
.footer {
  background: var(--navy);
  color: var(--gray-400);
  padding: 3rem 0;
  text-align: center;
  font-size: 0.9rem;
}
.footer a {
  color: var(--gray-300);
}
.footer a:hover {
  color: var(--white);
}
.footer__links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

/* --- Page Header (for inner pages) --- */
.page-header {
  padding: 8rem 0 3rem;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
}
.page-header h1 {
  color: var(--white);
  font-size: 2.75rem;
}
.page-header p {
  color: var(--gray-300);
  font-size: 1.15rem;
  max-width: 600px;
}

/* --- Pricing --- */
.pricing-card {
  background: var(--white);
  border: 2px solid var(--accent);
  border-radius: 16px;
  padding: 3rem;
  text-align: center;
  max-width: 480px;
  margin: 2rem auto;
}
.pricing-card__price {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}
.pricing-card__unit {
  font-size: 1.1rem;
  color: var(--gray-500);
  margin-top: 0.5rem;
}
.pricing-card__features {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
  text-align: left;
}
.pricing-card__features li {
  padding: 0.5rem 0;
  color: var(--gray-700);
  padding-left: 1.5rem;
  position: relative;
}
.pricing-card__features li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

/* --- Comparison Table --- */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2rem;
  font-size: 0.95rem;
}
.comparison-table th,
.comparison-table td {
  padding: 0.85rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
}
.comparison-table th {
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.comparison-table th:first-child {
  border-radius: 8px 0 0 0;
}
.comparison-table th:last-child {
  border-radius: 0 8px 0 0;
}
.comparison-table tbody tr:hover {
  background: var(--gray-50);
}
.comparison-table .highlight {
  background: var(--accent-light);
  font-weight: 600;
}
.comparison-table .highlight td {
  border-bottom-color: var(--accent);
}

/* --- FAQ --- */
.faq {
  max-width: 760px;
  margin: 0 auto;
}
.faq__item {
  border-bottom: 1px solid var(--gray-200);
  padding: 1.5rem 0;
}
.faq__item:last-child {
  border-bottom: none;
}
.faq__q {
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}
.faq__a {
  color: var(--gray-600);
  font-size: 0.95rem;
  margin: 0;
}

/* --- Architecture Diagram --- */
.arch-diagram {
  background: var(--navy);
  color: var(--gray-300);
  border-radius: 12px;
  padding: 2rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre;
  margin: 2rem 0;
}

/* --- Docs --- */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}
.doc-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 2rem;
  transition: box-shadow 0.2s, border-color 0.2s;
  text-decoration: none;
  display: block;
}
.doc-card:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
  border-color: var(--accent);
}
.doc-card h3 {
  color: var(--navy);
  margin-bottom: 0.5rem;
}
.doc-card p {
  font-size: 0.9rem;
  margin: 0;
}

/* Doc page layout */
.doc-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  align-items: start;
}
.doc-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 2rem);
}
.doc-sidebar ul {
  list-style: none;
  padding: 0;
}
.doc-sidebar li {
  margin-bottom: 0.35rem;
}
.doc-sidebar a {
  display: block;
  padding: 0.4rem 0.75rem;
  color: var(--gray-600);
  font-size: 0.9rem;
  border-radius: 6px;
  transition: all 0.15s;
}
.doc-sidebar a:hover,
.doc-sidebar a.active {
  background: var(--accent-light);
  color: var(--accent-hover);
}
.doc-content {
  min-width: 0;
}
.doc-content h2 {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-200);
}
.doc-content h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.doc-content h3 {
  margin-top: 2rem;
}
.doc-content ul,
.doc-content ol {
  margin: 0.5rem 0 1.25rem 1.5rem;
  color: var(--gray-600);
}
.doc-content li {
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}

/* --- Code Blocks --- */
.code-block {
  background: var(--navy);
  color: #e2e8f0;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.65;
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
  position: relative;
}
.code-block code {
  font-family: inherit;
}
.code-block .comment { color: var(--gray-500); }
.code-block .string { color: #a5d6ff; }
.code-block .keyword { color: #ff7b72; }
.code-block .function { color: #d2a8ff; }
.code-block .number { color: #79c0ff; }

.code-inline {
  font-family: var(--font-mono);
  background: var(--gray-100);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--navy);
}

/* Install command */
.install-cmd {
  background: var(--navy);
  border: 2px solid var(--navy-mid);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--green);
  margin: 1.5rem 0;
  overflow-x: auto;
}
.install-cmd .prompt {
  color: var(--gray-500);
  user-select: none;
}

/* --- Timeline --- */
.timeline {
  margin-top: 2rem;
}
.timeline__item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--gray-200);
}
.timeline__item:last-child {
  border-bottom: none;
}
.timeline__period {
  font-size: 0.85rem;
  color: var(--gray-500);
  font-weight: 500;
  padding-top: 0.15rem;
}
.timeline__company {
  font-weight: 600;
  color: var(--navy);
}

/* --- Feature sections --- */
.feature-section {
  padding: 3rem 0;
  border-bottom: 1px solid var(--gray-200);
}
.feature-section:last-child {
  border-bottom: none;
}
.feature-section h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.feature-section p {
  max-width: 680px;
}
.feature-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem 2rem;
  margin-top: 1rem;
  list-style: none;
  padding: 0;
}
.feature-list li {
  padding: 0.35rem 0;
  padding-left: 1.25rem;
  position: relative;
  color: var(--gray-600);
  font-size: 0.95rem;
}
.feature-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

/* --- Steps --- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}
.step {
  text-align: center;
  padding: 1.5rem;
}
.step__number {
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 auto 1rem;
}
.step h3 {
  margin-bottom: 0.5rem;
}
.step p {
  font-size: 0.9rem;
}

/* --- Config Table --- */
.config-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.9rem;
}
.config-table th,
.config-table td {
  padding: 0.65rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
  vertical-align: top;
}
.config-table th {
  font-weight: 600;
  color: var(--navy);
  background: var(--gray-50);
  white-space: nowrap;
}
.config-table td:first-child {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-hover);
  white-space: nowrap;
}

/* --- Prerequisites Table --- */
.prereq-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
}
.prereq-table th,
.prereq-table td {
  padding: 0.65rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
}
.prereq-table th {
  background: var(--gray-50);
  font-weight: 600;
  color: var(--navy);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .pillars {
    grid-template-columns: repeat(2, 1fr);
  }
  .pillars--4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .docs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .feature-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.65rem; }
  .hero h1 { font-size: 2.5rem; }

  .nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid var(--navy-mid);
  }
  .nav.open {
    display: flex;
  }
  .nav-toggle {
    display: block;
  }

  .pillars,
  .pillars--4 {
    grid-template-columns: 1fr;
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .doc-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .doc-sidebar {
    position: static;
  }
  .docs-grid {
    grid-template-columns: 1fr;
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .timeline__item {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .section {
    padding: 3.5rem 0;
  }
  .hero {
    padding: 8rem 0 4rem;
  }
  .comparison-table {
    font-size: 0.8rem;
  }
  .comparison-table th,
  .comparison-table td {
    padding: 0.6rem 0.5rem;
  }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 2rem; }
  .hero__actions {
    flex-direction: column;
  }
  .btn {
    width: 100%;
  }
  .stats {
    grid-template-columns: 1fr;
  }
}
