/* ============================================================
   GLOBAL — Base Elements, Components & Utilities
   Hanalei Day Spa

   Consumes tokens from variables.css. This is the standardized
   foundation every page and module inherits: headings, body
   text, links, lists, buttons, forms, structural containers,
   and the WordPress core classes the blog/text pages need.

   Responsive philosophy: body copy stays at readable fixed
   sizes; only large display headings step down at breakpoints.
   Layout changes (column counts, stacking) live with their
   components, not here.
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--charcoal);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* --------------------------------------------------------
   TYPOGRAPHY — Headings
   Display face, light weight, tight leading. These defaults
   apply site-wide; modules may add a .disp modifier for the
   oversized editorial treatment.
   -------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-regular);
  line-height: var(--lh-heading);
  color: var(--charcoal);
  text-wrap: balance; /* progressive enhancement; ignored where unsupported */
}

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

h2 {
  font-size: var(--fs-h2);
  font-weight: var(--fw-light);
  line-height: var(--lh-tight);
}

h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

h5 {
  font-size: var(--fs-h5);
  font-family: var(--font-utility);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
}

h6 {
  font-size: var(--fs-h6);
  font-family: var(--font-utility);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
}

/* Italic emphasis inside display headings uses the plum accent —
   the signature touch from the approved design. */
h1 em, h2 em, h3 em,
.disp em {
  font-style: italic;
  color: var(--plum);
}

/* The oversized section-heading treatment. */
.disp {
  font-family: var(--font-display);
  font-size: var(--fs-display);
  font-weight: var(--fw-light);
  line-height: var(--lh-tight);
  color: var(--charcoal);
  margin-bottom: var(--space-md);
}

/* --------------------------------------------------------
   TYPOGRAPHY — Body
   -------------------------------------------------------- */
p {
  margin-bottom: var(--space-sm);
  line-height: var(--lh-body);
  color: var(--mid);
}

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

.lead,
p.lead {
  font-size: var(--fs-body-lg);
  line-height: 1.85;
}

strong, b { font-weight: var(--fw-medium); color: var(--charcoal); }
em, i { font-style: italic; }

small { font-size: var(--fs-meta); }

/* --------------------------------------------------------
   LINKS
   -------------------------------------------------------- */
a {
  color: var(--plum);
  text-decoration: none;
  transition: color var(--transition-fast) ease;
}

a:hover { color: var(--plum-dark); }

/* Body-copy links stay legible with a subtle underline. */
.entry-content a,
.rich-text a {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--rule-sage);
}

.entry-content a:hover,
.rich-text a:hover { text-decoration-color: var(--plum); }

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

/* Lists inside rich text get real markers back. */
.entry-content ul,
.rich-text ul {
  list-style: disc;
  padding-left: 1.25em;
  margin-bottom: var(--space-sm);
}
.entry-content ol,
.rich-text ol {
  list-style: decimal;
  padding-left: 1.25em;
  margin-bottom: var(--space-sm);
}
.entry-content li,
.rich-text li {
  margin-bottom: var(--space-2xs);
  line-height: var(--lh-body);
  color: var(--mid);
}
.entry-content li::marker,
.rich-text li::marker { color: var(--sage-dark); }

/* --------------------------------------------------------
   BLOCKQUOTE
   The approved pull-quote treatment: display italic with a
   sage left rule.
   -------------------------------------------------------- */
blockquote {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: var(--fw-regular);
  font-style: italic;
  line-height: var(--lh-snug);
  color: var(--charcoal);
  border-left: 2px solid var(--sage);
  padding-left: var(--space-md);
  margin: var(--space-md) 0;
}

blockquote cite {
  display: block;
  margin-top: var(--space-xs);
  font-family: var(--font-utility);
  font-size: var(--fs-meta);
  font-style: normal;
  letter-spacing: 0.05em;
  color: var(--light);
}

/* --------------------------------------------------------
   RULES & MISC
   -------------------------------------------------------- */
hr {
  border: 0;
  height: 1px;
  background: var(--rule);
  margin: var(--space-lg) 0;
}

/* The short decorative divider used between content groups. */
.divider {
  width: 44px;
  height: 1px;
  background: var(--sage);
  margin: var(--space-md) 0;
  border: 0;
}

