/* ========================================================================
   GraytonLux Base Styles
   A luxurious, cinematic, and sophisticated foundation stylesheet
   ======================================================================== */

/* ========================================================================
   1. CSS Variables (Design Tokens)
   ======================================================================== */
:root {
  /* Color Palette */
  --color-bg: #07090c; /* deep cinematic charcoal */
  --color-bg-alt: #0e131b; /* midnight blue/charcoal */
  --color-surface: #121623; /* elevated surface for cards */
  --color-surface-soft: #1b2233;

  --color-text: #f7f5f2; /* crisp near-white */
  --color-text-muted: #b0a8a0;
  --color-border-subtle: #262b38;

  --color-primary: #c49a3a; /* refined metallic gold */
  --color-primary-soft: rgba(196, 154, 58, 0.16);
  --color-primary-strong: #e0b955;

  --color-success: #3cbf8a;
  --color-warning: #f4b860;
  --color-danger: #e46a6a;

  --color-neutral-50: #f8f7f5;
  --color-neutral-100: #ece8e1;
  --color-neutral-200: #d3cdc2;
  --color-neutral-300: #b8b0a1;
  --color-neutral-400: #9a9181;
  --color-neutral-500: #7c7364;
  --color-neutral-600: #5e574a;
  --color-neutral-700: #403b32;
  --color-neutral-800: #25211b;
  --color-neutral-900: #14110d;

  /* Typography */
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Playfair Display", "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Scales (16px = 1rem) */
  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-md: 1rem;      /* 16px */
  --font-size-lg: 1.125rem;  /* 18px */
  --font-size-xl: 1.25rem;   /* 20px */
  --font-size-2xl: 1.5rem;   /* 24px */
  --font-size-3xl: 1.875rem; /* 30px */
  --font-size-4xl: 2.25rem;  /* 36px */
  --font-size-5xl: 3rem;     /* 48px */

  --line-height-tight: 1.2;
  --line-height-snug: 1.35;
  --line-height-normal: 1.6;
  --line-height-relaxed: 1.8;

  /* Spacing Scale (0 - 96px) */
  --space-0: 0;
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-8: 2rem;     /* 32px */
  --space-10: 2.5rem;  /* 40px */
  --space-12: 3rem;    /* 48px */
  --space-16: 4rem;    /* 64px */
  --space-20: 5rem;    /* 80px */
  --space-24: 6rem;    /* 96px */

  /* Radii */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-full: 999px;

  /* Shadows (cinematic, soft) */
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-medium: 0 18px 45px rgba(0, 0, 0, 0.5);
  --shadow-strong: 0 30px 80px rgba(0, 0, 0, 0.7);

  /* Transitions & Motion */
  --transition-fast: 120ms ease-out;
  --transition-normal: 200ms ease-out;
  --transition-slow: 320ms ease-out;

  /* Layout */
  --max-width-container: 1120px;
  --container-padding-x: 1.5rem;
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-fast: 0.01ms linear;
    --transition-normal: 0.01ms linear;
    --transition-slow: 0.01ms linear;
  }

  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========================================================================
   2. Reset / Normalize
   ======================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100vh;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: none;
  background: none;
  padding: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
figure {
  margin: 0;
}

/* Remove default link underlines (re-added with custom style later) */
a {
  text-decoration: none;
  color: inherit;
}

/* ========================================================================
   3. Base Typography & Elements
   ======================================================================== */
body {
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
  background: radial-gradient(circle at top, #151b27 0, #07090c 50%, #030207 100%);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: var(--line-height-tight);
  color: var(--color-text);
  letter-spacing: 0.02em;
}

h1 { font-size: var(--font-size-5xl); margin-bottom: var(--space-4); }
h2 { font-size: var(--font-size-4xl); margin-bottom: var(--space-4); }
h3 { font-size: var(--font-size-3xl); margin-bottom: var(--space-3); }
h4 { font-size: var(--font-size-2xl); margin-bottom: var(--space-3); }
h5 { font-size: var(--font-size-xl); margin-bottom: var(--space-2); }
h6 { font-size: var(--font-size-lg); margin-bottom: var(--space-2); }

p {
  margin-bottom: var(--space-4);
  color: var(--color-text-muted);
}

strong {
  font-weight: 600;
  color: var(--color-text);
}

small {
  font-size: var(--font-size-sm);
}

code,
pre {
  font-family: var(--font-mono);
}

/* Links - subtle cinematic glow */
a {
  position: relative;
  color: var(--color-primary);
  transition: color var(--transition-normal), opacity var(--transition-fast);
}

a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.15em;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
  opacity: 0.5;
  transform-origin: center;
  transform: scaleX(0);
  transition: transform var(--transition-normal), opacity var(--transition-normal);
}

a:hover {
  color: var(--color-primary-strong);
}

a:hover::after {
  opacity: 0.9;
  transform: scaleX(1);
}

/* Horizontal rule */
hr {
  border: none;
  border-top: 1px solid var(--color-border-subtle);
  margin: var(--space-8) 0;
}

/* Lists */
ul,
ol {
  padding-left: 1.25rem;
  margin-bottom: var(--space-4);
}

/* ========================================================================
   4. Accessibility & Focus Styles
   ======================================================================== */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sr-only-focusable:focus,
