/* ============================================
   BASE STYLES
   Reset, Typography, Global Styles
   ============================================ */

/* ============================================
   FONT FACE - OCKLYN
   ============================================ */

@font-face {
  font-family: 'Ocklyn';
  src: url('../fonts/Ocklyn.ttf') format('truetype'),
       url('../fonts/Ocklyn.otf') format('opentype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ============================================
   MODERN CSS RESET
   ============================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-regular);
  line-height: var(--leading-normal);
  color: var(--color-neutral-800);
  background-color: white;
  overflow-x: hidden;
}

/* Prevent font size inflation on mobile */
body {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Remove default button styles */
button {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

/* Remove default link underline */
a {
  color: inherit;
  text-decoration: none;
}

/* Reset lists */
ul,
ol {
  list-style: none;
}

/* Content lists (restore bullets for actual content) */
section p + ul,
section p + ol,
.content ul,
.content ol {
  list-style: disc;
  padding-left: var(--space-6);
  margin-bottom: var(--space-4);
}

section p + ul li,
section p + ol li,
.content ul li,
.content ol li {
  margin-bottom: var(--space-2);
  color: var(--color-neutral-700);
}

section p + ol,
.content ol {
  list-style: decimal;
}

/* Images */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Forms */
input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

/* Headings - Serif Elegante */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-semibold);
  line-height: var(--leading-tight);
  color: var(--color-neutral-900);
  margin-bottom: var(--space-4);
}

h1 {
  font-size: var(--text-5xl);
  font-weight: var(--font-bold);
  letter-spacing: var(--tracking-tight);
}

h2 {
  font-size: var(--text-4xl);
  font-weight: var(--font-semibold);
  letter-spacing: var(--tracking-tight);
}

h3 {
  font-size: var(--text-3xl);
  font-weight: var(--font-semibold);
}

h4 {
  font-size: var(--text-2xl);
  font-weight: var(--font-medium);
}

h5 {
  font-size: var(--text-xl);
  font-weight: var(--font-medium);
}

h6 {
  font-size: var(--text-lg);
  font-weight: var(--font-medium);
}

/* Body Text */
p {
  margin-bottom: var(--space-4);
  line-height: var(--leading-relaxed);
  color: var(--color-neutral-700);
}

p:last-child {
  margin-bottom: 0;
}

/* Links */
a {
  color: var(--color-primary-600);
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--color-primary-700);
}

a:focus-visible {
  outline: 2px solid var(--color-primary-600);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Strong & Emphasis */
strong,
b {
  font-weight: var(--font-semibold);
  color: var(--color-neutral-900);
}

em,
i {
  font-style: italic;
}

/* Small Text */
small {
  font-size: var(--text-sm);
  color: var(--color-neutral-600);
}

/* Blockquote */
blockquote {
  margin: var(--space-6) 0;
  padding-left: var(--space-6);
  border-left: 4px solid var(--color-primary-600);
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--color-neutral-700);
}

/* Code */
code,
pre {
  font-family: 'Courier New', Courier, monospace;
  font-size: var(--text-sm);
  background-color: var(--color-neutral-100);
  border-radius: var(--radius-sm);
}

code {
  padding: 0.125rem 0.375rem;
}

pre {
  padding: var(--space-4);
  overflow-x: auto;
  margin: var(--space-4) 0;
}

pre code {
  padding: 0;
  background: none;
}

/* Horizontal Rule */
hr {
  height: 1px;
  border: none;
  background-color: var(--color-neutral-200);
  margin: var(--space-8) 0;
}

/* ============================================
   LAYOUT
   ============================================ */

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

@media (max-width: 768px) {
  .container {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
}

/* Section */
section {
  padding: var(--section-padding-y) 0;
}

@media (max-width: 768px) {
  section {
    padding: var(--section-padding-y-mobile) 0;
  }
}

/* ============================================
   UTILITIES
   ============================================ */

/* Accessibility - Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Skip to content */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary-700);
  color: white;
  padding: var(--space-2) var(--space-4);
  z-index: var(--z-tooltip);
}

.skip-to-content:focus {
  top: 0;
}

/* Hide element */
.hidden {
  display: none !important;
}

/* Visually hidden but accessible */
.visually-hidden {
  position: absolute !important;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px;
  height: 1px;
  word-wrap: normal;
}

/* ============================================
   SCROLL BEHAVIOR
   ============================================ */

/* Smooth scrolling */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Reduced motion */
@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;
  }
}

/* ============================================
   SELECTION
   ============================================ */

::selection {
  background-color: var(--color-primary-200);
  color: var(--color-primary-900);
}

::-moz-selection {
  background-color: var(--color-primary-200);
  color: var(--color-primary-900);
}

/* ============================================
   FOCUS STATES
   ============================================ */

:focus-visible {
  outline: 2px solid var(--color-primary-600);
  outline-offset: 2px;
}

/* ============================================
   SCROLLBAR (Webkit)
   ============================================ */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-neutral-100);
}

::-webkit-scrollbar-thumb {
  background: var(--color-neutral-400);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary-600);
}