code, pre, kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}
pre {
  background: var(--plum-lighter);
  padding: var(--space-md);
  border-radius: var(--radius);
  overflow-x: auto;
  margin-bottom: var(--space-sm);
}

/* --------------------------------------------------------
   UTILITY — Eyebrow label
   Used above headings throughout the site.
   -------------------------------------------------------- */
.eyebrow {
  font-family: var(--font-utility);
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--sage-dark);
  margin-bottom: var(--space-sm);
}

/* Caption for images. */
.img-caption {
  font-family: var(--font-utility);
  font-size: var(--fs-caption);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--light);
  margin-top: var(--space-xs);
}

/* --------------------------------------------------------
   BUTTONS
   One base class, several variants. Reused everywhere so CTAs
   are consistent. All share the gentle lift-on-hover motion.
   -------------------------------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--font-utility);
  font-size: var(--fs-label);
  font-weight: var(--fw-medium);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  padding: 13px 28px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition) ease,
              color var(--transition) ease,
              border-color var(--transition) ease,
              transform var(--transition-fast) ease,
              box-shadow var(--transition) ease;
}

/* Primary — solid plum (the workhorse CTA). */
.btn-primary {
  background: var(--plum);
  color: var(--white);
  border-color: var(--plum);
}
.btn-primary:hover {
  background: var(--plum-dark);
  border-color: var(--plum-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-plum);
}

/* On-light, sage-fill hover (used on dark hero where base is white). */
.btn-light {
  background: var(--white);
  color: var(--plum);
}
.btn-light:hover {
  background: var(--sage);
  color: var(--charcoal);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sage);
}

/* Outline on dark backgrounds. */
.btn-outline-light {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.45);
}
.btn-outline-light:hover {
  border-color: var(--sage);
  background: rgba(195, 211, 185, 0.10);
  color: var(--white);
  transform: translateY(-2px);
}

/* Outline on light backgrounds, sage accent. */
.btn-outline {
  background: transparent;
  color: var(--plum);
  border-color: var(--plum);
}
.btn-outline:hover {
  background: var(--plum);
  color: var(--white);
  transform: translateY(-1px);
}

/* Sage outline — used in the dark footer for a secondary CTA. */
.btn-outline-sage {
  background: transparent;
  color: var(--sage);
  border-color: var(--sage);
  padding: 11px 24px;
}
.btn-outline-sage:hover {
  background: var(--sage);
  color: var(--charcoal);
  transform: translateY(-1px);
}

/* Size modifiers. */
.btn-sm { padding: 9px 18px; font-size: var(--fs-eyebrow); }
.btn-lg { padding: 15px 36px; }
.btn-block { display: block; width: 100%; }

/* --------------------------------------------------------
   LINK ARROW
   The animated "Explore →" inline link from the design.
   -------------------------------------------------------- */
.link-arr {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-utility);
  font-size: var(--fs-label);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--plum);
  transition: color var(--transition-fast) ease,
              gap var(--transition) var(--ease);
}
.link-arr::after {
  content: '→';
  transition: transform var(--transition) var(--ease);
}
.link-arr:hover { color: var(--plum-dark); gap: 10px; }
.link-arr:hover::after { transform: translateX(3px); }

/* --------------------------------------------------------
   FORMS
   Baseline styling for search, comments, and any plugin forms
   (contact, newsletter) so they inherit the brand without
   per-plugin CSS.
   -------------------------------------------------------- */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="search"],
input[type="number"],
input[type="password"],
input[type="date"],
textarea,
select {
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  color: var(--charcoal);
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color var(--transition-fast) ease,
              box-shadow var(--transition-fast) ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--plum);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

textarea { min-height: 140px; resize: vertical; }

label {
  display: inline-block;
  font-family: var(--font-utility);
  font-size: var(--fs-meta);
  font-weight: var(--fw-medium);
  color: var(--charcoal);
  margin-bottom: var(--space-2xs);
}

::placeholder { color: var(--light); opacity: 1; }

