/* Cryptec Solutions — base styles. Plain CSS, no build step. */
@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,wght@0,400;0,600;1,400&display=swap');

:root {
  --color-bg: #f3f2f2;
  --color-surface: #eae9e9;
  --color-text: #201e1d;
  --color-accent: #0088b0;
  --color-divider: color-mix(in srgb, #201e1d 16%, transparent);

  --color-neutral-600: #7d7979;
  --color-neutral-700: #605d5d;
  --color-neutral-800: #444141;

  --color-accent-100: #e9f8ff;
  --color-accent-700: #006786;
  --color-accent-800: #004961;

  --font-heading: "Source Serif 4", Georgia, serif;
  --font-body: "Source Serif 4", Georgia, serif;

  --radius-sm: 2px;
  --radius-md: 4px;
  --shadow-md: 0 8px 24px color-mix(in srgb, #201e1d 14%, transparent);
}

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

html { color-scheme: light; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
}

p { margin: 0; }
img { display: block; max-width: 100%; }
a { color: var(--color-accent-700); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 56px);
}

.kicker {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent-700);
}

.text-muted { color: var(--color-neutral-700); }

.rule {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.rule div:first-child { height: 3px; background: var(--color-text); }
.rule div:last-child { height: 1px; background: var(--color-text); }

/* — buttons — */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-700); }
.btn-secondary { border-color: var(--color-divider); color: var(--color-text); }
.btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }

/* — accent bar above a heading — */
.accent-bar { width: 28px; height: 3px; background: var(--color-accent); margin-bottom: 6px; }

/* — header / nav — */
.site-header { padding: 22px 0 18px; }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--color-text);
}
.brand span {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 600;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 30px);
  font-size: 15px;
  flex-wrap: wrap;
}
.nav-links > a { color: var(--color-text); text-decoration: none; }
.nav-links > a:hover, .nav-links > a[aria-current='page'] { color: var(--color-accent-700); }

/* dropdown, built with <details> — no JS required */
.dropdown { position: relative; }
.dropdown > summary {
  list-style: none;
  cursor: pointer;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 5px;
}
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown > summary::after {
  content: "";
  width: 7px; height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  margin-left: 2px;
}
.dropdown[open] > summary,
.dropdown > summary:hover { color: var(--color-accent-700); }
.dropdown-menu {
  list-style: none;
  margin: 10px 0 0;
  padding: 8px;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 280px;
  background: var(--color-bg);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  z-index: 20;
}
.dropdown-menu li + li { margin-top: 2px; }
.dropdown-menu a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  color: var(--color-text);
  text-decoration: none;
  font-size: 14.5px;
}
.dropdown-menu a:hover { background: var(--color-accent-100); color: var(--color-accent-800); }
.dropdown-menu .item-desc { font-size: 12.5px; color: var(--color-neutral-700); }

@media (max-width: 640px) {
  .dropdown-menu { position: static; box-shadow: none; width: 100%; margin-top: 8px; }
}

/* — hero — */
.hero {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 62ch;
  padding: clamp(48px, 8vw, 88px) 0 clamp(40px, 6vw, 64px);
}
.hero h1 { font-size: clamp(36px, 6vw, 60px); text-wrap: pretty; }
.hero p { font-size: clamp(16px, 1.7vw, 19px); color: var(--color-neutral-700); text-wrap: pretty; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* — page header (solution / contact pages) — */
.page-header {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 64ch;
  padding: clamp(44px, 7vw, 76px) 0 clamp(32px, 5vw, 56px);
}
.page-header h1 { font-size: clamp(32px, 5.5vw, 50px); text-wrap: pretty; }
.page-header p { font-size: clamp(16px, 1.7vw, 18px); color: var(--color-neutral-700); text-wrap: pretty; }

/* — sections & grids — */
section { padding-bottom: clamp(44px, 7vw, 84px); }
.grid { display: grid; gap: clamp(24px, 4vw, 44px); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* — solution cards on home — */
.solution-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  background: var(--color-surface);
  border-radius: var(--radius-md);
}
.solution-card h3 { font-size: 20px; }
.solution-card p { font-size: 15px; color: var(--color-neutral-700); flex: 1; }
.solution-card a { font-size: 14.5px; color: var(--color-accent-700); text-decoration: none; }
.solution-card a:hover { text-decoration: underline; }

/* — feature list — */
.feature-list { display: flex; flex-direction: column; gap: 9px; font-size: 15.5px; line-height: 1.5; }
.feature-list div { display: flex; gap: 12px; }
.feature-list span.bullet { color: var(--color-accent-700); flex: none; }

/* — stats — */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 20px; margin-top: 8px; }
.stat-num { font-family: var(--font-heading); font-size: 30px; font-weight: 600; line-height: 1; }
.stat-label { font-size: 14px; color: var(--color-neutral-700); }

