/* ============================================================
   MyHomeDIY — Design System (Organic Warmth direction)
   ============================================================ */

:root {
  --primary: #3a2d1e;
  --primary-dark: #241a11;
  --accent: #c47b3a;
  --accent-dark: #a8632a;
  --accent-glow: rgba(196, 123, 58, 0.35);
  --accent-rgb: 196, 123, 58;
  --bg: #fdf6ee;
  --bg-alt: #f4e6d3;
  --bg-dark: #241a11;
  --ink: #2a1f14;
  --muted: #6f5c47;
  --linen-border: #e6d3b8;
  --white: #ffffff;

  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Karla", Helvetica, Arial, sans-serif;

  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 28px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--accent); color: var(--white); }

/* Custom scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 10px; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   Announcement bar
   ============================================================ */
.announcement-bar {
  background: linear-gradient(135deg, var(--primary), var(--accent-dark), var(--primary));
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
  color: var(--white);
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 8px 16px;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: rgba(253, 246, 238, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.nav.scrolled {
  box-shadow: 0 4px 24px rgba(58, 45, 30, 0.08);
  border-color: var(--linen-border);
}

.nav-logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; }
.nav-logo svg { width: 34px; height: 34px; }

.nav-links { display: flex; gap: 32px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  position: relative;
  font-weight: 600;
  font-size: 0.95rem;
  padding-bottom: 4px;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-cta {
  padding: 10px 22px;
  background: var(--accent);
  color: var(--white);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
}

.hamburger { display: none; background: none; border: none; cursor: pointer; }

/* ============================================================
   Hero — full-bleed, full-viewport
   ============================================================ */
.hero {
  position: relative;
  width: 100vw;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--bg-dark);
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 110%;
  object-fit: cover;
  will-change: transform;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(36,26,17,0.92) 0%, rgba(36,26,17,0.35) 55%, rgba(36,26,17,0.15) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--white);
  padding: 0 24px 80px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.hero-content > * {
  opacity: 0;
  transform: translateY(32px);
  animation: heroReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-content > *:nth-child(1) { animation-delay: 0.1s; }
.hero-content > *:nth-child(2) { animation-delay: 0.25s; }
.hero-content > *:nth-child(3) { animation-delay: 0.4s; }
.hero-content > *:nth-child(4) { animation-delay: 0.55s; }

@keyframes heroReveal {
  to { opacity: 1; transform: translateY(0); }
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 18px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 6rem);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}

.hero p {
  font-size: 1.15rem;
  max-width: 560px;
  color: rgba(255,255,255,0.85);
  margin: 0 0 28px;
}

/* Giant decorative background text */
.hero-decorative-text {
  position: absolute;
  bottom: -40px;
  right: -20px;
  font-family: var(--font-display);
  font-size: 14rem;
  font-weight: 900;
  color: rgba(255,255,255,0.06);
  z-index: 1;
  pointer-events: none;
  line-height: 1;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-primary { background: var(--accent); color: var(--white); }
.btn-outline { background: transparent; color: var(--white); border: 1.5px solid rgba(255,255,255,0.5); }

.btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 40px var(--accent-glow);
}

/* ============================================================
   Fade-up scroll animation
   ============================================================ */
.fade-up {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   Sections & color depth
   ============================================================ */
.section { padding: 100px 0; }
.section-alt { background: var(--bg-alt); }
.section-dark {
  background: var(--bg-dark);
  color: var(--white);
}

.section-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 12px;
  display: block;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
}

.gradient-text {
  background: linear-gradient(120deg, var(--accent), var(--accent-dark));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.separator {
  width: 64px;
  height: 3px;
  background: var(--accent);
  border-radius: 3px;
  margin: 0 0 24px;
}

/* ============================================================
   Asymmetric "How it works" / intro section
   ============================================================ */
.intro-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 60px;
  align-items: center;
}

.intro-grid img {
  border-radius: var(--radius-lg);
  aspect-ratio: 4/5;
  object-fit: cover;
}

/* ============================================================
   Cards / tips grid
   ============================================================ */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--linen-border);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(58, 45, 30, 0.12);
}

