/* ==========================================================================
   KODIKO.org — Light Liquid Glass Design System
   ========================================================================== */

/* --- Custom Properties --- */
:root {
  --bg-primary: #F0F0F2;
  --bg-secondary: #FAFAFC;
  --bg-tertiary: #FFFFFF;

  /* Apple-style liquid glass */
  --glass-bg: rgba(255, 255, 255, 0.58);
  --glass-bg-strong: rgba(255, 255, 255, 0.78);
  --glass-bg-subtle: rgba(255, 255, 255, 0.38);
  --glass-blur: blur(40px) saturate(180%);
  --glass-blur-heavy: blur(60px) saturate(200%);
  --glass-border: rgba(255, 255, 255, 0.92);
  --glass-border-outer: rgba(0, 0, 0, 0.06);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.98);
  --glass-shadow: 0 4px 24px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  --glass-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.05);

  --accent-primary: #0071E3;
  --accent-secondary: #6E56CF;
  --accent-success: #059669;
  --text-primary: #1D1D1F;
  --text-secondary: #6E6E73;
  --text-muted: #86868B;
  --border: rgba(0, 0, 0, 0.07);
  --border-hover: rgba(0, 113, 227, 0.35);
  --gradient-primary: linear-gradient(135deg, #0071E3 0%, #6E56CF 100%);
  --gradient-mesh-1: radial-gradient(ellipse 70% 60% at 15% 20%, rgba(0, 113, 227, 0.1), transparent 65%);
  --gradient-mesh-2: radial-gradient(ellipse 60% 50% at 85% 75%, rgba(110, 86, 207, 0.08), transparent 65%);
  --gradient-mesh-3: radial-gradient(ellipse 50% 40% at 50% 50%, rgba(255, 255, 255, 0.9), transparent 70%);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 16px 48px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 8px 32px rgba(0, 113, 227, 0.12);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --header-height: 72px;
  --container-max: 1200px;
  --font-sans: system-ui, -apple-system, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* --- Liquid glass mixin (applied via shared rules) --- */
.glass,
.header,
.card,
.product-card,
.tech-card,
.contact-form,
.contact-info__card,
.products-empty,
.btn--secondary,
.hero__services li,
.lang-switcher,
.modal__dialog,
.nav__menu {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border-outer);
  box-shadow: var(--glass-shadow), var(--glass-highlight);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  background-image: var(--gradient-mesh-1), var(--gradient-mesh-2), var(--gradient-mesh-3);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-secondary);
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* --- Accessibility --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 10000;
  padding: 12px 24px;
  background: var(--accent-primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.skip-link:focus {
  top: 16px;
}

:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
  position: relative;
}

.section--alt {
  background: var(--glass-bg-subtle);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section__header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.section__label {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-primary);
  margin-bottom: 12px;
}

.section__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section__desc {
  color: var(--text-secondary);
  font-size: 1.0625rem;
}

.subsection__title {
  font-size: 1.375rem;
  font-weight: 600;
  text-align: center;
  margin: 48px 0 32px;
  letter-spacing: -0.01em;
}

/* --- About profile --- */
.about-intro {
  display: grid;
  gap: 32px;
  align-items: center;
  margin-bottom: 48px;
}

.about-intro__photo-wrap {
  justify-self: center;
  width: min(280px, 70vw);
  aspect-ratio: 1;
  border-radius: var(--radius-xl);
  padding: 4px;
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.25), rgba(110, 86, 207, 0.2));
  box-shadow: var(--glass-shadow-hover), var(--glass-highlight);
}

.about-intro__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius-xl) - 4px);
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
}

.about-intro__content {
  text-align: center;
}

.about-intro__title {
  margin-bottom: 16px;
}

.about-intro__desc {
  color: var(--text-secondary);
  font-size: 1.0625rem;
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .about-intro {
    grid-template-columns: minmax(200px, 280px) 1fr;
    gap: 48px;
  }

  .about-intro__photo-wrap {
    justify-self: end;
  }

  .about-intro__content {
    text-align: left;
  }

  .about-intro__desc {
    margin: 0;
  }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 113, 227, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 113, 227, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  color: #fff;
}

.btn--secondary {
  color: var(--text-primary);
}

.btn--secondary:hover {
  border-color: var(--border-hover);
  background: var(--glass-bg-strong);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: var(--glass-shadow-hover), var(--glass-highlight);
}

.btn--full {
  width: 100%;
}