/* — image caption — */
.figure { display: flex; flex-direction: column; gap: 6px; }
.figure figcaption { font-size: 12px; color: var(--color-neutral-600); margin: 0; }

/* — spec table — */
.spec-row { display: flex; gap: 14px; }
.spec-label { width: 90px; flex: none; color: var(--color-neutral-600); font-size: 15px; }

/* — CTA banner — */
.cta-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}
.cta-banner h2 { font-size: clamp(24px, 3vw, 32px); }
.cta-banner p { font-size: 16px; color: var(--color-neutral-700); max-width: 52ch; margin-top: 6px; text-wrap: pretty; }

/* — forms — */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; color: var(--color-neutral-700); }
.input {
  width: 100%;
  font: inherit;
  font-size: 15px;
  padding: 10px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-sm);
  color: var(--color-text);
}
.input:focus-visible { border-color: var(--color-accent); outline-offset: 0; }
textarea.input { resize: vertical; font-family: inherit; }

/* — dropdown "view all" entry — */
.dropdown-menu .view-all {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 13.5px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--color-divider);
  margin-bottom: 4px;
  border-radius: var(--radius-sm);
}
.dropdown-menu .view-all:hover { background: var(--color-accent-100); color: var(--color-accent-800); }

/* — capability tags — */
.tag-row { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--color-divider);
  color: var(--color-neutral-700);
  background: var(--color-surface);
}

/* — alternating solution rows (solutions hub) — */
.solution-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
  padding: clamp(32px, 5vw, 52px) 0;
  border-bottom: 1px solid var(--color-divider);
}
.solution-row:last-child { border-bottom: none; }
.solution-row .solution-visual {
  display: flex; align-items: center; justify-content: center;
  min-height: 260px; width: 100%; box-sizing: border-box;
  background: var(--color-surface); border-radius: var(--radius-md);
  padding: 24px;
}
.solution-row.reverse .solution-visual { order: 2; }

/* — illustrated device/screen mockups (no photography, nothing brand-specific) — */
.mockup {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: #10161b;
}
.mockup-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  background: #e9e7e6;
  color: #201e1d;
  font-size: 12px;
  font-family: var(--font-heading);
  font-weight: 600;
}
.mockup-screen {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 16px;
  background: linear-gradient(160deg, #1c2830, #0d1215);
}
.mockup-screen.cols-2 { grid-template-columns: repeat(2, 1fr); }
.mockup-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 4px;
  border-radius: 8px;
  background: rgba(255,255,255,0.07);
  color: #f2f2f2;
  font-size: 11.5px;
  text-align: center;
  line-height: 1.25;
}
.mockup-tile svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--color-accent);
}