.card-img { overflow: hidden; aspect-ratio: 3/2; }
.card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.card:hover .card-img img { transform: scale(1.06); }

.card-body { padding: 24px; }

.pill {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin: 0 0 10px;
}

.card p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* ============================================================
   Stats section w/ animated counters
   ============================================================ */
.stats-section {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 900;
  color: var(--accent);
}

.stat-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.65);
  margin-top: 6px;
}

/* ============================================================
   Ticker / marquee
   ============================================================ */
.ticker {
  overflow: hidden;
  background: var(--primary);
  padding: 16px 0;
  white-space: nowrap;
}
.ticker-track {
  display: inline-block;
  animation: ticker 28s linear infinite;
}
@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.ticker-track span {
  color: rgba(255,255,255,0.8);
  font-weight: 700;
  font-size: 0.95rem;
  margin: 0 32px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ============================================================
   Pull quote
   ============================================================ */
.pull-quote {
  position: relative;
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px;
}
.pull-quote .quote-mark {
  font-family: var(--font-display);
  font-size: 8rem;
  color: var(--accent);
  opacity: 0.25;
  line-height: 1;
}
.pull-quote p {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-style: italic;
  line-height: 1.4;
}

/* ============================================================
   Glass morphism card (featured callout)
   ============================================================ */
.glass-card {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-lg);
  padding: 40px;
}

.gradient-border-card {
  border-radius: var(--radius-md);
  padding: 2px;
  background: linear-gradient(135deg, var(--accent), var(--primary));
}
.gradient-border-card > div {
  background: var(--white);
  border-radius: calc(var(--radius-md) - 2px);
  padding: 28px;
}

/* Floating decorative shapes */
.float-shape {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  animation: float 6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-16px); }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(var(--accent-rgb), 0); }
}
.pulse { animation: pulse-glow 2.4s ease infinite; }

/* ============================================================
   Newsletter
   ============================================================ */
.newsletter {
  background: var(--bg-dark);
  color: var(--white);
  padding: 80px 0;
}
.newsletter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.newsletter-form {
  display: flex;
  gap: 12px;
}
.newsletter-form input {
  flex: 1;
  padding: 14px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.06);
  color: var(--white);
  font-family: var(--font-body);
}
.newsletter-form input::placeholder { color: rgba(255,255,255,0.5); }

/* ============================================================
   Footer
   ============================================================ */
footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.75);
  padding: 64px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-grid h4 {
  color: var(--white);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 18px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a:hover { color: var(--accent); }
.footer-brand p { max-width: 300px; color: rgba(255,255,255,0.6); font-size: 0.9rem; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}
.footer-bottom a { margin-left: 18px; }
.footer-bottom a:hover { color: var(--accent); }

/* ============================================================
   Forms (contact page)
   ============================================================ */
.form-field { margin-bottom: 20px; }
.form-field label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 0.9rem; }
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--linen-border);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--white);
}
.form-success {
  background: #e9f5ec;
  color: #1f6d3a;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}

.notice {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin: 20px 0;
}
.notice-info { background: var(--bg-alt); border-left: 4px solid var(--accent); }

/* ============================================================
   Legal pages
   ============================================================ */
.legal-content h2 { font-family: var(--font-display); margin-top: 40px; }
.legal-content table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.legal-content th, .legal-content td {
  border: 1px solid var(--linen-border);
  padding: 10px 14px;
  text-align: left;
  font-size: 0.9rem;
}
.legal-content th { background: var(--bg-alt); }

/* ============================================================
   Season / category tabs
   ============================================================ */
.tab-bar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 40px; }
.tab-bar button {
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--linen-border);
  background: var(--white);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}
.tab-bar button.active,
.tab-bar button:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .tips-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-section { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .intro-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: block; }
  .tips-grid { grid-template-columns: 1fr; }
  .stats-section { grid-template-columns: repeat(2, 1fr); }
  .newsletter-grid { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-decorative-text { display: none; }
}
