/* ===========================================================
   BeSpokedKraftism — base stylesheet
   Aesthetic: warm, artisanal, minimal. Easy to extend.
   =========================================================== */

:root {
  --color-bg: #f8f6fd;           /* cool lavender-white */
  --color-bg-alt: #eaf4f0;       /* soft mint */
  --color-ink: #2c2746;          /* deep indigo ink */
  --color-muted: #6b6585;        /* muted lavender-grey */
  --color-accent: #6a5ae0;       /* periwinkle indigo (logo border) */
  --color-accent-dark: #5546c4;
  --color-pink: #e8459e;         /* magenta (logo wordmark) */
  --color-coral: #f2637a;        /* coral (logo butterfly) */
  --color-gold: #e0b341;         /* gold (Kraftism outline) */
  --color-line: #e4e0f2;         /* light lavender hairline */
  --color-white: #ffffff;

  /* Logo gradient: indigo → magenta, used for accents and buttons */
  --gradient-brand: linear-gradient(90deg, #6a5ae0 0%, #a24fd0 50%, #e8459e 100%);

  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-script: "Dancing Script", "Brush Script MT", cursive;

  --maxw: 1100px;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(43, 39, 35, 0.08);
  --transition: 0.25s ease;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1rem; }

a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }
.narrow { max-width: 720px; }
.center { text-align: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  /* Soft mint → lavender wash, echoing the logo's background */
  background: linear-gradient(
    90deg,
    rgba(234, 244, 240, 0.82) 0%,
    rgba(248, 246, 253, 0.8) 55%,
    rgba(245, 238, 250, 0.85) 100%
  );
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
}
/* Hand-drawn-feeling brand gradient hairline along the bottom edge */
.site-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--gradient-brand);
  opacity: 0.7;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}
/* Brand reserves only header-height space; the logo is absolutely positioned so
   it can overflow below the bar (a floating badge) without growing the header. */
.brand {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  width: 150px;
  height: 72px;
  transition: width var(--transition);
}
.brand-logo {
  position: absolute;
  top: 8px;
  left: 0;
  z-index: 2;
  width: 150px; height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 12px 28px rgba(106, 90, 224, 0.22);
  transition: transform var(--transition), box-shadow var(--transition),
    width var(--transition), height var(--transition), top var(--transition),
    border-width var(--transition);
}
/* The wordmark lives in the logo image while it's large, so the text twin is
   hidden by default and pops out only once the badge shrinks. */
.brand-name {
  opacity: 0;
  transform: scale(0.7);
  transform-origin: left center;
  white-space: nowrap;
  pointer-events: none;
  /* Vanish fast when collapsing back to the big logo, so the title isn't
     caught peeking out from behind the growing badge. */
  transition: opacity 0.1s ease, transform 0.1s ease;
}
/* Shrink the floating badge into a compact inline mark — once the page scrolls,
   or while the mobile menu is open (so it doesn't cover the menu). */
