/* ==========================================
   BANGLA BAZAR BUSINESS ASSOCIATION
   Warm, culture-forward palette
   ========================================== */

/* --- Type Scale --- */
:root {
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);

  /* --- Spacing (4px base) --- */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* --- Radius --- */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* --- Transitions --- */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* --- Content widths --- */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;

  /* --- Fonts --- */
  --font-display: 'Playfair Display', 'Georgia', serif;
  --font-body: 'Work Sans', 'Helvetica Neue', sans-serif;
}

/* ==========================================
   COLOR — Warm Earthy Bangla Palette
   ========================================== */

:root, [data-theme="light"] {
  /* Surfaces — warm cream/beige */
  --color-bg:             #faf8f4;
  --color-surface:        #fff9f0;
  --color-surface-2:      #fcf7ee;
  --color-surface-offset: #f3ede2;
  --color-surface-offset-2: #ebe4d8;
  --color-surface-dynamic: #e2dacf;
  --color-divider:        #d9d0c3;
  --color-border:         #cec4b5;

  /* Text */
  --color-text:           #2c2418;
  --color-text-muted:     #7a6f5f;
  --color-text-faint:     #b5a998;
  --color-text-inverse:   #faf8f4;

  /* Primary — Deep Saffron / Terracotta */
  --color-primary:        #c0562b;
  --color-primary-hover:  #a34520;
  --color-primary-active: #8a3718;
  --color-primary-highlight: #f5e4d8;

  /* Accent — Deep Green (Bangladeshi flag) */
  --color-accent:         #006a4e;
  --color-accent-hover:   #005740;
  --color-accent-active:  #004332;

  /* Success */
  --color-success:        #437a22;
  --color-success-hover:  #2e5c10;

  /* Shadows */
  --shadow-sm: 0 1px 2px oklch(0.25 0.02 60 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.25 0.02 60 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.25 0.02 60 / 0.12);
}

/* DARK MODE */
[data-theme="dark"] {
  --color-bg:             #1a1714;
  --color-surface:        #211e1a;
  --color-surface-2:      #272320;
  --color-surface-offset: #1e1b17;
  --color-surface-offset-2: #2a2622;
  --color-surface-dynamic: #333028;
  --color-divider:        #2e2a25;
  --color-border:         #3d3831;
  --color-text:           #d8d0c6;
  --color-text-muted:     #8c8274;
  --color-text-faint:     #5e5648;
  --color-text-inverse:   #1a1714;

  --color-primary:        #e07b4f;
  --color-primary-hover:  #d06239;
  --color-primary-active: #b85228;
  --color-primary-highlight: #3a2e26;

  --color-accent:         #3da87e;
  --color-accent-hover:   #2e9068;
  --color-accent-active:  #1f7852;

  --color-success:        #6daa45;
  --color-success-hover:  #4d8f25;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:             #1a1714;
    --color-surface:        #211e1a;
    --color-surface-2:      #272320;
    --color-surface-offset: #1e1b17;
    --color-surface-offset-2: #2a2622;
    --color-surface-dynamic: #333028;
    --color-divider:        #2e2a25;
    --color-border:         #3d3831;
    --color-text:           #d8d0c6;
    --color-text-muted:     #8c8274;
    --color-text-faint:     #5e5648;
    --color-text-inverse:   #1a1714;
    --color-primary:        #e07b4f;
    --color-primary-hover:  #d06239;
    --color-primary-active: #b85228;
    --color-primary-highlight: #3a2e26;
    --color-accent:         #3da87e;
    --color-accent-hover:   #2e9068;
    --color-accent-active:  #1f7852;
    --color-success:        #6daa45;
    --color-success-hover:  #4d8f25;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
    --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
    --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
  }
}

/* ==========================================
   LAYOUT
   ========================================== */

.container {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

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

/* ==========================================
   SKIP LINK
   ========================================== */

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  z-index: 100;
  text-decoration: none;
}
.skip-link:focus {
  top: var(--space-2);
}

/* ==========================================
   HEADER
   ========================================== */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(from var(--color-bg) l c h / 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.08);
  transition: box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.header--scrolled {
  box-shadow: var(--shadow-sm);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-3);
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
}

