/**
 * Beach House Cafe - Base Styles
 * Reset, typography, and fundamental element styles
 */

/* ==========================================================================
   CSS Reset (Modern)
   ========================================================================== */

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

.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;
}

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  line-height: var(--leading-normal);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-charcoal);
  background-color: var(--color-cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: var(--font-semibold);
  line-height: var(--leading-tight);
  color: var(--color-secondary);
}

h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: var(--font-semibold);
  line-height: var(--leading-snug);
}

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

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

h3 {
  font-size: var(--text-2xl);
}

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

h5 {
  font-size: var(--text-lg);
}

h6 {
  font-size: var(--text-base);
}

p {
  margin-bottom: var(--space-4);
}

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

.text-display {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

.text-accent {
  font-family: var(--font-accent);
  font-size: var(--text-xl);
}

.text-small {
  font-size: var(--text-sm);
}

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

.text-primary {
  color: var(--color-primary);
}

.text-secondary {
  color: var(--color-secondary);
}

.text-center {
  text-align: center;
}

strong, b {
  font-weight: var(--font-bold);
}

em, i {
  font-style: italic;
}

/* ==========================================================================
   Links
   ========================================================================== */

a {
  transition: color var(--duration-fast) var(--ease-out);
}

.link {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.link:hover {
  color: var(--color-primary-dark);
}

/* ==========================================================================
   Selection
   ========================================================================== */

::selection {
  background-color: var(--color-accent);
  color: var(--color-secondary);
}

/* ==========================================================================
   Focus Styles
   ========================================================================== */

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

/* ==========================================================================
   Scrollbar (Webkit)
   ========================================================================== */

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

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

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

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