/**
 * Econest - Base Styles
 * Reset, typography, global elements
 */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Home page: background that respects light/dark theme */
body.home {
  background:
    radial-gradient(circle at 0% 0%, rgba(201, 169, 98, 0.16), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(201, 169, 98, 0.08), transparent 55%),
    linear-gradient(180deg, var(--color-bg), var(--color-bg-alt));
}

/* Cursor: hide default when custom cursor is active */
body.cursor-custom {
  cursor: none;
}

body.cursor-custom a,
body.cursor-custom button,
body.cursor-custom [role="button"] {
  cursor: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-in-out),
    opacity var(--duration-fast) var(--ease-in-out);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

/* Typography - Display (headings) */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(var(--text-4xl), 5vw, var(--text-8xl)); }
h2 { font-size: clamp(var(--text-3xl), 4vw, var(--text-6xl)); }
h3 { font-size: clamp(var(--text-2xl), 3vw, var(--text-4xl)); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  margin-bottom: var(--space-lg);
  color: var(--color-text-muted);
}

p:last-child {
  margin-bottom: 0;
}

/* Selection */
::selection {
  background: var(--color-gold);
  color: var(--color-black);
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 4px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  z-index: 9999;
  padding: var(--space-md) var(--space-lg);
  background: var(--color-gold);
  color: var(--color-black);
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: top var(--duration-normal) var(--ease-out-expo);
}

.skip-link:focus {
  top: var(--space-md);
}
