/* ==========================================================================
   fDevices — single-page site
   Restrained, modern, readable. No frameworks, no external assets.
   ========================================================================== */

/* Design tokens live in brand/tokens.css — link it before this file. */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--surface);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.container.narrow {
  max-width: 760px;
}

/* --------------------------------------------------------------------------
   Header / nav
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 34, 55, 0.96);
  backdrop-filter: blur(6px);
}

.nav {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.brand-mark {
  width: 26px;
  height: 25px;
  flex-shrink: 0;
  margin-top: -3px;
}

.brand-text span {
  color: var(--accent-light);
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.nav-links a {
  color: #cfdde6;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: #fff;
}

.nav-cta {
  padding: 7px 16px;
  border: 1px solid #7fc7d4;
  border-radius: 999px;
  color: #fff !important;
}

.nav-cta:hover {
  background: #7fc7d4;
  color: var(--deep) !important;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  background:
    linear-gradient(180deg, rgba(11, 34, 55, 0.35) 0%, rgba(11, 34, 55, 0.72) 100%),
    url("assets/hero.jpg") center / cover no-repeat,
    linear-gradient(180deg, var(--deep) 0%, var(--deep-2) 100%);
  color: #fff;
  padding: 112px 0 128px;
}

.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.82rem;
  font-weight: 600;
  color: #7fc7d4;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 14ch;
}

.hero-lead {
  margin-top: 24px;
  max-width: 56ch;
  font-size: 1.15rem;
  color: #d9e4eb;
}

.hero-actions {
  margin-top: 36px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

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

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
}

.btn-ghost:hover {
  border-color: #fff;
}

.btn-lg {
  padding: 15px 32px;
  font-size: 1.05rem;
}

.btn-card {
  background: var(--accent);
  color: #fff;
  padding: 9px 20px;
  font-size: 0.9rem;
  align-self: flex-start;
  margin-top: 16px;
}

.btn-card:hover {
  background: var(--accent-dark);
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section {
  padding: 84px 0;
}

.section-alt {
  background: var(--surface-alt);
}

h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.2rem);
  letter-spacing: -0.015em;
  margin-bottom: 12px;
}

.section-intro {
  max-width: 62ch;
  color: var(--muted);
  margin-bottom: 44px;
  font-size: 1.05rem;
}

.subheading {
  font-size: 1.2rem;
  margin: 48px 0 20px;
}

/* --------------------------------------------------------------------------
   Products
   -------------------------------------------------------------------------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}

.product-img-link {
  display: block;
}

.product-body {
  padding: 24px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.product-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
}

/* Image-less card spanning the full row once the grid has three columns */
@media (min-width: 1000px) {
  .product-card-wide {
    grid-column: 1 / -1;
  }

  .product-card-wide .product-body {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    column-gap: 48px;
    align-items: start;
  }

  .product-card-wide .product-body > * {
    grid-column: 1;
  }

  .product-card-wide .btn {
    justify-self: start;
  }

  .product-card-wide .spec-list {
    grid-column: 2;
    grid-row: 1 / span 4;
    margin-top: 0;
    border-top: 0;
    border-left: 1px solid var(--line);
    padding: 4px 0 4px 32px;
    align-self: stretch;
    align-content: center;
  }
}

.product-card h3 {
  font-size: 1.3rem;
}

.product-tagline {
  color: var(--accent-dark);
  font-weight: 600;
  font-size: 0.95rem;
}

.product-card p {
  font-size: 0.97rem;
}

.badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.badge-market {
  background: var(--badge-market);
  color: var(--badge-market-ink);
}

.badge-rd {
  background: var(--badge-rd);
  color: var(--badge-rd-ink);
}

.badge-dev {
  background: var(--badge-dev);
  color: var(--badge-dev-ink);
}

.spec-list {
  list-style: none;
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

.spec-list strong {
  color: var(--ink);
  font-weight: 600;
  margin-right: 6px;
}

.img-note {
  margin-top: 20px;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: right;
}

/* --------------------------------------------------------------------------
   Approach — table + principles
   -------------------------------------------------------------------------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 640px;
}

th,
td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

thead th {
  background: var(--deep);
  color: #fff;
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.03em;
}

tbody tr:last-child td {
  border-bottom: none;
}

.principles {
  list-style: none;
  counter-reset: principle;
  display: grid;
  gap: 12px;
  max-width: 720px;
}

.principles li {
  counter-increment: principle;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px 16px 58px;
  position: relative;
}

.principles li::before {
  content: counter(principle);
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.principles span {
  color: var(--muted);
}

.approach-note {
  margin-top: 40px;
  max-width: 70ch;
  padding-left: 20px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Video
   -------------------------------------------------------------------------- */

.video-section {
  background: linear-gradient(180deg, var(--deep) 0%, var(--deep-2) 100%);
  color: #fff;
  padding: 84px 0;
}

.video-section h2 {
  color: #fff;
}

.video-section .section-intro {
  color: #d9e4eb;
  margin-bottom: 28px;
}

.video-frame {
  position: relative;
  padding-top: 56.25%; /* 16:9 */
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #000;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-link {
  margin-top: 16px;
  text-align: center;
}

.video-link a {
  color: var(--accent-light);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
}

.video-link a:hover {
  color: #fff;
}

/* --------------------------------------------------------------------------
   Sectors
   -------------------------------------------------------------------------- */

.sector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.sector {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  border-top: 3px solid var(--accent);
}

.sector h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--deep);
}

.sector p {
  font-size: 0.95rem;
  color: var(--muted);
}

.sector-spotlight {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.spotlight-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-right: 1px solid var(--line);
}

.spotlight-body {
  padding: 34px 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.spotlight-body h3 {
  font-size: 1.4rem;
  color: var(--deep);
}

.spotlight-body p {
  font-size: 0.97rem;
  color: var(--muted);
}

.spotlight-kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
}

@media (max-width: 720px) {
  .sector-spotlight {
    grid-template-columns: 1fr;
  }

  .spotlight-img {
    aspect-ratio: 16 / 10;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
}

/* --------------------------------------------------------------------------
   Methods
   -------------------------------------------------------------------------- */

.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.method {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}

.method h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--deep);
}

.method p {
  font-size: 0.95rem;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   About / team
   -------------------------------------------------------------------------- */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.person {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}

.person h3 {
  font-size: 1.15rem;
}

.person-role {
  color: var(--accent-dark);
  font-weight: 600;
  font-size: 0.9rem;
  margin: 4px 0 12px;
}

.person p:last-child {
  font-size: 0.95rem;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */

.contact {
  background: linear-gradient(180deg, var(--deep-2) 0%, var(--deep) 100%);
  color: #fff;
  padding: 92px 0;
  text-align: center;
}

.contact h2 {
  color: #fff;
}

.contact p {
  max-width: 58ch;
  margin: 14px auto 34px;
  color: #d9e4eb;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--deep);
  color: #9db4c2;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 28px 0;
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.brand-footer {
  font-weight: 700;
  color: #fff;
}

.brand-footer span {
  color: #7fc7d4;
}

.footer-copy {
  color: #7f97a7;
}

/* --------------------------------------------------------------------------
   Small screens
   -------------------------------------------------------------------------- */

@media (max-width: 640px) {
  .hero {
    padding: 64px 0 72px;
  }

  .section,
  .video-section {
    padding: 60px 0;
  }

  .nav {
    justify-content: center;
  }
}
