/* ============================================================
   Bugra Tek — Personal & Professional Site
   Palette: Sage green + warm white (natural wellness)
   ============================================================ */

:root {
  /* Core palette */
  --sage-900: #2f3d35;
  --sage-800: #3c4f43;
  --sage-700: #4d6354;
  --sage-600: #62795f; /* gwsupplements-style */
  --sage-500: #7c9476;
  --sage-400: #9bb293;
  --sage-300: #bfd0b8;
  --sage-200: #dde6d8;
  --sage-100: #eef2eb;

  --cream-50: #fbfaf6;   /* warm white background */
  --cream-100: #f5f3ec;
  --cream-200: #ece8dc;

  --ink: #28302a;
  --ink-soft: #51594f;
  --ink-faint: #7e857a;

  --accent: #c98a5e;     /* warm terracotta-clay accent (sparingly) */
  --accent-soft: #e6b894;
  --gold: #b89b5e;

  --white: #ffffff;

  /* Type */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Mukta", "Segoe UI", system-ui, sans-serif;

  /* Layout */
  --maxw: 1180px;
  --radius: 14px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 3px rgba(47, 61, 53, 0.06), 0 4px 14px rgba(47, 61, 53, 0.05);
  --shadow-md: 0 8px 30px rgba(47, 61, 53, 0.10);
  --shadow-lg: 0 20px 60px rgba(47, 61, 53, 0.14);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--cream-50);
  color: var(--ink);
  line-height: 1.65;
  font-size: 17px;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  color: var(--sage-900);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.7rem); }
p { color: var(--ink-soft); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* ---------- Decorative background ---------- */
body::before {
  content: "";
  position: fixed; inset: 0;
  background-image:
    radial-gradient(closest-side at 12% 18%, rgba(155,178,147,0.28), transparent 60%),
    radial-gradient(closest-side at 88% 8%, rgba(201,138,94,0.10), transparent 55%),
    radial-gradient(closest-side at 78% 92%, rgba(98,121,95,0.16), transparent 60%);
  z-index: -2;
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
  z-index: -1; pointer-events: none;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(251, 250, 246, 0.82);
  border-bottom: 1px solid var(--sage-200);
  transition: box-shadow 0.3s var(--ease);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 74px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--sage-600), var(--sage-400));
  display: grid; place-items: center;
  color: var(--cream-50); font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 600;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.25);
}
.brand-text { line-height: 1.1; }
.brand-text strong { font-family: var(--font-display); font-size: 1.18rem; color: var(--sage-900); font-weight: 600; }
.brand-text span { display: block; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sage-600); }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links > li { position: relative; }
.nav-links a {
  display: block; padding: 9px 11px; border-radius: 9px;
  font-size: 0.88rem; font-weight: 500; color: var(--ink-soft);
  transition: all 0.2s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--sage-800); background: var(--sage-100); }

/* dropdown */
.has-sub > a::after { content: "›"; margin-left: 6px; display: inline-block; transform: rotate(90deg); font-size: 0.8em; opacity: 0.6; }
.subnav {
  position: absolute; top: calc(100% + 8px); left: 0;
  min-width: 280px; background: var(--white);
  border: 1px solid var(--sage-200); border-radius: var(--radius);
  box-shadow: var(--shadow-md); padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all 0.22s var(--ease);
}
.has-sub:hover .subnav { opacity: 1; visibility: visible; transform: translateY(0); }
.subnav a { padding: 10px 12px; font-size: 0.88rem; border-radius: 8px; }
.subnav a:hover { background: var(--sage-100); }

