/* ============================================================
   Essential Capture | Homepage
   01 Tokens  02 Base  03 Background  04 Header  05 Hero
   06 Introduction  07 Feature cards  08 Values  09 Footer
   10 Responsive layout  11 Accessibility
   ============================================================ */

/* Locally hosted Inter font */
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* 01. DESIGN TOKENS */
:root {
  --navy: #07134e;
  --ink: #0a1b64;
  --accent: #215bea;
  --page-color: #eaf2fa;
  --radius: 20px;
  --container: 1100px;
  --edge-padding: 50px;
  --hero-height: 500px;
  --hero-heading-top: 115px;
  --hero-title-size: clamp(30px, 3.1vw, 52px);
  --hero-title-weight: 600;
  --intro-title-size: clamp(23px, 2.25vw, 34px);
  --intro-title-weight: 650;
  --body-copy-size: clamp(16px, 1.2vw, 20px);
  --feature-copy-size: clamp(16px, 1.15vw, 19px);
  --feature-card-height: 360px;
  --feature-card-shadow: 0 12px 28px rgb(8 27 77 / 18%), 0 4px 8px rgb(8 27 77 / 6%);
}

/* 02. BASE */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page-color);
  font-family: Inter, "Avenir Next", Avenir, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

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

.container {
  width: min(calc(100% - 48px), var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 20;
  padding: 12px;
  background: #fff;
  color: var(--ink);
}

.skip-link:focus {
  top: 12px;
}

/* 03. CONTINUOUS BACKGROUND */
main {
  background-color: var(--page-color);
  background-image: url('../assets/home_background.png');
  background-position: center top;
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

/* 04. HEADER / NAVIGATION */
.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
  color: #fff;
}

.header-inner,
.header-inner.container {
  width: 100%;
  max-width: none;
  padding-inline: var(--edge-padding);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 82px;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  width: clamp(130px, 11vw, 160px);
  height: auto;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(22px, 4vw, 55px);
}

.primary-nav a {
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
}

.primary-nav a:hover,
.footer-links a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.menu-toggle {
  display: none;
}

/* 05. HERO */
.hero {
  position: relative;
  isolation: isolate;
  height: var(--hero-height);
  overflow: hidden;
  background: transparent;
}

.hero-art {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
}

.hero-content {
  padding-top: var(--hero-heading-top);
}

.hero h1 {
  max-width: 620px;
  margin: 0;
  color: #fff;
  font-size: var(--hero-title-size);
  font-weight: var(--hero-title-weight);
  letter-spacing: -0.025em;
  line-height: 1.2;
  text-shadow: 0 2px 12px rgb(6 19 75 / 20%);
}

/* 06. INTRODUCTION */
.content-area {
  position: relative;
  padding: 8px 0 68px;
  background: transparent;
}

.intro {
  padding: 24px 0 35px;
  text-align: center;
}

.intro h2 {
  margin: 0 0 14px;
  font-size: var(--intro-title-size);
  font-weight: var(--intro-title-weight);
  letter-spacing: -0.035em;
  line-height: 1.25;
}

.intro p {
  max-width: 790px;
  margin: 0 auto;
  font-size: var(--body-copy-size);
  line-height: 1.5;
}

/* 07. PRODUCTIVITY / GAMES CARDS */
.features {
  display: grid;
  gap: 42px;
}

.feature-card {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  min-height: var(--feature-card-height);
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: rgb(255 255 255 / 66%);
  box-shadow: var(--feature-card-shadow);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

/* Productivity and Games hover effect */
@media (hover: hover) {
  .feature-card:hover {
    transform: translateY(-5px);
    border-color: #FF8A00;
    box-shadow:
      0 0 0 1px #FF8A00,
      0 18px 38px rgba(8, 27, 77, 0.24),
      0 6px 12px rgba(8, 27, 77, 0.10);
  }
}

.feature-card.games {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr);
}

.feature-image {
  position: relative;
  min-height: var(--feature-card-height);
  background: #0a1b68;
}

.feature-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feature-image h2 {
  position: absolute;
  top: 24%;
  right: 25px;
  margin: 0;
  color: #fff;
  font-size: clamp(25px, 2.2vw, 34px);
  letter-spacing: -0.025em;
  text-shadow: 0 2px 12px #0008;
}

.games .feature-image h2 {
  top: 18%;
  right: auto;
  left: 26px;
}

.feature-title-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.feature-title-link:hover {
  opacity: 0.8;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.feature-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 22px;
  padding: clamp(22px, 3vw, 38px);
}

.feature-copy p {
  margin: 0;
  font-size: var(--feature-copy-size);
  font-weight: 500;
  line-height: 1.5;
}

/* 08. THREE DESIGN VALUES */
.values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding-top: 52px;
  text-align: center;
}

.value {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.value:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 35px;
  right: -12px;
  height: 130px;
  border-right: 1px solid #8aa9e5;
}

/* Design values image hover effect */
.value img {
  width: clamp(94px, 11vw, 138px);
  aspect-ratio: 1;
  object-fit: contain;
  transition: transform 0.3s ease;
}

