/* 
  thewhiteheads.au Design System 
  Fonts: Playfair Display (Serif), Inter (Sans-serif) 
*/

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

:root {
  --color-primary: #2c3e50;
  /* Dark slate */
  --color-secondary: #e8dccb;
  /* Champagne */
  --color-accent: #d4af37;
  /* Gold */
  --color-bg: #faf9f6;
  /* Off-white */
  --color-surface: #ffffff;
  --color-text: #333333;
  --color-text-light: #666666;

  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Inter', sans-serif;

  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.1);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-pill: 50px;
}

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

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 2001;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: var(--color-surface);
  box-shadow: var(--shadow-hover);
}

.skip-link:focus {
  top: 1rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition-smooth);
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(212, 175, 55, 0.45);
  outline-offset: 2px;
}

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

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 6rem 0;
}

.page-hero {
  padding: 5rem 0 3rem;
  text-align: center;
  background:
    radial-gradient(circle at top, rgba(232, 220, 203, 0.45), transparent 50%),
    linear-gradient(180deg, rgba(250, 249, 246, 0.5), rgba(232, 220, 203, 0.25));
}

.page-hero h1 {
  font-size: clamp(2.8rem, 5vw, 4rem);
  margin-bottom: 0.75rem;
}

.page-hero p {
  color: var(--color-text-light);
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* Header & Navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(250, 249, 246, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid rgba(44, 62, 80, 0.05);
  transition: var(--transition-smooth);
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.site-branding-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.site-mark {
  display: block;
  height: 40px;
  width: auto;
  max-width: 100%;
  max-height: 100%;
  flex-shrink: 0;
  object-fit: contain;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.site-logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.welcome-msg {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--color-text-light);
  font-family: var(--font-sans);
  margin-top: 0.15rem;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.site-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-light);
  position: relative;
}

.site-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-accent);
  transition: var(--transition-smooth);
}

.site-nav a:hover,
.site-nav a.active,
.site-nav a[aria-current="page"] {
  color: var(--color-primary);
}

.site-nav a:hover::after,
.site-nav a.active::after,
.site-nav a[aria-current="page"]::after {
  width: 100%;
}

/* Main Content Area */
main {
  margin-top: 80px;
  /* Offset for fixed header */
  min-height: calc(100vh - 80px - 100px);
  /* viewport - header - footer */
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.95rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
  outline: none;
  line-height: 1.2;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-surface) !important;
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
  background-color: var(--color-accent);
  color: var(--color-surface);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}

.btn-secondary:hover {
  background-color: var(--color-primary);
  color: var(--color-surface);
}

.btn-secondary:focus-visible,
.btn-primary:focus-visible {
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2), var(--shadow-hover);
}

/* Footer */
.site-footer {
  background-color: var(--color-primary);
  color: var(--color-surface);
  padding: 1.5rem 0;
  text-align: center;
}

.site-footer p {
  opacity: 0.7;
  font-size: 0.9rem;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@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;
  }
}

.animate-fade-in {
  animation: fadeIn 0.8s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
  opacity: 0;
  /* Starting state for animation */
}

.delay-1 {
  animation-delay: 0.1s;
}

.delay-2 {
  animation-delay: 0.2s;
}

.delay-3 {
  animation-delay: 0.3s;
}

/* -----------------------------
 * MOBILE RESPONSIVENESS
 * ----------------------------- */

/* Hamburger Toggle Button */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 2000;
  position: relative;
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-primary);
  position: relative;
  transition: all 0.3s ease-in-out;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background-color: var(--color-primary);
  transition: all 0.3s ease-in-out;
}

.hamburger::before {
  top: -8px;
}

.hamburger::after {
  bottom: -8px;
}

/* Hamburger active state */
.mobile-menu-open .hamburger {
  background-color: transparent;
}
.mobile-menu-open .hamburger::before {
  transform: translateY(8px) rotate(45deg);
}
.mobile-menu-open .hamburger::after {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 768px) {
  /* Layout adjustments */
  .container {
    padding: 0 1.5rem;
  }
  
  .section {
    padding: 4rem 0;
  }

  .page-hero {
    padding: 3.5rem 0 2.5rem;
  }
  
  /* Header adjustments */
  .header-inner {
    height: 70px;
  }
  
  main {
    margin-top: 70px;
  }

  .site-logo {
    font-size: 1.25rem;
  }

  .site-branding {
    gap: 0.75rem;
    flex: 1 1 auto;
  }

  .site-mark {
    height: 32px;
  }

  .welcome-msg {
    display: none; /* Hide on small screens to save space */
  }

  /* Hide Desktop Nav */
  .desktop-nav {
    display: none !important;
  }
  
  /* Show Mobile Toggle */
  .mobile-menu-toggle {
    display: block;
  }

  /* Mobile Nav Panel Styling */
  .site-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(250, 249, 246, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 1500;
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  }

  /* When JS adds .mobile-menu-open to body */
  body.mobile-menu-open {
    overflow: hidden; /* Prevent scrolling when menu is open */
  }
  body.mobile-menu-open .site-nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .site-nav ul {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }
  
  .site-nav a {
    font-size: 1.5rem;
    font-family: var(--font-serif);
  }
  
  /* Typography adjustments */
  h1 { font-size: 2.5rem !important; }
  h2 { font-size: 2rem !important; }
  
  /* Component adjustments */
  .gallery-grid, .projects-grid {
    grid-template-columns: 1fr !important;
  }
  
  .calendar-container {
    padding: 1rem !important;
  }
  
  .fc .fc-toolbar {
    flex-direction: column;
    gap: 1rem;
  }
}
