@font-face {
  font-family: "Digital Sans EF Medium";
  src:
    url("../fonts/ds/DigitalSansEFMedium.woff2") format("woff2"),
    url("../fonts/ds/DigitalSansEFMedium.woff") format("woff"),
    url("../fonts/ds/Digital Sans EF Medium.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  /* BRAND COLORS */
  --color-red: #ea4335;
  --color-blue: #4285f4;
  --color-green: #34a853;
  --color-yellow: #fbbc05;
  --font-family: "Digital Sans EF Medium", sans-serif;

  --color-text: #1a1a1a;
  --color-text-muted: #6b7280;

  --color-bg: #f7f9fc;
  --color-surface: #ffffff;

  /* TYPOGRAPHY SCALE (Fluid) */
  --fs-xs: clamp(0.75rem, 0.7rem + 0.2vw, 0.85rem);
  --fs-sm: clamp(0.85rem, 0.8rem + 0.3vw, 0.95rem);
  --fs-base: clamp(1rem, 0.95rem + 0.4vw, 1.1rem);
  --fs-lg: clamp(1.25rem, 1.1rem + 0.8vw, 1.5rem);
  --fs-xl: clamp(1.8rem, 1.5rem + 1vw, 2.4rem);
  --fs-xxl: clamp(2.5rem, 2rem + 2vw, 3.5rem);

  /* SPACING SYSTEM (8pt grid) */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;

  /* RADIUS */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 40px;

  /* SHADOW (Premium soft elevation) */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.12);

  /* MOTION */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --premium-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --transition: all 0.35s var(--ease);
}

/* =========================
   BODY / ROOT TYPOGRAPHY
========================= */

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: var(--fs-base);
  line-height: 1.6;
  font-weight: 400;

  color: var(--color-text);
  background: var(--color-bg);

  margin: 0;
  padding: 0;

  /* Rendering improvements */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;

  /* Better text flow */
  overflow-x: hidden;
}

/* Selection styling */
::selection {
  background: var(--color-blue);
  color: #fff;
}

/* Small devices */
@media (max-width: 600px) {
  body {
    line-height: 1.7;
  }
}

/* Large screens */
@media (min-width: 1200px) {
  body {
    font-size: 1.05rem;
  }
}

/* =========================
   HEADING SYSTEM
========================= */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-family);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--color-text);
}

/* HERO / PRIMARY TITLE */
h1 {
  font-size: var(--fs-xxl);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.035em;
  margin-bottom: var(--space-3);
}

/* SECTION TITLE */
h2 {
  font-size: var(--fs-xl);
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-2);
}

/* SUBSECTION */
h3 {
  font-size: var(--fs-lg);
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-bottom: var(--space-2);
}

/* CARD / COMPONENT TITLE */
h4 {
  font-size: var(--fs-base);
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-1);
}

/* SMALL HEADING */
h5 {
  font-size: var(--fs-sm);
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: 0;
  margin-bottom: var(--space-1);
  color: var(--color-text-muted);
}

/* MICRO LABEL */
h6 {
  font-size: var(--fs-xs);
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: var(--space-1);
  color: var(--color-text-muted);
}

/* h2::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  margin-top: var(--space-1);
  background: var(--color-blue);
  border-radius: var(--radius-pill);
} */

@media (min-width: 768px) {
  h1 {
    line-height: 1.1;
    letter-spacing: -0.03em;
  }

  h2 {
    line-height: 1.2;
  }

  h3 {
    line-height: 1.25;
  }
}

@media (min-width: 1024px) {
  h1 {
    font-size: clamp(2.8rem, 2rem + 2vw, 3.8rem);
    margin-bottom: var(--space-4);
  }

  h2 {
    font-size: clamp(2rem, 1.6rem + 1.2vw, 2.6rem);
    margin-bottom: var(--space-3);
  }

  h3 {
    font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.8rem);
  }
}

@media (min-width: 1920px) {
  h1 {
    max-width: 18ch;
  }

  h2 {
    max-width: 22ch;
  }
}

