/* 
  Theme: Terracotta Skin Science 
  Palette: Cream #faf6ef, Terracotta #c2410c, Emerald #10b981, Dark Brown #2b211a
*/

:root {
  --bg-cream: #faf6ef;
  --accent-terracotta: #c2410c;
  --accent-emerald: #10b981;
  --text-dark: #2b211a;
  
  --bg-surface-translucent: rgba(194, 65, 12, 0.08); /* Terracotta tint */
  --bg-surface-emerald-translucent: rgba(16, 185, 129, 0.08);
  
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", sans-serif;
  --font-heading: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --glass-backdrop: blur(12px);
}

/* Resets & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  lang: en;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-cream);
  color: var(--text-dark);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-wrap: anywhere;
  hyphens: auto;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4, h5, h6, .heading-font {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1rem;
}

h1 { font-size: clamp(3rem, 8vw, 6rem); }
h2 { font-size: clamp(2rem, 5vw, 3.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }

p {
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
  max-width: 72ch;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 0; /* Strict 0px radius for images */
}

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

/* Header & Navigation */
.header-wrapper {
  padding: 1.5rem;
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 100;
}

.site-header {
  background: rgba(250, 246, 239, 0.85);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border-radius: 999px; /* Floating box with rounded ends */
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 24px -6px rgba(43, 33, 26, 0.1);
}

.brand-logo {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: bold;
  font-size: 1.25rem;
  color: var(--text-dark);
}

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

.nav-links a {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  letter-spacing: 0.05em;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-dark);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  background-color: var(--accent-terracotta);
  color: #fff;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: none;
  border-radius: 999px; /* Pill shape */
  cursor: pointer;
  transition: transform 0.4s var(--ease-kinetic), background-color 0.3s ease;
}

.btn:hover {
  background-color: var(--accent-emerald);
  color: #fff;
  transform: translateY(-3px) scale(1.02);
}

/* Hero Section */
.hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--bg-cream) 0%, rgba(194, 65, 12, 0.15) 100%);
  padding-top: 8rem;
  padding-bottom: 4rem;
}

.hero .container {
  text-align: center;
}

.hero p.subtitle {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  color: var(--accent-terracotta);
  margin: 0 auto 2rem;
  font-weight: 500;
}

/* Split Sections Layout */
.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 70vh;
  position: relative;
}

.split-section.reverse {
  grid-template-columns: 1fr 1fr;
  direction: rtl; /* Easy way to reverse DOM visually without complex flex orders */
}

.split-section.reverse > * {
  direction: ltr; /* Reset content direction */
}

.split-content {
  padding: 6rem 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.split-image-container {
  position: relative;
  height: 100%;
  min-height: 400px;
}

.split-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0; left: 0;
}

/* Background Clip Paths */
.bg-clip-diagonal {
  background-color: var(--bg-surface-translucent);
  clip-path: polygon(0 5%, 100% 0, 100% 95%, 0 100%);
  padding: 6rem 0;
  margin: -3rem 0;
  z-index: 1;
  position: relative;
}

.bg-clip-emerald {
  background-color: var(--bg-surface-emerald-translucent);
  clip-path: polygon(0 0, 100% 5%, 100% 100%, 0 95%);
  padding: 6rem 0;
  margin: -3rem 0;
  z-index: 1;
  position: relative;
}

/* Glassmorphic Cards (0px radius) */
.glass-card {
  background: rgba(250, 246, 239, 0.4);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border: 1px solid rgba(194, 65, 12, 0.1);
  border-radius: 0; /* Strict 0px radius */
  padding: 3rem;
  margin-bottom: 2rem;
  box-shadow: 0 12px 32px -4px rgba(43, 33, 26, 0.05);
}

.glass-card.emerald {
  border-color: rgba(16, 185, 129, 0.2);
  background: rgba(250, 246, 239, 0.6);
}

/* Forms & Inputs (0px radius) */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

input, textarea, select {
  width: 100%;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--text-dark);
  border-radius: 0; /* Strict 0px radius */
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.3s ease, background 0.3s ease;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--accent-terracotta);
  background: rgba(255, 255, 255, 0.9);
}

/* Routine Conflict Checker Tool */
.routine-checker {
  background: var(--bg-surface-translucent);
  padding: 3rem;
  border-radius: 0;
  margin-top: 2rem;
}

#routine-output {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #fff;
  border-left: 4px solid var(--accent-emerald);
  display: none;
}

.tool-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

/* Standard Page Layouts */
.page-header {
  padding: 12rem 0 4rem;
  background: var(--bg-surface-translucent);
  text-align: center;
}

.content-section {
  padding: 6rem 0;
}

/* Footer Layout (Split) */
.site-footer {
  background-color: var(--text-dark);
  color: var(--bg-cream);
  padding: 6rem 1.5rem 2rem;
  margin-top: 4rem;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 4rem;
}

.footer-brand h2 {
  color: var(--accent-terracotta);
}

.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.footer-col h4 {
  color: var(--accent-emerald);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.75rem;
}

.footer-col a {
  opacity: 0.8;
  font-size: 0.875rem;
}

.footer-col a:hover {
  opacity: 1;
  color: var(--accent-emerald);
}

.footer-bottom {
  max-width: 1200px;
  margin: 4rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(250, 246, 239, 0.1);
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  opacity: 0.6;
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s var(--ease-kinetic);
}

.reveal.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Table Wrapper */
.table-responsive {
  overflow-x: auto;
  margin: 2rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

th, td {
  padding: 1rem;
  border-bottom: 1px solid rgba(43, 33, 26, 0.2);
  text-align: left;
}

th {
  font-family: var(--font-heading);
  text-transform: uppercase;
  color: var(--accent-terracotta);
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg-cream);
  z-index: 99;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transform: translateY(-100%);
  transition: transform 0.5s var(--ease-kinetic);
}

.mobile-nav-overlay.active {
  transform: translateY(0);
}

.mobile-nav-overlay ul {
  list-style: none;
  text-align: center;
}

.mobile-nav-overlay li {
  margin: 1.5rem 0;
}

.mobile-nav-overlay a {
  font-family: var(--font-heading);
  font-size: 2rem;
  text-transform: uppercase;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .split-section {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .split-section.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
  }
  .split-image-container {
    min-height: 300px;
  }
  .split-content {
    padding: 4rem 2rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .mobile-menu-btn {
    display: block;
  }
  .footer-links-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bg-clip-diagonal, .bg-clip-emerald {
    clip-path: none;
    margin: 0;
    padding: 4rem 0;
  }
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
}

@media (max-width: 480px) {
  .footer-links-grid {
    grid-template-columns: 1fr;
  }
  .header-wrapper {
    padding: 0.5rem;
  }
  .site-header {
    padding: 0.75rem 1.5rem;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

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