/*
Theme Name: The Kaf
Theme URI: https://w3.infineur.com
Author: Infineur
Author URI: https://infineur.com
Description: Classic WordPress theme for The Kaf Dubai — beige editorial specialty-coffee brand. Fully editable via Carbon Fields (Theme Options + reorderable page sections + menu_item CPT). Parity port of the Next.js site.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: the-kaf
*/

/* ===================================================================
   THE KAF DUBAI — Design System (ported from Next.js globals.css)
   =================================================================== */

:root {
  /* Colors */
  --bg-primary: #FAF0E4;        /* Beige */
  --bg-secondary: #FFFFFF;      /* Clean white for cards */
  --bg-elevated: #FDFBF7;
  --bg-glass: rgba(250, 240, 228, 0.85);

  --text-primary: #000000;
  --text-secondary: #666057;    /* Warm grey */
  --text-tertiary: #8A8578;

  --accent-gold: #851627;       /* Burgundy */
  --accent-gold-light: #A31E32;
  --accent-gold-dim: #6B111F;

  --border: #E8DCCB;
  --border-light: #F0E6D8;

  /* Typography */
  --font-heading: 'Georgia', serif;
  --font-body: 'Calibri Light', 'Calibri', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --section-padding: clamp(4rem, 10vw, 8rem);
  --container-max: 1200px;
  --container-wide: 1400px;
  --container-padding: clamp(1.25rem, 4vw, 3rem);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --transition-fast: 200ms var(--ease-out);
  --transition-base: 400ms var(--ease-out);
  --transition-slow: 600ms var(--ease-out);

  /* Borders */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.15;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.75rem, 7vw, 5.5rem); }
h2 { font-size: clamp(2rem, 5vw, 3.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }

p {
  color: var(--text-secondary);
  font-size: clamp(0.9375rem, 1.2vw, 1.0625rem);
  line-height: 1.75;
  max-width: 65ch;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font-family: inherit; font-size: inherit; }

/* --- Utility classes --- */
.tk-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}
.tk-container-wide {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}
.tk-section {
  padding-top: var(--section-padding);
  padding-bottom: var(--section-padding);
}
.tk-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-gold);
}
.tk-page-wrapper { min-height: 100vh; }

::selection { background-color: var(--accent-gold); color: var(--bg-primary); }
:focus-visible { outline: 2px solid var(--accent-gold); outline-offset: 2px; }

/* --- Buttons (ported from Button.module.css) --- */
.tk-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2.25rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-base);
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: var(--bg-primary);
}
.tk-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--text-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
  z-index: 0;
}
.tk-btn:hover::before { transform: scaleX(1); }
.tk-btn span { position: relative; z-index: 1; }
.tk-btn:hover { color: var(--bg-primary); }

/* --- Section divider (ported from SectionDivider.module.css) --- */
.tk-divider-wrap { display: flex; justify-content: center; padding: 1rem 0; }
.tk-divider {
  width: 60px;
  height: 1px;
  background: var(--accent-gold);
  transform-origin: center;
}

@media (max-width: 768px) {
  :root { --section-padding: clamp(3rem, 8vw, 5rem); }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