/* --------------------------------------------------------
   ACCESSIBILITY
   -------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: var(--z-overlay);
  background: var(--charcoal);
  color: var(--white);
  padding: 12px 20px;
  font-family: var(--font-utility);
  font-size: var(--fs-label);
}
.skip-link:focus { left: var(--space-sm); top: var(--space-sm); color: var(--white); }

/* --------------------------------------------------------
   STRUCTURAL CONTAINERS
   The layout primitives every module/page uses.
   -------------------------------------------------------- */
.sec {
  padding: var(--section-y) var(--gutter);
}
.sec-sand { background: var(--sand); }
.sec-sage-light { background: var(--sage-light); }
.sec-plum-light { background: var(--plum-lighter); }
.sec-dark { background: var(--charcoal); color: var(--white); }

.wrap { max-width: var(--max-content); margin-inline: auto; }
.wrap-wide { max-width: var(--max-wide); margin-inline: auto; }
.wrap-narrow { max-width: var(--max-narrow); margin-inline: auto; }
.wrap-reading { max-width: var(--max-reading); margin-inline: auto; }

/* Two-column split used by image+text and explore/founder layouts. */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: start;
}

/* Generic image placeholder box (real images drop in over it). */
.img-box {
  border-radius: var(--radius);
  background: rgba(44, 40, 38, 0.07);
  overflow: hidden;
}

/* --------------------------------------------------------
   SCROLL REVEAL
   Base states for the IntersectionObserver in reveal.js.
   reduced-motion users see content immediately.
   -------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--transition-slow) var(--ease),
              transform var(--transition-slow) var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }

.reveal-fade { opacity: 0; transition: opacity 1.1s ease; }
.reveal-fade.visible { opacity: 1; }

.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.24s; }
.reveal-delay-3 { transition-delay: 0.36s; }
.reveal-delay-4 { transition-delay: 0.48s; }
.reveal-delay-5 { transition-delay: 0.60s; }
.reveal-delay-6 { transition-delay: 0.72s; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal,
  .reveal-fade { opacity: 1; transform: none; }
}

/* --------------------------------------------------------
   WORDPRESS CORE CLASSES
   Needed by the standard text pages, blog posts, and any
   inserted media/captions/galleries.
   -------------------------------------------------------- */
.alignleft {
  float: left;
  margin: 0 var(--space-md) var(--space-sm) 0;
}
.alignright {
  float: right;
  margin: 0 0 var(--space-sm) var(--space-md);
}
.aligncenter {
  display: block;
  margin-inline: auto;
  margin-bottom: var(--space-sm);
}
.alignwide { /* handled within constrained content; kept for parity */ }

figure { margin-bottom: var(--space-sm); }

.wp-caption,
figure.wp-caption { max-width: 100%; }

.wp-caption-text,
figcaption {
  font-family: var(--font-utility);
  font-size: var(--fs-meta);
  color: var(--light);
  text-align: center;
  margin-top: var(--space-xs);
}

.sticky,
.bypostauthor { /* hooks WP expects to exist */ }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}
.gallery-item img {
  width: 100%;
  border-radius: var(--radius);
}

/* Clearfix for floated media. */
.entry-content::after,
.rich-text::after {
  content: '';
  display: table;
  clear: both;
}

/* --------------------------------------------------------
   RESPONSIVE — Display heading step-downs only.
   Body copy stays fixed. Section rhythm and gutters tighten.
   Component layout changes (grids stacking) live in their own
   stylesheets so each breaks on its own terms.
   -------------------------------------------------------- */

/* Tablet */
@media (max-width: 900px) {
  :root {
    --section-y: 64px;
    --gutter: 28px;
  }
  .split { grid-template-columns: 1fr; gap: 40px; }

  :root { --fs-hero: 44px; --fs-display: 38px; }
}

/* Mobile */
@media (max-width: 600px) {
  :root {
    --section-y: 52px;
    --gutter: 20px;
  }
  :root {
    --fs-hero: 34px;
    --fs-display: 30px;
    --fs-h1: 30px;
    --fs-h2: 26px;
  }
  blockquote { font-size: var(--fs-h4); }
}

/* Small phones */
@media (max-width: 400px) {
  :root {
    --fs-hero: 28px;
    --fs-display: 26px;
  }
}
