/* ============================================
   PEKIN DIGITAL AGENCY — BASE & RESET STYLES
   ============================================ */

/* ─── Universal Reset ─── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ─── Root & HTML ─── */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: var(--navbar-height);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* ─── Body ─── */
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-base);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ─── Custom Scrollbar ─── */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--color-accent-blue), var(--color-accent-purple));
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #33ddff, #9b5fff);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-accent-blue) var(--color-bg-secondary);
}

/* ─── Selection ─── */
::selection {
  background-color: rgba(0, 212, 255, 0.25);
  color: var(--color-text-primary);
}

::-moz-selection {
  background-color: rgba(0, 212, 255, 0.25);
  color: var(--color-text-primary);
}

/* ─── Before / After ─── */
::before,
::after {
  box-sizing: border-box;
}

/* ─── Typography Hierarchy ─── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-primary);
}

h1 { font-size: clamp(var(--text-4xl), 6vw, var(--text-7xl)); }
h2 { font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl)); }
h3 { font-size: clamp(var(--text-xl),  2.5vw, var(--text-3xl)); }
h4 { font-size: clamp(var(--text-lg),  2vw,   var(--text-xl)); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
  color: var(--color-text-secondary);
  line-height: var(--leading-base);
  max-width: 68ch;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent-blue);
}

strong, b {
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
}

em, i {
  font-style: italic;
}

/* ─── Lists ─── */
ul, ol {
  list-style: none;
}

/* ─── Media ─── */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

img, video {
  height: auto;
}

/* ─── Form Elements ─── */
input,
textarea,
select,
button {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  border: none;
  outline: none;
  background: none;
}

button {
  cursor: pointer;
  user-select: none;
}

textarea {
  resize: vertical;
}

/* ─── Table ─── */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* ─── Container ─── */
.container {
  max-width: var(--container-max);
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

/* ─── Section Base ─── */
.section {
  padding: var(--section-padding-y) 0;
  position: relative;
  overflow: hidden;
}

/* ─── Section Header ─── */
.section-header {
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-accent-blue);
  padding: 6px 16px;
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: var(--radius-full);
  background: rgba(0, 212, 255, 0.06);
  margin-bottom: var(--space-lg);
}

.section-title {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-primary);
  margin-bottom: var(--space-lg);
}

.section-desc {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  line-height: var(--leading-loose);
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
}

/* ─── Gradient Text ─── */
.gradient-text {
  background: var(--color-accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  display: inline;
}

/* ─── Glass Card ─── */
.glass {
  background: var(--color-glass);
  border: 1px solid var(--color-glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px 32px;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
  user-select: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-accent-gradient);
  color: #ffffff;
  border: none;
  box-shadow: var(--glow-blue);
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  transition: background var(--transition-fast);
  border-radius: inherit;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-blue-intense);
  color: #ffffff;
}

.btn-primary:hover::before {
  background: rgba(255, 255, 255, 0.1);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-primary);
  border: 1px solid var(--color-glass-border);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  border-color: var(--color-accent-blue);
  color: var(--color-accent-blue);
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.2);
  transform: translateY(-2px);
}

.btn-full {
  width: 100%;
}

/* ─── Visibility Utilities ─── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─── Overflow helpers ─── */
.overflow-hidden { overflow: hidden; }
.overflow-visible { overflow: visible; }

/* ─── Flex utilities ─── */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

/* ─── Prevent FOUC on loading ─── */
body.loading {
  overflow: hidden;
}