.site-header.scrolled .brand,
.site-header.menu-open .brand {
  width: auto;
  padding-left: 64px;
}
.site-header.scrolled .brand-logo,
.site-header.menu-open .brand-logo {
  width: 56px; height: 56px;
  top: 8px;
  border-width: 2px;
  box-shadow: 0 6px 16px rgba(106, 90, 224, 0.18);
}
.site-header.scrolled .brand-name,
.site-header.menu-open .brand-name {
  opacity: 1;
  transform: scale(1);
  /* Pop in slowly (with overshoot) once the badge has finished shrinking. */
  transition: opacity var(--transition) 0.12s,
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) 0.12s;
}
/* Playful, handmade-feeling tilt on hover */
.brand:hover .brand-logo {
  transform: rotate(-2deg) scale(1.02);
  box-shadow: 0 16px 34px rgba(232, 69, 158, 0.26);
}
.brand-name { font-family: var(--font-script); font-size: 1.7rem; font-weight: 700; }
.brand-name em {
  font-style: normal;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav { display: flex; align-items: center; }
.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-menu a {
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--color-muted);
  transition: color var(--transition);
}
/* Gradient underline that draws itself in on hover */
.nav-menu a:not(.nav-cta) {
  position: relative;
}
.nav-menu a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -5px;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.nav-menu a:not(.nav-cta):hover { color: var(--color-ink); }
.nav-menu a:not(.nav-cta):hover::after { transform: scaleX(1); }
.nav-cta {
  padding: 0.55rem 1.25rem;
  border: none;
  border-radius: 999px;
  color: var(--color-white) !important;
  background: var(--gradient-brand);
  box-shadow: 0 6px 16px rgba(106, 90, 224, 0.28);
  transition: transform var(--transition), box-shadow var(--transition);
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(232, 69, 158, 0.32);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none; border: none;
  cursor: pointer; padding: 6px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--color-ink);
  transition: var(--transition);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(4rem, 12vw, 9rem) 0;
  background:
    radial-gradient(900px 460px at 88% -10%, rgba(232, 69, 158, 0.12), transparent 60%),
    radial-gradient(1100px 520px at 8% 0%, rgba(106, 90, 224, 0.13), transparent 62%),
    var(--color-bg);
  overflow: hidden;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--color-accent);
  margin-bottom: 1.2rem;
}
.hero h1 { margin-bottom: 1rem; }
.hero .accent {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  max-width: 560px;
  font-size: 1.2rem;
  color: var(--color-muted);
  margin-bottom: 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.98rem;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--gradient-brand);
  background-size: 160% 100%;
  background-position: 0% 0%;
  color: var(--color-white);
}
.btn-primary:hover { background-position: 100% 0%; transform: translateY(-1px); }
.btn-ghost { border-color: var(--color-line); color: var(--color-ink); }
.btn-ghost:hover { border-color: var(--color-accent); color: var(--color-accent); }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section-alt { background: var(--color-bg-alt); }
.section-label {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 0.6rem;
}
.section p { color: var(--color-muted); max-width: 60ch; }
.section.center p { margin-left: auto; margin-right: auto; }

/* ---------- Cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.card {
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
  transition: var(--transition);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-icon {
  font-size: 1.8rem;
  color: var(--color-accent);
  margin-bottom: 0.8rem;
}
.card h3 { margin-bottom: 0.4rem; }
.card p { margin: 0; }

/* ---------- Steps ---------- */
.steps {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  counter-reset: step;
}
.steps li { position: relative; }
.step-num {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--color-accent);
  opacity: 0.55;
  display: block;
  margin-bottom: 0.3rem;
}
.steps h3 { margin-bottom: 0.3rem; }
.steps p { margin: 0; }

/* ---------- Instagram feed (horizontal carousel) ---------- */
.ig-intro { white-space: nowrap; max-width: none; }
.ig-handle {
  color: var(--color-accent);
  font-weight: 600;
  white-space: nowrap;
}
.ig-handle:hover { text-decoration: underline; }
@media (max-width: 640px) {
  .ig-intro { white-space: normal; } /* allow wrapping so it doesn't overflow on phones */
}
.ig-carousel {
  position: relative;
  margin-top: 2.5rem;
}
.ig-grid {
  display: grid;
  grid-auto-flow: column;             /* fill down a column, then move right */
  grid-template-rows: repeat(2, auto); /* desktop: 2 rows */
  grid-auto-columns: clamp(220px, 38vw, 290px);
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0.25rem 0.25rem 1.25rem; /* room for hover-lift + scrollbar */
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--color-accent) transparent;
}
.ig-grid::-webkit-scrollbar { height: 8px; }
.ig-grid::-webkit-scrollbar-thumb {
  background: var(--color-line);
  border-radius: 999px;
}
.ig-grid::-webkit-scrollbar-thumb:hover { background: var(--color-accent); }
.ig-status {
  grid-row: 1 / -1;        /* span both rows, centered */
  align-self: center;
  justify-self: center;
  text-align: center;
  color: var(--color-muted);
  padding: 2rem 1rem;
}
.ig-card {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  color: var(--color-ink);
}

/* Single row on smaller screens; wider cards for easy swiping */
@media (max-width: 640px) {
  .ig-grid {
    grid-template-rows: 1fr;
    grid-auto-columns: clamp(240px, 78vw, 320px);
  }
}