/* =========================
   PARAGRAPH SYSTEM
========================= */

p {
  font-family: var(--font-family);
  font-size: var(--fs-base);
  line-height: 1.7;
  font-weight: 400;
  color: var(--color-text);

  margin: 0 0 var(--space-2) 0;

  /* Justification */
  text-align: justify;
  text-justify: inter-word;

  /* Better word flow */
  hyphens: auto;
  overflow-wrap: break-word;
  word-break: normal;

  /* Improve rendering */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* Tablet */
@media (min-width: 768px) {
  p {
    line-height: 1.7;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  p {
    font-size: var(--fs-base);
    line-height: 1.65;
  }
}

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

p.lead {
  font-size: var(--fs-lg);
  line-height: 1.6;
  font-weight: 500;
  max-width: 60ch;
}

p.small {
  font-size: var(--fs-sm);
  line-height: 1.6;
}

/* =========================
   SECTION SYSTEM
========================= */

section {
  position: relative;
  width: 100%;

  padding-block: var(--space-5);
}

/* Mobile */
@media (max-width: 600px) {
  section {
    padding-block: var(--space-4);
  }
}

/* Tablet */
@media (min-width: 768px) {
  section {
    padding-block: var(--space-5);
  }
}

/* Desktop */
@media (min-width: 1024px) {
  section {
    padding-block: var(--space-6);
  }
}

/* Light section */
.section-light {
  background: var(--color-surface);
}

/* Dark section */
.section-dark {
  background: #111827;
  color: #f9fafb;
}

/* Gradient section */
.section-gradient {
  background: linear-gradient(135deg, var(--color-blue), var(--color-green));
  color: #fff;
}

/* No padding (utility) */
.section-tight {
  padding-block: var(--space-3);
}

/* Centered content */
.section-center {
  text-align: center;
}

/* Flex center */
.section-flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Generic block wrapper */
.div {
  display: block;
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

/* =========================
   CONTAINER SYSTEM
========================= */

.container {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--space-2);
}

/* Small devices */
@media (min-width: 576px) {
  .container {
    max-width: 540px;
  }
}

/* Tablet */
@media (min-width: 768px) {
  .container {
    max-width: 720px;
    padding-inline: var(--space-3);
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .container {
    max-width: 960px;
  }
}

/* Large Desktop */
@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}

/* Ultra Wide */
@media (min-width: 1440px) {
  .container {
    max-width: 1280px;
  }
}

@media (min-width: 1550px) {
  .container {
    max-width: 1500px;
  }
}

/* Full-width but controlled padding */
.container-fluid {
  width: 100%;
  padding-inline: clamp(16px, 4vw, 48px);
}

/* =========================
   GRID SYSTEM
========================= */

.grid {
  display: grid;
  gap: var(--space-3);
}

/* Auto responsive grid (BEST) */
.grid-auto {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Fixed column grids */
.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Tablet */
@media (max-width: 992px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

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

/* Mobile */
@media (max-width: 600px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

.grid-sm {
  gap: var(--space-2);
}

.grid-lg {
  gap: var(--space-4);
}

.grid-center {
  align-items: center;
}

.grid-start {
  align-items: start;
}

.grid-end {
  align-items: end;
}

.grid-between {
  justify-content: space-between;
}

.col-span-2 {
  grid-column: span 2;
}

.col-span-3 {
  grid-column: span 3;
}

.mt-1 {
  margin-top: var(--space-1);
}
.mt-2 {
  margin-top: var(--space-2);
}
.mt-3 {
  margin-top: var(--space-3);
}

.mb-1 {
  margin-bottom: var(--space-1);
}
.mb-2 {
  margin-bottom: var(--space-2);
}
.mb-3 {
  margin-bottom: var(--space-3);
}

.p-1 {
  padding: var(--space-1);
}
.p-2 {
  padding: var(--space-2);
}
.p-3 {
  padding: var(--space-3);
}

/* =========================
   BUTTON BASE
========================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  font-family: var(--font-family);
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1;

  padding: 12px 22px;
  border-radius: var(--radius-pill);

  border: none;
  cursor: pointer;
  text-decoration: none;

  transition: var(--transition);
  box-shadow: var(--shadow-sm);

  position: relative;
  overflow: hidden;

  user-select: none;
  white-space: nowrap;
}

/* PRIMARY BUTTON */

.btn-primary {
  background: linear-gradient(270deg, var(--color-red), var(--color-yellow));
  background-size: 600% 600%;
  animation: slowGradient 10s ease infinite;

  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: var(--shadow-md);
}

/* SECONDARY BUTTON */

.btn-secondary {
  background: linear-gradient(90deg, var(--color-blue), var(--color-green));
  color: #fff;
}

.btn-secondary:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: var(--shadow-md);
}

/* ACTIVE (click feedback) */
.btn:active {
  transform: scale(0.97);
  box-shadow: var(--shadow-sm);
}

/* FOCUS (accessibility) */
.btn:focus-visible {
  outline: 2px solid var(--color-blue);
  outline-offset: 3px;
}

/* DISABLED */
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-sm {
  padding: 8px 16px;
  font-size: var(--fs-xs);
}

.btn-lg {
  padding: 14px 28px;
  font-size: var(--fs-base);
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid #e5e7eb;
}

.btn-outline:hover {
  background: #f3f4f6;
}

@keyframes slowGradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .btn {
    padding: 12px 24px;
  }
}

/* =========================
   IMAGE SYSTEM
========================= */

img {
  max-width: 100%;
  height: auto;
  display: block;

  border-radius: var(--radius-md);

  /* Prevent layout shift */
  object-fit: cover;

  /* Smooth rendering */
  image-rendering: auto;
}

/* Rounded */
.img-rounded {
  border-radius: var(--radius-lg);
}

/* Circle (avatars) */
.img-circle {
  border-radius: 50%;
}

/* Shadow */
.img-elevated {
  box-shadow: var(--shadow-md);
}

/* Hover zoom (cards) */
.img-hover {
  transition: transform 0.4s ease;
}

.img-hover:hover {
  transform: scale(1.05);
}

/* Aspect ratio control */
.img-wrapper {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =========================
   LINK SYSTEM
========================= */

a {
  color: var(--color-blue);
  text-decoration: none;
  font-weight: 500;

  transition: var(--transition);
  cursor: pointer;
}

/* Hover */
a:hover {
  color: var(--color-green);
}

/* Active */
a:active {
  opacity: 0.8;
}

/* Focus (accessibility) */
a:focus-visible {
  outline: 2px solid var(--color-blue);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Muted link */
.link-muted {
  color: var(--color-text-muted);
}

.link-muted:hover {
  color: var(--color-text);
}

/* Underline animation */
.link-animated {
  position: relative;
}

.link-animated::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;

  width: 0;
  height: 2px;
  background: currentColor;

  transition: width 0.3s ease;
}

.link-animated:hover::after {
  width: 100%;
}

p a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

p a:hover {
  text-decoration-thickness: 2px;
}

/* Card container */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-3);

  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

input,
textarea,
select {
  padding: 12px 14px;
  border-radius: var(--radius-md);

  border: 1px solid #e5e7eb;
  background: #fff;

  transition: var(--transition);
}

input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.15);
}

/* Tag */
.section-tag {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 14px;
  margin-bottom: var(--space-3);
  border-radius: var(--radius-pill);
  background: rgba(66, 133, 244, 0.1);
  color: var(--color-blue);
  box-shadow: 0 2px 10px rgba(66, 133, 244, 0.1);
}

/* Heading */
.section-title {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 800;
  color: var(--nex-dark);
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.03em;
  background: linear-gradient(
    90deg,
    var(--color-text) 0%,
    var(--color-blue) 45%,
    var(--color-green) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-title span {
  background: linear-gradient(90deg, var(--color-yellow), var(--color-red));
  background-size: 300%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: cycleColors 6s linear infinite;
}
