/* ============================================================
   style.css — UNIVERSAL STYLESHEET
   Explore Punta Cana | COM4014 Web Authoring
   WCAG 2.1 AA compliant | All font sizes in relative units
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=Nunito:wght@300;400;500;600&display=swap');

/* ---- CSS Custom Properties ---- */
:root {
  /* Brand colours */
  --ocean:        #003c78e4;
  --ocean-dark:   #004f72;
  --ocean-light:  #e0f2f9;
  --sand:         #f5e6c8;
  --sand-dark:    #e8d09a;
  --coral:        #e05c40;
  --coral-dark:   #c0442c;
  --coral-light:  #fdeae6;
  --palm:         #2e7d32;
  --palm-light:   #e8f5e9;
  --gold:         #c9a84c;
  --gold-light:   #fdf3d7;

  /* Neutrals */
  --ink:          #1a1a2e;
  --charcoal:     #3d3d52;
  --mid:          #6b6b80;
  --muted:        #9898a8;
  --border:       #dde0e8;
  --surface:      #f8f9fc;
  --white:        #ffffff;
  --paper:        #fdfaf5;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Nunito', 'Segoe UI', sans-serif;

  /* Relative font scale */
  --fs-xs:   0.75rem;
  --fs-sm:   0.875rem;
  --fs-base: 1rem;
  --fs-md:   1.125rem;
  --fs-lg:   1.35rem;
  --fs-xl:   1.75rem;
  --fs-2xl:  2.25rem;
  --fs-3xl:  3rem;
  --fs-hero: 4rem;

  /* Layout */
  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.08);
  --shadow:    0 4px 20px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.14);
  --transition: 0.25s ease;
  --max-width:  1200px;
}

/* ---- Font size modifier classes (applied to body by JS) ---- */
body.text-sm  { font-size: 87.5%;  }
body.text-lg  { font-size: 112.5%; }
body.text-xl  { font-size: 125%;   }

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
}

img { max-width: 100%; height: auto; display: block; }
a  { color: var(--ocean); }
ul, ol { list-style: none; }

/* ---- Skip link (WCAG 2.1 AA) ---- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--ocean);
  color: var(--white);
  padding: 0.6rem 1.2rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  z-index: 9999;
}
.skip-link:focus { top: 0.75rem; }

/* ---- Focus styles (WCAG 2.1 AA — 3px visible outline) ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ============================================================
   ACCESSIBILITY TOOLBAR
   ============================================================ */
.a11y-bar {
  background: var(--ink);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.4rem 2rem;
  font-size: var(--fs-xs);
}
.a11y-bar__label {
  color: var(--muted);
  margin-right: 0.25rem;
}
.a11y-btn {
  background: transparent;
  border: 1px solid #555;
  color: var(--white);
  padding: 0.2rem 0.65rem;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-sm);
  line-height: 1.4;
  transition: background var(--transition), border-color var(--transition);
}
.a11y-btn:hover { background: #333; border-color: #888; }
.a11y-btn:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }

/* ============================================================
   HEADER & NAVIGATION
   ============================================================ */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
}