/* Carousel arrow buttons (desktop) */
.ig-nav {
  position: absolute;
  top: calc(50% - 0.6rem);
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-line);
  background: var(--color-white);
  color: var(--color-ink);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: grid;
  place-items: center;
}
.ig-nav:hover { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }
.ig-nav[hidden] { display: none; }
.ig-prev { left: -10px; }
.ig-next { right: -10px; }
@media (max-width: 640px) {
  /* Touch devices scroll/swipe natively — hide arrows */
  .ig-nav { display: none !important; }
}
.ig-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.ig-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--color-bg-alt);
  overflow: hidden;
}
.ig-media video,
.ig-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Album slideshow: stacked slides that crossfade */
.ig-album .ig-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.ig-album .ig-slide.active { opacity: 1; }
.ig-dots {
  position: absolute;
  bottom: 0.6rem;
  left: 0;
  right: 0;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 0.35rem;
}
.ig-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.4);
  transition: background 0.3s ease, transform 0.3s ease;
}
.ig-dot.active { background: #fff; transform: scale(1.25); }
.ig-likes {
  position: absolute;
  bottom: 0.6rem;
  left: 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(43, 39, 35, 0.7);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.ig-caption {
  margin: 0;
  padding: 0.9rem 1rem 1.1rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-muted);
}
.ig-sentinel { grid-row: 1 / -1; width: 1px; }
.ig-follow { margin-top: 2.5rem; text-align: center; }

/* ---------- Contact ---------- */
.section-contact {
  background:
    radial-gradient(900px 400px at 50% 120%, rgba(106, 90, 224, 0.14), transparent 60%),
    var(--color-bg-alt);
}
.contact-form {
  margin: 2.5rem auto 0;
  max-width: 560px;
  text-align: left;
}
.form-row { margin-bottom: 1.25rem; }
.form-row label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--color-ink);
}
.form-row .optional { color: var(--color-muted); font-weight: 400; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  font: inherit;
  color: var(--color-ink);
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: 10px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(106, 90, 224, 0.18);
}
.contact-form textarea { resize: vertical; }
.contact-form button { width: 100%; margin-top: 0.25rem; }
.hidden-field { display: none; }
.form-status {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.95rem;
  min-height: 1.2em;
}
.form-status.success { color: #2f7d4f; }
.form-status.error { color: #b3392f; }
.contact-alt { margin-top: 1.75rem; font-size: 0.95rem; color: var(--color-muted); }
.contact-alt a { color: var(--color-accent); }
.contact-alt a:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-ink);
  color: #d9d2c8;
  padding: 3rem 0 2rem;
}
.footer-inner { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; align-items: center; }
.footer-brand .brand-name { color: var(--color-white); font-size: 1.3rem; }
.footer-brand .brand-name em {
  -webkit-text-fill-color: var(--color-pink);
  color: var(--color-pink);
}
.footer-brand p { margin: 0.3rem 0 0; font-size: 0.9rem; color: #a59c90; }
.footer-nav { display: flex; gap: 1.5rem; }
.footer-nav a { color: #d9d2c8; font-size: 0.92rem; transition: color var(--transition); }
.footer-nav a:hover { color: var(--color-white); }
.footer-legal { width: 100%; margin: 1.5rem 0 0; padding-top: 1.5rem; border-top: 1px solid #443e37; font-size: 0.82rem; color: #8a8278; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  /* The floating badge is oversized for phones — trim it, and shrink it
     further once scrolling starts (or the menu opens) so content and the
     nav menu aren't pushed off-screen / covered. */
  .brand { width: 104px; }
  .brand-logo { width: 104px; height: 104px; }
  .site-header.scrolled .brand,
  .site-header.menu-open .brand { padding-left: 56px; }
  .site-header.scrolled .brand-logo,
  .site-header.menu-open .brand-logo { width: 48px; height: 48px; }
  .brand-name { font-size: 1.4rem; }

  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute;
    top: 72px; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.2rem;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-line);
    padding: 1.5rem;
    transform: translateY(-150%);
    transition: transform var(--transition);
  }
  .nav-menu.open { transform: translateY(0); }
}