@media (hover: hover) {
  .value:hover img {
    transform: scale(1.08);
  }
}

.value h3 {
  margin: 13px 0 6px;
  font-size: clamp(17px, 1.55vw, 23px);
  letter-spacing: -0.025em;
}

.value p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

/* 09. FOOTER */
.site-footer {
  color: #fff;
  background: #080b47 url("../assets/eci-footer-bg.png") center center / cover no-repeat;
}

.footer-inner,
.footer-inner.container {
  width: 100%;
  max-width: none;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 20px;
  padding: 35px var(--edge-padding) 19px;
}

.footer-company {
  font-size: 14px;
  line-height: 1.6;
}

.footer-company a {
  text-decoration: none;
}

.footer-links {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: clamp(20px, 4vw, 70px);
}

.footer-links a {
  font-size: 14px;
  text-decoration: none;
}

.copyright {
  grid-column: 1 / -1;
  margin: 12px 0 0;
  color: #c5cdec;
  font-size: 12px;
  text-align: center;
}

/* 10. RESPONSIVE LAYOUT */
@media (max-width: 800px) {
  :root {
    --edge-padding: 24px;
  }

  .header-inner {
    min-height: 72px;
  }

  .menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    border: 1px solid #ffffff66;
    border-radius: 8px;
    background: none;
    cursor: pointer;
  }

  .menu-toggle span {
    display: block;
    width: 23px;
    height: 2px;
    background: #fff;
  }

  .primary-nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 24px;
    right: 24px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 18px;
    border-radius: 12px;
    background: #08164ff5;
    box-shadow: 0 12px 25px #0005;
  }

  .primary-nav.is-open {
    display: flex;
  }

  .primary-nav a {
    padding: 13px 5px;
  }

  .hero {
    height: 400px;
  }

  .hero-art {
    object-position: 58% center;
  }

  .hero-content {
    padding-top: 105px;
  }

  .intro {
    padding-top: 30px;
  }

  .feature-card,
  .feature-card.games {
    grid-template-columns: 1fr;
  }

  .feature-card {
    min-height: 0;
  }

  .feature-image {
    min-height: 260px;
  }

  .feature-card.games .feature-image {
    grid-row: 1;
  }

  .feature-card.games .feature-copy {
    grid-row: 2;
  }

  .feature-copy {
    padding: 25px;
  }

  .features {
    gap: 28px;
  }

  .values {
    gap: 8px;
  }

  .value:not(:last-child)::after {
    right: -4px;
    height: 100px;
  }

  .footer-inner,
  .footer-inner.container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
  }

  .copyright {
    text-align: center;
  }
}

@media (max-width: 480px) {
  :root {
    --edge-padding: 16px;
  }

  .container {
    width: min(calc(100% - 32px), var(--container));
  }

  .hero {
    height: 340px;
  }

  .hero-content {
    padding-top: 100px;
  }

  .feature-image {
    min-height: 210px;
  }

  .values {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-top: 42px;
  }

  .value:not(:last-child)::after {
    display: none;
  }

  .value img {
    width: 112px;
  }

  .value h3 {
    margin-top: 7px;
  }

  .content-area {
    padding-bottom: 45px;
  }
}

/* 11. ACCESSIBILITY */
.feature-title-link:focus-visible,
.primary-nav a:focus-visible,
.footer-links a:focus-visible,
.menu-toggle:focus-visible {
  outline: 3px solid #69c8ff;
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}


/* 12. SHARED PRODUCT NAVIGATION — desktop dropdown and mobile submenu */
.primary-nav .nav-group {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
}

.primary-nav .nav-category {
  white-space: nowrap;
}

.nav-submenu-toggle {
  border: 0;
  padding: 4px 5px;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.nav-submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 30;
  min-width: 180px;
  padding: 9px 0;
  border-radius: 10px;
  background: #101b60;
  box-shadow: 0 12px 24px #0004;
}

.nav-submenu a {
  display: block;
  padding: 10px 17px;
  white-space: nowrap;
}

.nav-submenu a:hover,
.nav-submenu a:focus-visible {
  background: #ffffff18;
}

.nav-group:hover .nav-submenu,
.nav-group:focus-within .nav-submenu,
.nav-group.is-expanded .nav-submenu {
  display: block;
}

.nav-submenu-toggle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

@media (max-width: 800px) {
  .primary-nav .nav-group {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0;
  }

  .primary-nav .nav-category {
    padding: 13px 5px;
  }

  .nav-submenu-toggle {
    padding: 10px 15px;
  }

  .nav-submenu {
    position: static;
    grid-column: 1 / -1;
    min-width: 0;
    padding: 0 0 6px 14px;
    background: transparent;
    box-shadow: none;
  }

  .nav-submenu a {
    padding: 10px 8px;
  }

  .nav-group:hover .nav-submenu,
  .nav-group:focus-within .nav-submenu {
    display: none;
  }

  .nav-group.is-expanded .nav-submenu {
    display: block;
  }
}