/* =============================================
   PH Silver Bay - Base Styles & Reset
   ============================================= */

/* ===========================================
   CSS Reset
   =========================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text-dark);
  background-color: var(--bg-white);
  overflow-x: hidden;
}

/* Remove default list styles */
ul,
ol {
  list-style: none;
}

/* Remove default anchor styles */
a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-gold);
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Buttons */
button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
}

/* Form elements */
input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  outline: none;
  border: none;
}

textarea {
  resize: vertical;
}

/* Remove outline on focus for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}

/* Keep outline for keyboard users */
:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--primary-dark);
  line-height: var(--lh-h2);
}

h1 {
  font-size: var(--fs-h1);
  font-weight: var(--fw-bold);
  line-height: var(--lh-h1);
}

h2 {
  font-size: var(--fs-h2);
  font-weight: var(--fw-semibold);
}

h3 {
  font-size: var(--fs-h3);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-h3);
}

p {
  margin-bottom: var(--spacing-md);
}

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

strong {
  font-weight: var(--fw-semibold);
}

/* ===========================================
   Layout
   =========================================== */

.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

section {
  padding: var(--section-padding);
}

/* ===========================================
   Utility Classes
   =========================================== */

/* Text alignment */
.text-center {
  text-align: center;
}

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

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

/* Text colors */
.text-white {
  color: var(--text-light);
}

.text-gold {
  color: var(--accent-gold);
}

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

/* Backgrounds */
.bg-cream {
  background-color: var(--bg-cream);
}

.bg-dark {
  background-color: var(--primary-dark);
}

.bg-white {
  background-color: var(--bg-white);
}

/* Flex utilities */
.flex {
  display: flex;
}

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

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

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

/* Grid */
.grid {
  display: grid;
}

/* Margins */
.mb-sm {
  margin-bottom: var(--spacing-sm);
}

.mb-md {
  margin-bottom: var(--spacing-md);
}

.mb-lg {
  margin-bottom: var(--spacing-lg);
}

.mb-xl {
  margin-bottom: var(--spacing-xl);
}

/* ===========================================
   Animations
   =========================================== */

/* Fade in animation class */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Reduce motion for accessibility */
@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;
  }

  .fade-in {
    opacity: 1;
    transform: none;
  }
}

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

::selection {
  background-color: var(--accent-gold);
  color: var(--text-light);
}

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

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

::-webkit-scrollbar-track {
  background: var(--bg-cream);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-gold);
  border-radius: var(--radius-sm);
}

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