.header__logo-icon {
  flex-shrink: 0;
  height: 50px;
  width: auto;
  object-fit: contain;
}

.header__logo-text {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1.1;
}

.header__logo-sub {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.header__nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: var(--space-1) 0;
  position: relative;
}

.header__nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width var(--transition-interactive);
}

.header__nav a:hover {
  color: var(--color-text);
}

.header__nav a:hover::after {
  width: 100%;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.theme-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
}

.theme-toggle:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
}

.mobile-menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--color-text);
}

.mobile-menu-btn:hover {
  background: var(--color-surface-offset);
}

@media (max-width: 768px) {
  .header__nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    flex-direction: column;
    padding: var(--space-4);
    gap: var(--space-2);
    border-bottom: 1px solid var(--color-divider);
    box-shadow: var(--shadow-md);
  }
  .header__nav.is-open {
    display: flex;
  }
  .header__nav a {
    padding: var(--space-3) var(--space-4);
    width: 100%;
    border-radius: var(--radius-md);
    font-size: var(--text-base);
  }
  .header__nav a:hover {
    background: var(--color-surface-offset);
  }
  .header__nav a::after {
    display: none;
  }
  .mobile-menu-btn {
    display: flex;
  }
}

/* ==========================================
   HERO SECTION
   ========================================== */

.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    oklch(0.15 0.02 40 / 0.92) 0%,
    oklch(0.15 0.02 40 / 0.6) 40%,
    oklch(0.15 0.02 40 / 0.2) 70%,
    oklch(0.15 0.02 40 / 0.05) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding: var(--space-12) var(--space-4) var(--space-16);
  width: 100%;
}

.hero__badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #e8c57a;
  margin-bottom: var(--space-4);
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: #faf8f4;
  margin-bottom: var(--space-4);
  max-width: 14ch;
}

.hero__subtitle {
  font-size: var(--text-lg);
  color: rgba(250, 248, 244, 0.85);
  max-width: 42ch;
  margin-bottom: var(--space-8);
  line-height: 1.5;
}

.hero__cta-group {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .hero {
    min-height: 90vh;
  }
  .hero__title {
    font-size: var(--text-2xl);
  }
}

/* ==========================================
   BUTTONS
   ========================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  min-height: 44px;
  border: none;
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}
.btn--primary:hover {
  background: var(--color-primary-hover);
}
.btn--primary:active {
  background: var(--color-primary-active);
}

.btn--outline {
  background: transparent;
  color: #faf8f4;
  border: 1px solid rgba(250, 248, 244, 0.3);
}
.btn--outline:hover {
  background: rgba(250, 248, 244, 0.1);
  border-color: rgba(250, 248, 244, 0.5);
}

.btn--accent {
  background: var(--color-accent);
  color: #fff;
}
.btn--accent:hover {
  background: var(--color-accent-hover);
}
.btn--accent:active {
  background: var(--color-accent-active);
}

.btn--ghost {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid oklch(from var(--color-text) l c h / 0.12);
}
.btn--ghost:hover {
  background: var(--color-surface-offset);
}

/* ==========================================
   SECTION COMMON
   ========================================== */

.section {
  padding-block: clamp(var(--space-12), 8vw, var(--space-24));
}

.section__label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

.section__heading {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.section__desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 60ch;
  line-height: 1.6;
}

/* ==========================================
   ABOUT / CULTURE SECTION
   ========================================== */

.about {
  background: var(--color-surface);
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}

.about__image {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4/3;
}

.about__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.about__body {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.7;
}

@media (max-width: 768px) {
  .about__grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}

/* ==========================================
   DISCOVER SECTION — WHAT YOU'LL FIND
   ========================================== */

.discover {
  background: var(--color-bg);
}

.discover__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-10);
}

.discover__card {
  background: var(--color-surface);
  padding: var(--space-8) var(--space-6);
  border-radius: var(--radius-lg);
  border: 1px solid oklch(from var(--color-text) l c h / 0.06);
  text-align: left;
  transition: box-shadow var(--transition-interactive),
              transform var(--transition-interactive);
}

.discover__card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.discover__card-icon {
  font-size: 2rem;
  margin-bottom: var(--space-4);
  display: block;
  width: 48px;
  height: 48px;
  color: var(--color-primary);
}