.sr-only-focusable:active {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* ========================================================================
   5. Layout Utilities
   ======================================================================== */
.container {
  width: 100%;
  max-width: var(--max-width-container);
  margin-inline: auto;
  padding-inline: var(--container-padding-x);
}

.section {
  padding-block: var(--space-16);
}

.section--tight {
  padding-block: var(--space-10);
}

/* Flex helpers */
.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-column {
  display: flex;
  flex-direction: column;
}

.gap-xs { gap: var(--space-1); }
.gap-sm { gap: var(--space-2); }
.gap-md { gap: var(--space-4); }
.gap-lg { gap: var(--space-6); }
.gap-xl { gap: var(--space-8); }

/* Grid helpers */
.grid {
  display: grid;
  gap: var(--space-6);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
}

@media (max-width: 900px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.text-center { text-align: center; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-md { margin-top: var(--space-4); }
.mb-md { margin-bottom: var(--space-4); }

/* ========================================================================
   6. Components
   ======================================================================== */

/* 6.1 Buttons */
.button,
button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
  --btn-bg: var(--color-primary);
  --btn-bg-hover: var(--color-primary-strong);
  --btn-color: #0b0b0c;
  --btn-radius: var(--radius-full);
  --btn-padding-y: 0.7rem;
  --btn-padding-x: 1.75rem;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: var(--btn-padding-y) var(--btn-padding-x);
  border-radius: var(--btn-radius);
  background: radial-gradient(circle at 10% 0, #f8e7b3 0, var(--btn-bg) 40%, #7c5a1c 100%);
  color: var(--btn-color)!important;
  font-weight: 500;
  font-size: var(--font-size-sm);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid rgba(0, 0, 0, 0.6);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  transition: transform var(--transition-fast),
              box-shadow var(--transition-fast),
              filter var(--transition-fast),
              background var(--transition-slow);
}

.button--ghost {
  --btn-bg: transparent;
  --btn-bg-hover: transparent;
  background: linear-gradient(120deg, rgba(196, 154, 58, 0.08), rgba(196, 154, 58, 0.02));
  color: var(--color-text)!important;
  border-color: rgba(196, 154, 58, 0.7);
  box-shadow: 0 0 0 1px rgba(196, 154, 58, 0.2);
}

.button--outline {
  --btn-bg: transparent;
  --btn-bg-hover: rgba(196, 154, 58, 0.05);
  background: transparent;
  color: var(--color-primary)!important;
  border-color: rgba(196, 154, 58, 0.8);
  box-shadow: none;
}

.button:hover,
button:hover,
input[type="button"]:hover,
input[type="submit"]:hover,
input[type="reset"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.75);
  filter: brightness(1.03);
}

.button:active,
button:active,
input[type="button"]:active,
input[type="submit"]:active,
input[type="reset"]:active {
  transform: translateY(0);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
}

.button[disabled],
button[disabled],
input[type="button"][disabled],
input[type="submit"][disabled],
input[type="reset"][disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

/* 6.2 Form Inputs */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="search"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-subtle);
  background: rgba(7, 9, 12, 0.9);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: 1.4;
  transition: border-color var(--transition-fast),
              box-shadow var(--transition-fast),
              background-color var(--transition-fast);
}

input::placeholder,
textarea::placeholder {
  color: rgba(176, 168, 160, 0.7);
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(196, 154, 58, 0.5), 0 18px 45px rgba(0, 0, 0, 0.8);
  background: #050609;
}

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

/* 6.3 Card Component - for hotel profiles & content blocks */
.card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  background:
    radial-gradient(circle at top left, rgba(196, 154, 58, 0.1), transparent 55%),
    radial-gradient(circle at bottom right, rgba(17, 24, 39, 0.9), #07090c);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 55%);
  opacity: 0.6;
  pointer-events: none;
}

.card__inner {
  position: relative;
  z-index: 1;
}

.card--elevated {
  box-shadow: var(--shadow-medium);
}

.card--muted {
  background: linear-gradient(145deg, #0b0f17, #111827);
}

/* 6.4 Cinematic Image Wrapper */
.media-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #050609;
}

.media-frame img,
.media-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 900ms ease-out, filter 900ms ease-out;
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent 40%);
  mix-blend-mode: multiply;
  pointer-events: none;
}

.media-frame:hover img,
.media-frame:hover video {
  transform: scale(1.06);
  filter: saturate(1.1);
}

/* 6.5 Badge / Tag (e.g., country, region) */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(7, 9, 12, 0.9);
  border: 1px solid rgba(196, 154, 58, 0.7);
  color: var(--color-primary);
}

.badge--soft {
  background: rgba(196, 154, 58, 0.12);
  border-color: transparent;
}

/* 6.6 Subtle top accent line for GraytonLux brand sections */
.section-accent {
  position: relative;
  padding-top: calc(var(--space-8) + 4px);
}

.section-accent::before {
  content: "";
  position: absolute;
  top: var(--space-4);
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
  opacity: 0.7;
}

/* ========================================================================
   7. Utility: Cinematic Overlay & Backdrop
   ======================================================================== */

.backdrop-blur {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: linear-gradient(135deg, rgba(7, 9, 12, 0.86), rgba(7, 9, 12, 0.75));
}

.overlay-dark {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.9));
}

/* ========================================================================
   End of GraytonLux Base
   ======================================================================== */
