:root {
  font-size: 100%;
  color-scheme: light;
  --bg: #081425;
  --bg-soft: #0f1e34;
  --surface: #ffffff;
  --surface-soft: #f3f7ff;
  --ink: #10172a;
  --ink-soft: #42506d;
  --line: #d7e2ff;
  --line-strong: #b5c9ff;
  --primary: #1e67ff;
  --primary-strong: #1245d4;
  --accent: #00a9b8;
  --shadow: 0 24px 60px rgba(14, 41, 92, 0.2);
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
  font-family: "Sora", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  line-height: 1.55;
  background:
    linear-gradient(180deg, rgba(246, 248, 252, 0.78) 0%, rgba(232, 239, 249, 0.84) 100%),
    url("./images/theosoft-site-background.png") center top / cover no-repeat fixed;
}

/* WCAG marker: keyboard users can skip repetitive header navigation. */
.skip-link {
  position: absolute;
  left: 0.85rem;
  top: -4rem;
  z-index: 40;
  padding: 0.6rem 0.9rem;
  border-radius: 0.6rem;
  background: #ffffff;
  color: #0e1f3d;
  text-decoration: none;
  font-weight: 700;
}

.skip-link:focus-visible {
  top: 0.85rem;
}

.background {
  display: none;
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(68px);
}

.glow-one {
  width: 22rem;
  height: 22rem;
  left: -5rem;
  top: 4rem;
  background: rgba(30, 103, 255, 0.28);
}

.glow-two {
  width: 18rem;
  height: 18rem;
  right: -4rem;
  top: 11rem;
  background: rgba(0, 169, 184, 0.24);
}

.container {
  width: min(76rem, 100% - 2rem);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  isolation: isolate;
  overflow: hidden;
  backdrop-filter: blur(8px);
  background: rgba(7, 19, 39, 0.62);
  border-bottom: 1px solid rgba(150, 180, 245, 0.16);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6, 15, 30, 0.72) 0%, rgba(9, 22, 42, 0.68) 100%),
    url("./images/theosoft-site-background.png") center / cover no-repeat;
  z-index: -1;
}

/* Graphic marker: soft transition from navbar background into page background. */
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1.1rem;
  background: linear-gradient(
    180deg,
    rgba(14, 33, 62, 0.18) 0%,
    rgba(14, 33, 62, 0.08) 46%,
    rgba(14, 33, 62, 0) 100%
  );
  pointer-events: none;
}

.header-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem 1rem;
  padding-block: 0.72rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #f9fbff;
  min-width: 0;
}

.brand-logo {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.8rem;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* WCAG marker: visible focus indicator for keyboard navigation. */
a:focus-visible,
button:focus-visible {
  outline: 3px solid #86d9ff;
  outline-offset: 3px;
}

.brand-lockup {
  display: grid;
  min-width: 0;
}

.brand-text {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-subtext {
  font-size: 0.74rem;
  color: rgba(219, 233, 255, 0.92);
}

.site-nav {
  display: flex;
  order: 3;
  width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
  gap: 0.9rem;
  padding-bottom: 0.1rem;
}

.site-nav a {
  flex: 0 0 auto;
  text-decoration: none;
  color: rgba(223, 234, 255, 0.88);
  font-weight: 500;
  padding: 0.34rem 0.62rem;
  border-radius: 999px;
}

.site-nav a:hover {
  color: #ffffff;
  background: rgba(188, 212, 255, 0.14);
}

.site-nav a[aria-current="page"] {
  color: #102247;
  background: #ffffff;
}

.language-switcher {
  display: inline-flex;
  border: 1px solid rgba(194, 213, 249, 0.4);
  border-radius: 999px;
  background: rgba(9, 23, 44, 0.85);
  padding: 0.16rem;
}

.language-switcher button {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  border: 0;
  background: transparent;
  color: rgba(229, 238, 255, 0.92);
  border-radius: 999px;
  padding: 0.28rem 0.66rem;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.language-switcher button[aria-pressed="true"] {
  background: #ffffff;
  color: #102247;
}

.lang-flag {
  font-size: 0.92rem;
  line-height: 1;
}

.hero {
  padding-block: 2.4rem 2rem;
}

.home-hero {
  padding-top: clamp(1.1rem, 3vw, 1.9rem);
  padding-bottom: 0.5rem;
}

.home-hero-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1rem;
  border: 0;
  background: transparent;
  box-shadow: 0 20px 42px rgba(9, 29, 67, 0.2);
}

.hero-content {
  display: grid;
  gap: 1rem;
}

.hero-surface,
.hero-panel {
  border-radius: 1.25rem;
  border: 1px solid rgba(177, 199, 239, 0.65);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 255, 0.95));
  box-shadow: var(--shadow);
  padding: 1.2rem;
}