/* --- Header / Nav --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur-heavy);
  -webkit-backdrop-filter: var(--glass-blur-heavy);
  border-bottom: 1px solid var(--glass-border-outer);
  box-shadow: 0 1px 0 var(--glass-border), 0 4px 20px rgba(0, 0, 0, 0.04);
  transition: background var(--transition);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__logo {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.nav__logo:hover {
  color: var(--text-primary);
}

.nav__logo-accent {
  color: var(--accent-primary);
}

.nav__toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  z-index: 1001;
}

.nav__toggle-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.nav__menu {
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 85vw);
  height: 100vh;
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur-heavy);
  -webkit-backdrop-filter: var(--glass-blur-heavy);
  padding: calc(var(--header-height) + 24px) 24px 24px;
  transform: translateX(100%);
  transition: transform var(--transition);
  border-left: 1px solid var(--glass-border-outer);
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.08), var(--glass-highlight);
  overflow-y: auto;
}

.nav__menu.open {
  transform: translateX(0);
}

.nav__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 32px;
}

.nav__link {
  display: block;
  padding: 12px 16px;
  color: var(--text-secondary);
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.nav__link:hover,
.nav__link.active {
  color: var(--text-primary);
  background: rgba(0, 113, 227, 0.08);
}

/* --- Language Switcher --- */
.lang-switcher {
  display: flex;
  gap: 4px;
  border-radius: var(--radius-sm);
  padding: 4px;
}

.lang-switcher__btn {
  padding: 6px 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: 8px;
  transition: all var(--transition);
}

.lang-switcher__btn:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.04);
}

.lang-switcher__btn.active {
  background: var(--accent-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 113, 227, 0.3);
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-height) + 48px) 0 80px;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.7;
  animation: blobFloat 20s ease-in-out infinite;
}

.hero__blob--1 {
  width: 550px;
  height: 550px;
  background: rgba(0, 113, 227, 0.15);
  top: -15%;
  right: -10%;
}

.hero__blob--2 {
  width: 450px;
  height: 450px;
  background: rgba(110, 86, 207, 0.12);
  bottom: 5%;
  left: -8%;
  animation-delay: -7s;
}

.hero__blob--3 {
  width: 350px;
  height: 350px;
  background: rgba(255, 255, 255, 0.8);
  top: 45%;
  left: 35%;
  animation-delay: -14s;
}

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero__eyebrow {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-primary);
  margin-bottom: 16px;
}

.hero__title {
  font-size: clamp(2rem, 5.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #1D1D1F 0%, #48484A 60%, #6E6E73 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.7;
}

.hero__services {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.hero__services li {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 100px;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* --- Cards --- */
.card-grid {
  display: grid;
  gap: 24px;
}

.card-grid--3 {
  grid-template-columns: 1fr;
}

.card-grid--4 {
  grid-template-columns: 1fr;
}

.card {
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--glass-shadow-hover), var(--glass-highlight);
  background: var(--glass-bg-strong);
}

.card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 113, 227, 0.1);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  color: var(--accent-primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.card__title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.card__desc {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.card--stat {
  text-align: center;
  padding: 32px 24px;
}

.card--stat .card__icon {
  margin: 0 auto 16px;
  background: rgba(110, 86, 207, 0.1);
  color: var(--accent-secondary);
}

.card--stat .card__title {
  font-size: 1.25rem;
}

/* --- Product Cards --- */
.product-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--glass-shadow-hover), var(--glass-highlight);
  background: var(--glass-bg-strong);
}

.product-card__image {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.06), rgba(110, 86, 207, 0.06));
  background-color: var(--bg-secondary);
  overflow: hidden;
  position: relative;
  border-bottom: 1px solid var(--border);
}

.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card__image--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.08), rgba(110, 86, 207, 0.06));
}

.product-card__image--placeholder svg {
  opacity: 0.35;
  color: var(--text-muted);
}

.product-card__body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card__category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-primary);
  margin-bottom: 8px;
}

.product-card__name {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.product-card__desc {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
  flex: 1;
  margin-bottom: 16px;
}

.product-card__btn {
  align-self: flex-start;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition);
}

.product-card:hover .product-card__btn {
  gap: 10px;
}

/* --- Products Empty State --- */
.products-empty {
  text-align: center;
  padding: 64px 24px;
  border-style: dashed;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}

.products-empty__icon {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.products-empty__title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.products-empty__desc {
  color: var(--text-secondary);
  max-width: 400px;
  margin: 0 auto;
}

/* --- Tech Grid --- */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.tech-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 16px;
  border-radius: var(--radius-md);
  transition: all var(--transition);
}

.tech-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  background: var(--glass-bg-strong);
  box-shadow: var(--glass-shadow-hover), var(--glass-highlight);
}

.tech-card__icon {
  width: 40px;
  height: 40px;
  color: var(--accent-primary);
}

.tech-card__name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
}