/* Logo */
.site-logo {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 900;
  color: var(--ocean-dark);
  text-decoration: none;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.site-logo span { color: var(--coral); }

/* Nav */
.main-nav ul {
  display: flex;
  gap: 0.15rem;
  flex-wrap: wrap;
}
.main-nav a {
  display: block;
  padding: 0.45rem 0.75rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--charcoal);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--ocean);
  background: var(--ocean-light);
}
.main-nav a[aria-current="page"] {
  color: var(--coral);
  background: var(--coral-light);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: 1px solid var(--border);
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: var(--transition);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--ink);
  color: #ccc;
  padding: 4rem 2rem 2rem;
  margin-top: 6rem;
}
.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid #333;
}
.footer-brand .site-logo { font-size: var(--fs-md); color: var(--white); }
.footer-brand .site-logo span { color: var(--coral); }
.footer-brand p {
  margin-top: 0.75rem;
  font-size: var(--fs-sm);
  color: #888;
  line-height: 1.6;
  max-width: 280px;
}
/* Keeps the footer headings small and neat */
.footer-col h3 {
    font-size: 1.1rem;
    color: var(--white);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.footer-col h4 {
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  color: var(--gold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.footer-col a {
  display: block;
  font-size: var(--fs-sm);
  color: #888;
  text-decoration: none;
  margin-bottom: 0.6rem;
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  max-width: var(--max-width);
  margin: 2rem auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer-bottom p { font-size: var(--fs-xs); color: #666; }

/* ============================================================
   PAGE HERO BANNER (inner pages)
   ============================================================ */
.page-hero {
  background: linear-gradient(135deg, var(--ocean-dark) 0%, var(--ocean) 60%, #0097c4 100%);
  color: var(--white);
  padding: 5rem 2rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 120%, rgba(201,168,76,0.2) 0%, transparent 70%);
}
.page-hero-eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
  position: relative;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1rem;
  position: relative;
}
.page-hero p {
  font-size: var(--fs-md);
  color: rgba(255,255,255,0.82);
  max-width: 580px;
  margin: 0 auto;
  position: relative;
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}
.section        { padding: 5rem 0; }
.section--alt   { background: var(--surface); }
.section--sand  { background: var(--sand); }

.section-eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 0.75rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 900;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 1rem;
}
.section-subtitle {
  font-size: var(--fs-md);
  color: var(--mid);
  max-width: 560px;
  line-height: 1.65;
}
.section-header { margin-bottom: 3rem; }
.section-header--center { text-align: center; }
.section-header--center .section-subtitle { margin: 0 auto; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }

.card__img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  background: var(--sand);
}
.card__img-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--ocean-light), var(--sand));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
}
.card__body       { padding: 1.5rem; }
.card__eyebrow    { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--coral); margin-bottom: 0.5rem; display: block; }
.card__title      { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 700; color: var(--ink); margin-bottom: 0.5rem; line-height: 1.3; }
.card__text       { font-size: var(--fs-sm); color: var(--mid); line-height: 1.65; }
.card__footer     { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card__price      { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 700; color: var(--ocean); }
.card__price-note { font-size: var(--fs-xs); color: var(--muted); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 2rem;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  line-height: 1;
}
.btn--primary  { background: var(--coral); color: var(--white); border-color: var(--coral); }
.btn--primary:hover  { background: var(--coral-dark); border-color: var(--coral-dark); }
.btn--ocean    { background: var(--ocean); color: var(--white); border-color: var(--ocean); }
.btn--ocean:hover    { background: var(--ocean-dark); border-color: var(--ocean-dark); }
.btn--outline  { background: transparent; color: var(--ocean); border-color: var(--ocean); }
.btn--outline:hover  { background: var(--ocean); color: var(--white); }
.btn--outline-white { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.6); }
.btn--outline-white:hover { background: var(--white); color: var(--ocean-dark); }
.btn--gold     { background: var(--gold); color: var(--white); border-color: var(--gold); }
.btn--gold:hover     { background: #b08a30; }
.btn--sm       { padding: 0.5rem 1.25rem; font-size: var(--fs-xs); }
.btn--lg       { padding: 1rem 2.5rem; font-size: var(--fs-md); }

/* ============================================================
   BADGES / TAGS
   ============================================================ */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: var(--fs-xs);
  font-weight: 700;
  border-radius: 20px;
  letter-spacing: 0.05em;
}
.badge--coral  { background: var(--coral-light); color: var(--coral-dark); }
.badge--ocean  { background: var(--ocean-light); color: var(--ocean-dark); }
.badge--gold   { background: var(--gold-light);  color: #7a5c00; }
.badge--palm   { background: var(--palm-light);  color: var(--palm); }

/* ============================================================
   GRID HELPERS
   ============================================================ */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }

/* ============================================================
   HIGHLIGHT BAND
   ============================================================ */
.highlight-band {
  background: var(--ocean);
  color: var(--white);
  padding: 1.25rem 2rem;
  text-align: center;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.highlight-band a { color: var(--gold); }

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
  background: linear-gradient(135deg, var(--coral) 0%, #d44020 100%);
  color: var(--white);
  padding: 5rem 2rem;
  text-align: center;
}
.cta-section h2 {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 900;
  margin-bottom: 1rem;
}
.cta-section p  { font-size: var(--fs-md); opacity: 0.88; margin-bottom: 2.5rem; max-width: 520px; margin-left: auto; margin-right: auto; }
.cta-section .btn--white { background: var(--white); color: var(--coral-dark); border-color: var(--white); }
.cta-section .btn--white:hover { background: var(--sand); }

/* ============================================================
   INFO BOX / ALERT
   ============================================================ */
.info-box {
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.info-box--tip     { background: var(--gold-light);  border-left: 4px solid var(--gold); }
.info-box--warning { background: var(--coral-light); border-left: 4px solid var(--coral); }
.info-box--info    { background: var(--ocean-light); border-left: 4px solid var(--ocean); }
.info-box--success { background: var(--palm-light);  border-left: 4px solid var(--palm); }
.info-box__icon    { font-size: var(--fs-lg); flex-shrink: 0; }
.info-box__title   { font-size: var(--fs-sm); font-weight: 700; margin-bottom: 0.25rem; color: var(--ink); }
.info-box__text    { font-size: var(--fs-sm); color: var(--charcoal); line-height: 1.6; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root {
    --fs-hero: 2.6rem;
    --fs-3xl: 2rem;
    --fs-2xl: 1.6rem;
  }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .nav-toggle { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem 1.5rem;
    box-shadow: var(--shadow);
  }
  .main-nav.open  { display: block; }
  .main-nav ul    { flex-direction: column; gap: 0.15rem; }
  .main-nav a     { padding: 0.6rem 0.75rem; }
  .header-inner   { position: relative; }
  .section        { padding: 3rem 0; }
  .page-hero      { padding: 3rem 1.5rem 2.5rem; }
}

@media (max-width: 480px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid     { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom   { flex-direction: column; text-align: center; }
  .a11y-bar        { padding: 0.4rem 1rem; }
}
