/*
Theme Name: Harry Potter Townhouse Direct Booking
Theme URI: https://github.com/Bankrolled/harrypottertownhouse-site
Author: Bankrolled
Author URI: https://github.com/Bankrolled
Description: Custom WordPress theme for Harry Potter Townhouse direct booking site. Responsive, accessible design with burgundy, gold, and cream color scheme reflecting the heritage townhouse character.
Version: 0.1.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 8.0
License: MIT
License URI: https://opensource.org/licenses/MIT
Text Domain: hpt-direct-booking
Tags: custom, booking, townhouse, accessible, responsive

This theme is part of the Harry Potter Townhouse direct booking system.
It must be used with the HPT Hostaway Integration plugin.
*/

/* ==========================================================================
   Base Styles & CSS Reset
   ========================================================================== */

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

:root {
  /* Brand Colors - Heritage Townhouse Palette */
  --color-burgundy: #6d0f1f;
  --color-burgundy-dark: #4a0a15;
  --color-burgundy-light: #8b1326;
  --color-gold: #d4af37;
  --color-gold-dark: #b8941f;
  --color-gold-darker: #8a6a10; /* WCAG AA compliant for light backgrounds */
  --color-gold-light: #e5c76d;
  --color-cream: #f5f5dc;
  --color-cream-dark: #e8e8cf;
  
  /* Neutral Colors */
  --color-white: #ffffff;
  --color-off-white: #fafaf8;
  --color-gray-light: #e5e5e5;
  --color-gray: #757575;
  --color-gray-medium: #9b9b9b; /* WCAG AA compliant on dark backgrounds (4.52:1 on #333) */
  --color-gray-dark: #333333;
  --color-black: #1a1a1a;
  
  /* Semantic Colors */
  --color-error: #c41e3a;
  --color-success: #2d5016;
  --color-warning: #ff8c00;
  
  /* Typography */
  --font-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: Georgia, "Times New Roman", serif;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 250ms ease-in-out;
  
  /* Layout */
  --max-width: 1200px;
  --content-width: 800px;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-gray-dark);
  background-color: var(--color-off-white);
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-burgundy-dark);
  margin-bottom: var(--spacing-md);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

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

a {
  color: var(--color-burgundy);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover,
a:focus {
  color: var(--color-burgundy-light);
  text-decoration: underline;
}

a:focus {
  outline: 2px solid var(--color-gold-darker);
  outline-offset: 2px;
}

/* Focus visible for better keyboard navigation */
a:focus-visible {
  outline: 3px solid var(--color-gold-darker);
  outline-offset: 3px;
}

/* Ensure buttons also have proper focus styling */
button:focus,
.btn:focus {
  outline: 2px solid var(--color-gold-darker);
  outline-offset: 2px;
}

button:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--color-gold-darker);
  outline-offset: 3px;
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: var(--color-cream);
  border-radius: var(--radius-sm);
  clip: auto !important;
  color: var(--color-burgundy-dark);
  display: block;
  font-size: 1rem;
  font-weight: bold;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

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

.site-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.content-container {
  max-width: var(--content-width);
  margin: 0 auto;
}

/* ==========================================================================
   Responsive Media
   ========================================================================== */

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

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-block;
  padding: var(--spacing-sm) var(--spacing-lg);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.btn-primary {
  background-color: var(--color-burgundy);
  color: var(--color-white);
  border-color: var(--color-burgundy);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--color-burgundy-dark);
  border-color: var(--color-burgundy-dark);
  text-decoration: none;
}

.btn-secondary {
  background-color: var(--color-gold);
  color: var(--color-burgundy-dark);
  border-color: var(--color-gold);
}

.btn-secondary:hover,
.btn-secondary:focus {
  background-color: var(--color-gold-dark);
  border-color: var(--color-gold-dark);
  text-decoration: none;
}

/* ==========================================================================
   Responsive Utilities
   ========================================================================== */

@media (max-width: 768px) {
  :root {
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
