/* ============================================
   TheCozyCorner — Main CSS
   ============================================ */

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

/* ---- Custom Properties ---- */
:root {
  --color-cream:       #efecec;
  --color-sand:        #E8DCC8;
  --color-warm-beige:  #D4C4A8;
  --color-terracotta:  #C4845C;
  --color-terracotta-dark: #A96840;
  --color-sage:        #8B9E7E;
  --color-sage-light:  #B5C8A8;
  --color-dark:        #3D2E1E;
  --color-dark-soft:   #4f4135;
  --color-white:       #FDFAF5;
  --color-gold:        #C9A96E;

  --font-heading:  'Playfair Display', Georgia, serif;
  --font-sub:      'Cormorant Garamond', Georgia, serif;
  --font-body:     'Jost', system-ui, sans-serif;
  --font-script:   'Dancing Script', cursive;

  --shadow-soft:  0 4px 24px rgba(61,46,30,0.08);
  --shadow-card:  0 8px 40px rgba(61,46,30,0.12);
  --shadow-hover: 0 16px 48px rgba(61,46,30,0.18);

  --radius-sm:  8px;
  --radius-md:  16px;
  --radius-lg:  32px;
  --radius-xl:  64px;

  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);

  --max-width: 1200px;
  --section-padding: clamp(60px, 8vw, 120px);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
svg { display: block; flex-shrink: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  background-color: var(--color-cream);
  color: var(--color-dark);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  overflow-x: hidden;
  overflow-wrap: break-word;
  word-break: break-word;
}

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

/* ---- Typography ---- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--color-dark);
  font-weight: 500;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 3.5vw, 3rem); }
h3 { font-size: clamp(1.5rem, 2.5vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2vw, 1.6rem); }
h5 { font-size: 1.1rem; }

p { max-width: 65ch; }

.text-script {
  font-family: var(--font-script);
  color: var(--color-terracotta);
  font-size: 1.3em;
}

.text-sub {
  font-family: var(--font-sub);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 300;
  color: var(--color-dark-soft);
  font-style: italic;
}

.text-center { text-align: center; }
.text-terracotta { color: var(--color-terracotta); }

/* ---- Layout ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 60px);
}

.section {
  padding: var(--section-padding) 0;
}

.section--sand { background: var(--color-sand); }
.section--white { background: var(--color-white); }
.section--cream { background: var(--color-cream); }
.section--dark {
  background: var(--color-dark);
  color: var(--color-cream);
}
.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4,
.section--dark p { color: var(--color-cream); }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(24px, 4vw, 48px);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 260px));
  gap: clamp(16px, 2.5vw, 28px);
  justify-content: center;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: clamp(16px, 2.5vw, 32px);
}

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

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

/* ---- Section Header ---- */
.section-header {
  text-align: center;
  margin-bottom: clamp(40px, 6vw, 80px);
}

.section-header .label {
  display: inline-block;
  font-family: var(--font-script);
  font-size: 1.4rem;
  color: var(--color-terracotta);
  margin-bottom: 8px;
}

.section-header h2 {
  margin-bottom: 16px;
}

.section-header p {
  margin: 0 auto;
  color: var(--color-dark-soft);
  font-size: 1.05rem;
}

.divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-terracotta), var(--color-gold));
  margin: 16px auto;
  border-radius: 2px;
}

/* ---- Decorative Elements ---- */
.deco-circle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.06;
  background: var(--color-terracotta);
  pointer-events: none;
}

.deco-line {
  position: absolute;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--color-warm-beige), transparent);
  pointer-events: none;
}

/* ---- Page Hero (sub-pages) ---- */
.page-hero {
  background: linear-gradient(135deg, var(--color-sand) 0%, var(--color-cream) 50%, var(--color-warm-beige) 100%);
  padding: clamp(80px, 9vw, 120px) 0 clamp(36px, 5vw, 60px);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196,132,92,0.08) 0%, transparent 70%);
}

.page-hero .label {
  font-family: var(--font-script);
  font-size: 1.4rem;
  color: var(--color-terracotta);
  display: block;
  margin-bottom: 8px;
}

.page-hero h1 {
  margin-bottom: 16px;
}

.page-hero p {
  margin: 0 auto;
  color: var(--color-dark-soft);
  font-size: 1.1rem;
}

/* ---- Breadcrumb ---- */
.breadcrumb {
  font-size: 0.875rem;
  color: var(--color-dark-soft);
  margin-bottom: 24px;
  opacity: 0.7;
}

.breadcrumb a:hover { color: var(--color-terracotta); }
.breadcrumb span { margin: 0 8px; }

/* ---- Empty state ---- */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--color-dark-soft);
}

.empty-state .icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.4;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--color-cream); }
::-webkit-scrollbar-thumb {
  background: var(--color-warm-beige);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--color-terracotta); }

/* ---- Selection ---- */
::selection {
  background: rgba(196, 132, 92, 0.2);
  color: var(--color-dark);
}

/* ---- Responsive helpers ---- */
@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
  p { max-width: 100%; }
}

@media (max-width: 480px) {
  :root { --section-padding: 48px; }
}
