/* ============================================================
   OCEAN GOAT TOURS — BASE STYLES
   Reset, root, typography hierarchy, global utilities
   ============================================================ */

/* --------------------------------------------------
   MODERN RESET
   -------------------------------------------------- */

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

html {
  font-size: 16px;
  scroll-behavior: auto;   /* Lenis overrides native smooth scroll */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--header-height);
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  background-color: var(--color-white);
  background-image: url('../images/overlay.png');
  background-repeat: repeat;
  background-blend-mode: soft-light;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

img {
  object-fit: cover;
}

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

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

input, textarea, select {
  font-family: var(--font-body);
}

svg {
  display: block;
  flex-shrink: 0;
}

/* --------------------------------------------------
   TYPOGRAPHY HIERARCHY
   -------------------------------------------------- */

/* h1 & h2 — Anton display, bold uppercase */
h1, h2 {
  font-family: var(--font-display);
  font-weight: 400;                  /* Anton is single-weight */
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-text-primary);
}

h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }

/* Half-hollow heading text — wrap any word/phrase in <em>
   Default stroke suits light sections; dark sections/hero override below. */
h1 em, h2 em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--color-stroke-hollow);
  text-stroke: 1.5px var(--color-stroke-hollow);
}

.section--dark h1 em, .section--dark h2 em,
.section--ink h1 em,  .section--ink h2 em,
.hero__headline em {
  -webkit-text-stroke-color: var(--color-stroke-hollow-inverse);
  text-stroke-color: var(--color-stroke-hollow-inverse);
}

/* h3 — Anton, same as h1/h2 but smaller */
h3 {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-text-primary);
}

h4 {
  font-size: var(--text-h4);
  font-family: var(--font-body);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-normal);
  line-height: var(--leading-snug);
  text-transform: none;
}

h5 {
  font-size: var(--text-h5);
  font-family: var(--font-body);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-normal);
  text-transform: none;
}

h6 {
  font-size: var(--text-body);
  font-family: var(--font-body);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

p {
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
  max-width: 68ch;
}

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

strong {
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
}

em {
  font-style: italic;
}

/* --------------------------------------------------
   TYPE UTILITY CLASSES
   -------------------------------------------------- */

/* Display — hero headlines, extra large serif */
.text-display {
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tightest);
  letter-spacing: var(--tracking-tightest);
}

/* Lead — prominent introductory paragraph */
.text-lead {
  font-size: var(--text-body-lg);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
  max-width: 60ch;
}

/* Section overline — small all-caps label above headings */
.label-overline {
  display: none;
  font-family: var(--font-body);
  font-size: var(--text-label);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-brand-accent);
  margin-bottom: var(--space-3);
}

.label-overline--light {
  color: var(--color-gold-300);
}

/* Text color utilities */
.text-inverse  { color: var(--color-text-inverse) !important; }
.text-accent   { color: var(--color-brand-accent); }
.text-muted    { color: var(--color-text-muted); }
.text-brand    { color: var(--color-brand-primary); }
.text-center   { text-align: center; }
.text-left     { text-align: left; }

/* Width utility for contained paragraphs */
.max-prose { max-width: 65ch; }

/* --------------------------------------------------
   LINKS
   -------------------------------------------------- */

.link {
  color: var(--color-brand-primary);
  font-weight: var(--weight-medium);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color var(--transition-base), color var(--transition-base);
}

.link:hover {
  text-decoration-color: currentColor;
}

/* --------------------------------------------------
   HORIZONTAL RULE
   -------------------------------------------------- */

hr {
  border: none;
  border-top: 1px solid var(--color-border-light);
  margin: var(--space-8) 0;
}

/* --------------------------------------------------
   ACCESSIBILITY
   -------------------------------------------------- */

/* Focus ring */
:focus-visible {
  outline: 2px solid var(--color-brand-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* On navy chrome, the base ocean-accent ring falls below WCAG 1.4.11's 3:1
   non-text contrast minimum — use the lighter accent-on-dark variant. */
.site-header :focus-visible,
.side-nav :focus-visible,
.mobile-hotbar :focus-visible,
.mobile-menu-sheet :focus-visible,
.site-footer :focus-visible,
.section--dark :focus-visible,
.section--ink :focus-visible {
  outline-color: var(--color-brand-accent-light);
}

/* Skip to main content */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  padding: var(--space-2) var(--space-5);
  background: var(--color-brand-accent);
  color: var(--color-white);
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
  border-radius: var(--radius-md);
  z-index: var(--z-toast);
  transition: top var(--transition-base);
}

.skip-link:focus {
  top: var(--space-4);
}

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

/* --------------------------------------------------
   WATER TEXTURE
   A fixed, low-opacity ocean-ripple photo behind all page
   content — multiply blend lets the white sections stay
   white while the dark ripple troughs ghost through as texture.
   -------------------------------------------------- */

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.10;
  mix-blend-mode: multiply;
  background-image: url('../images/texture/ocean-ripple.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* --------------------------------------------------
   FILM GRAIN OVERLAY
   Adds subtle texture to dark surfaces — premium feel
   opacity kept very low so photography is never muddied
   -------------------------------------------------- */

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 300px 300px;
}

/* --------------------------------------------------
   SELECTION
   -------------------------------------------------- */

::selection {
  background-color: var(--color-gold-500);
  color: var(--color-white);
}

/* --------------------------------------------------
   SCROLLBAR — webkit
   -------------------------------------------------- */

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

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

::-webkit-scrollbar-thumb {
  background: rgba(13, 27, 42, 0.20);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(13, 27, 42, 0.34);
}

/* --------------------------------------------------
   LAYOUT HELPERS
   -------------------------------------------------- */

/* Prevent body scroll when mobile nav is open */
body.nav-open {
  overflow: hidden;
}

/* Flex & grid shortcuts */
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col     { display: flex; flex-direction: column; }
.flex-wrap    { flex-wrap: wrap; }

/* Gap utilities */
.gap-2  { gap: var(--space-2); }
.gap-3  { gap: var(--space-3); }
.gap-4  { gap: var(--space-4); }
.gap-6  { gap: var(--space-6); }
.gap-8  { gap: var(--space-8); }

/* Margin utilities */
.mt-auto { margin-top: auto; }
.mb-4    { margin-bottom: var(--space-4); }
.mb-6    { margin-bottom: var(--space-6); }
.mb-8    { margin-bottom: var(--space-8); }
.mt-6    { margin-top: var(--space-6); }
.mt-8    { margin-top: var(--space-8); }

/* Display utilities */
.hidden { display: none !important; }

@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
}

@media (min-width: 769px) {
  .hide-desktop { display: none !important; }
}