.nav-cta {
  background: var(--sage-700); color: var(--cream-50) !important;
  padding: 10px 20px !important; border-radius: 999px !important;
  font-weight: 600 !important; margin-left: 8px;
}
.nav-cta:hover { background: var(--sage-800) !important; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--sage-800); margin: 5px 0; transition: 0.3s; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 26px; border-radius: 999px;
  font-family: var(--font-body); font-weight: 600; font-size: 0.96rem;
  cursor: pointer; border: none; transition: all 0.25s var(--ease);
}
.btn-primary { background: var(--sage-700); color: var(--cream-50); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--sage-800); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--sage-800); border: 1.5px solid var(--sage-300); }
.btn-ghost:hover { border-color: var(--sage-600); background: var(--sage-100); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #b6794d; transform: translateY(-2px); }

/* ---------- Page header band ---------- */
.page-hero {
  padding: 90px 0 60px;
  position: relative;
}
.page-hero .eyebrow {
  display: inline-block; font-size: 0.78rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--sage-600); font-weight: 600;
  margin-bottom: 16px;
  padding: 6px 14px; border: 1px solid var(--sage-300); border-radius: 999px;
  background: var(--sage-100);
}
.page-hero h1 { max-width: 16ch; }
.page-hero .lead { font-size: 1.18rem; max-width: 60ch; margin-top: 20px; color: var(--ink-soft); }

/* ---------- Sections ---------- */
section { padding: 56px 0; }
.section-title { margin-bottom: 12px; }
.section-intro { max-width: 62ch; margin-bottom: 40px; font-size: 1.08rem; }

/* ---------- Cards ---------- */
.card-grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--white); border: 1px solid var(--sage-200);
  border-radius: var(--radius-lg); padding: 32px;
  transition: all 0.3s var(--ease); position: relative; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--sage-500), var(--sage-300));
  transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--sage-300); }
.card:hover::before { transform: scaleX(1); }
.card .card-icon {
  width: 52px; height: 52px; border-radius: 14px; margin-bottom: 18px;
  background: var(--sage-100); display: grid; place-items: center;
  font-size: 1.5rem; color: var(--sage-700);
}
.card h3 { margin-bottom: 10px; }
.card p { font-size: 0.98rem; }
.card .tag {
  display: inline-block; font-size: 0.74rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--sage-700); font-weight: 600;
  background: var(--sage-100); padding: 4px 12px; border-radius: 999px;
  margin-bottom: 14px;
}
.card-link { color: var(--sage-700); font-weight: 600; font-size: 0.92rem; margin-top: 14px; display: inline-flex; gap: 6px; }
.card-link:hover { gap: 11px; }

/* ---------- Misc ---------- */
.placeholder {
  background: var(--sage-100); border: 1px dashed var(--sage-400);
  color: var(--sage-700); border-radius: 8px; padding: 2px 8px;
  font-size: 0.86em; font-style: italic;
}
.divider { height: 1px; background: var(--sage-200); margin: 0 auto; max-width: var(--maxw); }

.tag-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.pill { background: var(--sage-100); color: var(--sage-700); padding: 7px 16px; border-radius: 999px; font-size: 0.86rem; font-weight: 500; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--sage-900); color: var(--sage-200);
  padding: 56px 0 28px; margin-top: 80px;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.site-footer h4 { color: var(--cream-50); font-size: 1.05rem; margin-bottom: 16px; }
.site-footer a { color: var(--sage-300); font-size: 0.92rem; line-height: 2; transition: color 0.2s; }
.site-footer a:hover { color: var(--cream-50); }
.footer-brand p { color: var(--sage-300); font-size: 0.94rem; margin-top: 14px; max-width: 38ch; }
.footer-bottom { border-top: 1px solid var(--sage-700); padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.84rem; color: var(--sage-400); }

/* ---------- Form note states ---------- */
.form-note.error { background: #fbeae6 !important; border-color: #e6b3a3 !important; color: #9c4a2f !important; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1080px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; top: 74px; right: 0; bottom: 0; width: min(340px, 88vw);
    background: var(--cream-50); flex-direction: column; align-items: stretch;
    padding: 24px; gap: 4px; box-shadow: var(--shadow-lg);
    transform: translateX(100%); transition: transform 0.32s var(--ease);
    overflow-y: auto;
  }
  .nav-links.open { transform: translateX(0); }
  .subnav { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; padding: 0 0 0 16px; min-width: 0; display: none; }
  .has-sub.expand .subnav { display: block; }
  .nav-cta { margin: 8px 0 0; text-align: center; }
}
@media (max-width: 620px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  body { font-size: 16px; }
}