.hero-surface {
  display: flex;
  flex-direction: column;
}

.hero-panel {
  display: grid;
  gap: 1rem;
}

.hero-badge {
  margin: 0;
  color: #0b7e86;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.76rem;
  font-weight: 700;
}

h1 {
  margin: 0.5rem 0 0;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1.1;
  text-wrap: balance;
}

.hero-subtitle {
  margin: 0.85rem 0 0;
  color: var(--ink-soft);
  max-width: 56ch;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.hero-chip {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #ffffff;
  padding: 0.34rem 0.7rem;
  font-size: 0.83rem;
  font-weight: 600;
  color: #193560;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  margin-top: 1.2rem;
  width: fit-content;
  text-decoration: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #ffffff;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.75rem 1.4rem;
  box-shadow: 0 16px 35px rgba(18, 69, 212, 0.33);
}

.primary-button:hover {
  filter: brightness(1.07);
}

.hero-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  padding: 0.7rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(177, 199, 239, 0.7);
  background: #f4f8ff;
}

.panel-title {
  margin: 0;
  font-size: 1.1rem;
  color: #1b3563;
}

.panel-list {
  list-style: none;
  margin: 0.9rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.panel-item {
  display: flex;
  gap: 0.55rem;
  color: #34476f;
}

.panel-marker {
  color: var(--accent);
  line-height: 1.2;
}

.section {
  padding-block: 1.8rem;
}

.section-top {
  padding-top: 2.3rem;
}

.page-heading {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  line-height: 1.1;
  color: #1a3358;
}

h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2.8vw, 2.05rem);
}

.section-intro {
  margin-top: 0.72rem;
  color: #42506d;
  max-width: 66ch;
}

#services .container {
  width: min(66rem, 100% - 2rem);
}

.home-services {
  width: min(66rem, 100% - 2rem);
}

.home-hero .container {
  width: min(76rem, 100% - 2rem);
}

body[data-page="about"] .hero {
  padding-top: 0.9rem;
}

body[data-page="about"] .hero-content {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 1rem;
}

body[data-page="about"] .hero-surface,
body[data-page="about"] .hero-panel {
  width: 100%;
  text-align: left;
}

.service-grid {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.service-item {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1rem;
  overflow: hidden;
  padding: 1rem;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.service-item:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 14px 28px rgba(17, 52, 116, 0.08);
}

/* Graphic marker: image displayed in each vertical service tile. */
.service-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 8.3;
  object-fit: contain;
  padding: 0;
  border: 0;
  border-radius: 0.7rem;
  background: transparent;
}

.service-content h3 {
  margin: 0 0 0.42rem;
  font-size: 1.04rem;
}

.service-content p {
  margin: 0;
  color: var(--ink-soft);
}

.company-card,
.privacy-card,
.contact-card {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  padding: 1rem;
}

.company-block {
  margin-top: 1.8rem;
}

.company-heading {
  margin: 0;
}

.company-intro {
  margin-top: 0.6rem;
}

.detail-grid {
  display: grid;
  gap: 0.62rem;
}

.detail-row {
  display: grid;
  gap: 0.12rem;
}

.detail-row dt {
  font-weight: 700;
  font-size: 0.9rem;
  color: #526283;
}

.detail-row dd {
  margin: 0;
}

.privacy-card p {
  margin: 0 0 0.8rem;
}

.privacy-card p:last-child {
  margin-bottom: 0;
}

.card-label {
  margin: 0 0 0.6rem;
  font-weight: 700;
  color: #36476f;
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.contact-link {
  color: var(--primary-strong);
  text-decoration: none;
  font-weight: 600;
}

.contact-link:hover {
  text-decoration: underline;
}

.site-footer {
  border-top: 1px solid #cbd9f6;
  margin-top: 2rem;
}

.footer-content {
  padding-block: 1rem 2rem;
  color: #44557a;
  font-size: 0.92rem;
}

@media (min-width: 60rem) {
  .header-content {
    flex-wrap: nowrap;
  }

  .site-nav {
    order: 0;
    width: auto;
    overflow: visible;
    padding-bottom: 0;
  }

  .hero {
    padding-block: 4rem 2.2rem;
  }

  body[data-page="about"] .hero {
    padding-top: 2rem;
  }

  .hero-content {
    grid-template-columns: 1.4fr 0.9fr;
    align-items: start;
  }

  .hero-surface,
  .hero-panel {
    padding: 1.5rem;
  }

  .service-item {
    padding: 1rem;
  }

  .service-image {
    aspect-ratio: 16 / 8;
  }

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

@media (min-width: 78rem) {
  .service-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