/* --- Timeline --- */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 23px;
  top: 24px;
  bottom: 24px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-primary), var(--accent-secondary));
  opacity: 0.25;
}

.timeline__item {
  display: flex;
  gap: 24px;
  padding: 24px 0;
  position: relative;
}

.timeline__number {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 50%;
  z-index: 1;
  box-shadow: 0 4px 16px rgba(0, 113, 227, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.timeline__content {
  padding-top: 8px;
}

.timeline__title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.timeline__desc {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* --- Contact --- */
.contact-layout {
  display: grid;
  gap: 40px;
}

.contact-form {
  border-radius: var(--radius-lg);
  padding: 32px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9375rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.form-group input.error,
.form-group textarea.error {
  border-color: #DC2626;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-error {
  display: block;
  font-size: 0.8125rem;
  color: #DC2626;
  margin-top: 6px;
  min-height: 1.2em;
}

.form-error--submit {
  margin-top: 12px;
  text-align: center;
}

.form-error--submit[hidden] {
  display: none;
}

#contact-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.form-success {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(5, 150, 105, 0.08);
  border: 1px solid rgba(5, 150, 105, 0.2);
  border-radius: var(--radius-sm);
  color: var(--accent-success);
  font-size: 0.9375rem;
}

.contact-info__card {
  border-radius: var(--radius-lg);
  padding: 32px;
}

.contact-info__card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.contact-info__list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.contact-info__list li:last-child {
  border-bottom: none;
}

.contact-info__icon {
  flex-shrink: 0;
  color: var(--accent-primary);
}

.contact-info__list a {
  color: var(--text-secondary);
  transition: color var(--transition);
}

.contact-info__list a:hover {
  color: var(--text-primary);
}

/* --- Footer --- */
.footer {
  background: var(--glass-bg-subtle);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
}

.footer__inner {
  display: grid;
  gap: 32px;
}

.footer__logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.footer__copy {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 8px;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer__links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.footer__links a:hover {
  color: var(--text-primary);
}

.footer__social {
  display: flex;
  gap: 16px;
}

.footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all var(--transition);
  box-shadow: var(--glass-shadow), var(--glass-highlight);
}

.footer__social a:hover {
  color: var(--accent-primary);
  border-color: var(--border-hover);
  background: var(--glass-bg-strong);
}

/* --- Modal --- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal[hidden] {
  display: none;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(240, 240, 242, 0.55);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
}

.modal__dialog {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur-heavy);
  -webkit-backdrop-filter: var(--glass-blur-heavy);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md), var(--glass-highlight);
  animation: modalIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-secondary);
  transition: all var(--transition);
  box-shadow: var(--glass-shadow), var(--glass-highlight);
}

.modal__close:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: #fff;
}

.modal__image-wrap {
  aspect-ratio: 16 / 9;
  background: var(--bg-secondary);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.modal__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal__body {
  padding: 32px;
}

.modal__category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-primary);
}

.modal__title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 8px 0 16px;
  letter-spacing: -0.02em;
}

.modal__desc {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
}

.modal__features-title {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.modal__features {
  margin-bottom: 24px;
}

.modal__features li {
  position: relative;
  padding: 8px 0 8px 24px;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  border-bottom: 1px solid var(--border);
}

.modal__features li:last-child {
  border-bottom: none;
}

.modal__features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  width: 8px;
  height: 8px;
  background: var(--accent-success);
  border-radius: 50%;
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (min-width: 768px) {
  .card-grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .tech-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .contact-layout {
    grid-template-columns: 1.2fr 0.8fr;
  }

  .footer__inner {
    grid-template-columns: 1fr auto auto auto;
    align-items: start;
  }
}

@media (min-width: 1024px) {
  .nav__toggle {
    display: none;
  }

  .nav__menu {
    position: static;
    width: auto;
    height: auto;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0;
    transform: none;
    border: none;
    box-shadow: none;
    display: flex;
    align-items: center;
    gap: 32px;
    overflow: visible;
  }

  .nav__list {
    flex-direction: row;
    gap: 4px;
    margin-bottom: 0;
  }

  .nav__link {
    padding: 8px 14px;
    font-size: 0.875rem;
  }

  .card-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .card-grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .tech-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .timeline {
    max-width: 100%;
    flex-direction: row;
    justify-content: space-between;
    gap: 16px;
  }

  .timeline::before {
    left: 24px;
    right: 24px;
    top: 23px;
    bottom: auto;
    width: auto;
    height: 2px;
    background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary));
  }

  .timeline__item {
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    padding: 0;
    gap: 16px;
  }

  .timeline__content {
    padding-top: 0;
  }
}

@media (min-width: 1280px) {
  .hero__content {
    max-width: 900px;
  }
}