.discover__card-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--color-text);
}

.discover__card-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .discover__grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
}

/* ==========================================
   COMMUNITY SECTION — FULL BLEED IMAGE
   ========================================== */

.community {
  position: relative;
  padding: 0;
  overflow: hidden;
}

.community__image-wrap {
  position: relative;
  width: 100%;
  height: clamp(320px, 50vw, 500px);
}

.community__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.community__image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    oklch(0.15 0.02 40 / 0.7) 0%,
    oklch(0.15 0.02 40 / 0.1) 60%,
    transparent 100%
  );
}

.community__text {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-8) var(--space-4);
  max-width: var(--content-wide);
  margin-inline: auto;
}

.community__text .section__heading {
  color: #faf8f4;
}

.community__text .section__desc {
  color: rgba(250, 248, 244, 0.85);
}

/* ==========================================
   BUSINESSES SECTION
   ========================================== */

.businesses {
  background: var(--color-surface);
}

.businesses__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: var(--space-4);
  margin-top: var(--space-8);
}

.businesses__card {
  background: var(--color-bg);
  padding: var(--space-5) var(--space-6);
  border-radius: var(--radius-lg);
  border: 1px solid oklch(from var(--color-text) l c h / 0.06);
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.businesses__icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  flex-shrink: 0;
  font-size: 1.25rem;
}

.businesses__info {
  flex: 1;
  min-width: 0;
}

.businesses__name {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-text);
}

.businesses__type {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ==========================================
   REGISTRATION SECTION
   ========================================== */

.registration {
  background: var(--color-bg);
  position: relative;
}

.registration__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: start;
}

.registration__info {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.registration__benefits {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.registration__benefits li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}

.registration__benefits li svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--color-accent);
}

.registration__form {
  background: var(--color-surface);
  padding: var(--space-8);
  border-radius: var(--radius-xl);
  border: 1px solid oklch(from var(--color-text) l c h / 0.06);
  box-shadow: var(--shadow-sm);
}

.registration__form h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-6);
  color: var(--color-text);
}

.form-group {
  margin-bottom: var(--space-4);
}

.form-group label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid oklch(from var(--color-text) l c h / 0.12);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  font-size: var(--text-base);
  color: var(--color-text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px oklch(from var(--color-primary) l c h / 0.15);
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a6f5f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  padding-right: var(--space-10);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.form-submit {
  margin-top: var(--space-6);
  width: 100%;
}

.form-note {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-3);
  text-align: center;
}

.form-success {
  display: none;
  text-align: center;
  padding: var(--space-8) var(--space-4);
}

.form-success.is-visible {
  display: block;
}

.form-success svg {
  margin-inline: auto;
  margin-bottom: var(--space-4);
  color: var(--color-accent);
}

.form-success h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.form-success p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

@media (max-width: 768px) {
  .registration__inner {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ==========================================
   CONTACT SECTION
   ========================================== */

.contact {
  background: var(--color-surface);
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  margin-top: var(--space-8);
}

.contact__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.contact__icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-highlight);
  border-radius: var(--radius-md);
  color: var(--color-primary);
  flex-shrink: 0;
}

.contact__label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-1);
}

.contact__value {
  font-size: var(--text-base);
  color: var(--color-text);
}

.contact__value a {
  color: var(--color-primary);
  text-decoration: none;
}
.contact__value a:hover {
  text-decoration: underline;
}

.contact__map {
  background: var(--color-surface-offset);
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 16/10;
  border: 1px solid oklch(from var(--color-text) l c h / 0.06);
}

.contact__map iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 768px) {
  .contact__grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================
   FOOTER
   ========================================== */

.footer {
  background: var(--color-surface-offset);
  padding-block: var(--space-8);
  border-top: 1px solid oklch(from var(--color-text) l c h / 0.06);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer__copy {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.footer__links {
  display: flex;
  gap: var(--space-6);
}

.footer__links a {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-decoration: none;
}

.footer__links a:hover {
  color: var(--color-text-muted);
}

@media (max-width: 768px) {
  .footer__inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ==========================================
   SCROLL ANIMATIONS
   ========================================== */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}