/* — modern app screen (apartment hero) — */
.app-screen {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(160deg, #33456200 0%, #2a3a52 0%, #1c2740 48%, #12172a 100%);
  padding: 30px 28px 26px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 26px;
  color: #fff;
}
.app-screen::before {
  content: "";
  position: absolute;
  top: -60px; right: -40px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.16), rgba(255,255,255,0) 70%);
  pointer-events: none;
}
.app-top { display: flex; align-items: flex-start; justify-content: space-between; position: relative; z-index: 1; }
.app-greeting .hi { font-size: 12.5px; color: rgba(255,255,255,0.6); }
.app-greeting .unit { font-family: var(--font-heading); font-size: 23px; font-weight: 600; margin-top: 2px; }
.app-weather { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: rgba(255,255,255,0.75); }
.app-weather svg { width: 16px; height: 16px; stroke: #fff; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.app-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; position: relative; z-index: 1; }
.app-tile {
  backdrop-filter: blur(6px);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px;
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.app-tile svg { width: 22px; height: 22px; stroke: #fff; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.app-tile .val { font-size: 15px; font-weight: 700; }
.app-tile .lbl { font-size: 10px; color: rgba(255,255,255,0.65); }
.app-actions { display: flex; gap: 10px; position: relative; z-index: 1; }
.app-action {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 12.5px;
  font-weight: 600;
}
.app-action svg { width: 16px; height: 16px; stroke: #fff; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.bezel {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: #2b2d30;
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow-md);
}
.bezel-cam { width: 7px; height: 7px; border-radius: 50%; background: #565759; }
.bezel .mockup { width: 100%; }

/* — interactive engagement flow (click-through / auto-advancing steps) — */
.flow { display: flex; flex-direction: column; gap: clamp(24px, 4vw, 40px); }
.flow-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(12px, 2vw, 24px);
}
.flow-tab {
  all: unset;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 2px;
}
.flow-tab-top { display: flex; align-items: baseline; gap: 8px; }
.flow-num {
  font-family: var(--font-heading); font-size: 12.5px; font-weight: 600;
  color: var(--color-neutral-500); transition: color 0.2s;
}
.flow-title {
  font-family: var(--font-heading); font-size: clamp(14px, 1.6vw, 17px); font-weight: 600;
  color: var(--color-neutral-600); transition: color 0.2s;
}
.flow-tab.active .flow-num, .flow-tab.active .flow-title { color: var(--color-accent-700); }
.flow-tab:hover .flow-title { color: var(--color-text); }
.flow-bar { display: block; height: 3px; background: var(--color-divider); border-radius: 2px; overflow: hidden; }
.flow-bar-fill { display: block; height: 100%; width: 0%; background: var(--color-accent); }
.flow-tab.active .flow-bar-fill { animation: flowFill 4.6s linear forwards; }
.flow-tab.paused .flow-bar-fill { animation-play-state: paused; }
@keyframes flowFill { from { width: 0%; } to { width: 100%; } }
.flow-panel {
  position: relative;
  min-height: 220px;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: clamp(24px, 4vw, 40px);
  overflow: hidden;
}
.flow-slide {
  position: absolute; inset: 0;
  padding: clamp(24px, 4vw, 40px);
  box-sizing: border-box;
  display: flex; flex-direction: column; justify-content: center; gap: 12px;
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}
.flow-slide.active { opacity: 1; transform: translateY(0); pointer-events: auto; }
.flow-slide .flow-slide-num {
  font-family: var(--font-heading); font-size: 46px; font-weight: 600;
  color: var(--color-accent-200); line-height: 1; margin-bottom: 4px;
}
.flow-slide h3 { font-size: clamp(22px, 2.6vw, 28px); }
.flow-slide p { font-size: clamp(15px, 1.6vw, 17px); color: var(--color-neutral-700); max-width: 58ch; line-height: 1.6; }
@media (max-width: 640px) {
  .flow-tabs { grid-template-columns: repeat(2, 1fr); row-gap: 18px; }
}

/* — footer — */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0 40px;
  font-size: 14px;
  color: var(--color-neutral-600);
  border-top: 1px solid var(--color-divider);
  margin-top: 8px;
}
.site-footer .footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.site-footer a { color: var(--color-neutral-600); text-decoration: none; }
.site-footer a:hover { color: var(--color-accent-700); }
