/* ==========================================================================
   THE REAL WORK (TRW) — DESIGN SYSTEM & TOKENS
   Founded by Myisha Jones, MSW, LCSW
   Ethos: "Do the work. Change everything."
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..800;1,400..800&family=Plus+Jakarta+Sans:ital,wght@0,300..800;1,300..800&display=swap');

:root {
  /* Brand Palette (Derived from Logo) */
  --color-sun-core: #C85A27;        /* Burnt Terracotta / Warm Rust */
  --color-sun-core-hover: #b14d1e;
  --color-sun-arch: #E5A93C;        /* Golden Amber / Warm Ochre */
  --color-sun-arch-soft: rgba(229, 169, 60, 0.15);
  --color-canvas: #FDFBF7;          /* Warm Cream / Soothing Off-White */
  --color-sand: #F5F0EB;            /* Soft Sand / Card Fill */
  --color-sand-deep: #ECE5DC;       /* Slightly deeper sand for nested cores */
  --color-charcoal: #1C1C1C;        /* Deep Charcoal for WCAG AAA text */
  --color-charcoal-muted: #5C564F;  /* Warm Slate for subtext */
  --color-charcoal-faint: #8E867C;  /* Muted metadata */
  --color-white: #FFFFFF;
  --color-border-subtle: rgba(28, 28, 28, 0.08);
  --color-border-warm: rgba(200, 90, 39, 0.18);
  --color-border-amber: rgba(229, 169, 60, 0.28);

  /* Typography */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Elevation & Shadows (Tinted to background, no harsh black) */
  --shadow-sm: 0 2px 8px rgba(120, 80, 50, 0.04);
  --shadow-md: 0 10px 30px -10px rgba(100, 60, 30, 0.08), 0 4px 12px -2px rgba(100, 60, 30, 0.03);
  --shadow-lg: 0 20px 40px -15px rgba(100, 60, 30, 0.12), 0 8px 16px -4px rgba(100, 60, 30, 0.04);
  --shadow-inner-highlight: inset 0 1px 1px rgba(255, 255, 255, 0.8), inset 0 -1px 1px rgba(200, 90, 39, 0.05);

  /* Radii (Soft Squircle Scales) */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Spacing Scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 8rem;

  /* Layout Container */
  --max-width: 1280px;
  --max-width-narrow: 860px;
  --nav-height: 74px;

  /* Fluid Transitions */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: all 0.35s var(--ease-spring);
  --transition-fast: all 0.2s ease;
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--color-canvas);
  color: var(--color-charcoal);
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

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

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

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

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1.5rem;
  background: var(--color-sun-core);
  color: var(--color-white);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-full);
  z-index: 9999;
  font-weight: 600;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 1.5rem;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4, .font-serif {
  font-family: var(--font-serif);
  color: var(--color-charcoal);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.35rem, 5vw, 3.85rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  line-height: 1.2;
}

h3 {
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  line-height: 1.3;
}

h4 {
  font-size: 1.2rem;
  line-height: 1.4;
}

p {
  font-size: 1.05rem;
  color: var(--color-charcoal-muted);
  line-height: 1.75;
}

.text-lead {
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  line-height: 1.6;
  color: var(--color-charcoal);
}

.text-sm {
  font-size: 0.9rem;
  line-height: 1.5;
}

.text-xs {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.text-accent {
  color: var(--color-sun-core);
}

.text-amber {
  color: var(--color-sun-arch);
}

/* Eyebrow badge */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.95rem;
  background: var(--color-sun-arch-soft);
  color: var(--color-sun-core);
  border: 1px solid var(--color-border-amber);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-sun-core);
  display: inline-block;
}

/* ==========================================================================
   LAYOUT CONTAINERS & GRIDS
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1.25rem, 4vw, 2.5rem);
  padding-right: clamp(1.25rem, 4vw, 2.5rem);
}

.container-narrow {
  max-width: var(--max-width-narrow);
}

.section {
  padding-top: clamp(4rem, 7vw, 6.5rem);
  padding-bottom: clamp(4rem, 7vw, 6.5rem);
  position: relative;
}

.section-hero {
  padding-top: clamp(3rem, 5vw, 5rem);
  padding-bottom: clamp(4rem, 6vw, 6rem);
}

.section-cream {
  background-color: var(--color-canvas);
}

.section-sand {
  background-color: var(--color-sand);
}

/* Flex & Grid Utilities */
.grid {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.25rem);
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-bento-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}

/* ==========================================================================
   DOUBLE-BEZEL TACTILE CARD ARCHITECTURE (Doppelrand)
   Machined, tactile elegance: Outer Sand Shell + Inner Highlight Core
   ========================================================================== */
.bezel-card {
  background: var(--color-sand);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  padding: 0.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  position: relative;
}

.bezel-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-border-warm);
}

.bezel-core {
  background: var(--color-white);
  border-radius: calc(var(--radius-xl) - 0.35rem);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: var(--shadow-inner-highlight);
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Soft Sand flat card */
.sand-card {
  background: var(--color-sand);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  transition: var(--transition-smooth);
}

.sand-card:hover {
  border-color: var(--color-border-warm);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   BUTTON ARCHITECTURE (Nested Island & Pill Patterns)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.85rem 1.65rem;
  border-radius: var(--radius-full);
  transition: var(--transition-smooth);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--color-sun-core);
  color: var(--color-white);
  box-shadow: 0 4px 14px rgba(200, 90, 39, 0.28);
}

.btn-primary:hover {
  background: var(--color-sun-core-hover);
  box-shadow: 0 6px 18px rgba(200, 90, 39, 0.36);
  color: var(--color-white);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--color-sand);
  color: var(--color-charcoal);
  border: 1px solid var(--color-border-warm);
}

.btn-secondary:hover {
  background: var(--color-white);
  border-color: var(--color-sun-core);
  color: var(--color-sun-core);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--color-charcoal);
  border: 1px solid rgba(28, 28, 28, 0.2);
}

.btn-outline:hover {
  border-color: var(--color-sun-core);
  color: var(--color-sun-core);
  background: rgba(200, 90, 39, 0.04);
}

/* Button-in-button nested trailing icon */
.btn-icon-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: transform 0.25s var(--ease-spring);
}

.btn-primary:hover .btn-icon-circle {
  transform: translateX(3px) rotate(4deg);
  background: rgba(255, 255, 255, 0.3);
}

.btn-secondary .btn-icon-circle {
  background: rgba(200, 90, 39, 0.1);
  color: var(--color-sun-core);
}

.btn-secondary:hover .btn-icon-circle {
  transform: translateX(3px);
  background: var(--color-sun-core);
  color: var(--color-white);
}

/* ==========================================================================
   IMAGE FRAMES & PHOTO CONTAINERS
   ========================================================================== */
.framed-photo {
  position: relative;
  background: var(--color-sand);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  padding: 0.65rem;
  box-shadow: var(--shadow-md);
}

.framed-photo-inner {
  border-radius: calc(var(--radius-xl) - 0.45rem);
  overflow: hidden;
  position: relative;
  background: var(--color-sand-deep);
}

.framed-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-spring);
}

.framed-photo:hover img {
  transform: scale(1.02);
}

/* Warm badge on image */
.photo-floating-badge {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  background: rgba(253, 251, 247, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--color-border-amber);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  max-width: 85%;
}

/* ==========================================================================
   ANIMATIONS & REDUCED MOTION
   ========================================================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-entry {
  animation: fadeInUp 0.75s var(--ease-spring) forwards;
}

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