/*
Theme Name: Giggling Bits
Theme URI: https://gigglingbits.com/
Author: Giggling Bits
Description: A small presentation theme for Giggling Bits. WordPress owns the content; the theme owns the style.
Version: 1.3.0
Requires at least: 6.5
Requires PHP: 8.0
Text Domain: giggling-bits
*/

:root {
  --gb-ink: #171b21;
  --gb-muted: #5f6871;
  --gb-paper: #fbfaf6;
  --gb-soft: #f1f3f4;
  --gb-line: rgba(23,27,33,.10);
  --gb-blue: #e4f0f7;
  --gb-radius-xl: 30px;
  --gb-radius-lg: 22px;
  --gb-shadow: 0 28px 80px rgba(42,52,62,.12);
  --gb-max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--gb-ink);
  background: #dfe5e8;
  font-family: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Segoe UI", system-ui, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea { font: inherit; }

.gb-site {
  width: min(calc(100% - 28px), 1240px);
  margin: 14px auto;
  overflow: hidden;
  border-radius: 32px;
  background: var(--gb-paper);
  box-shadow: var(--gb-shadow);
}
.gb-shell { width: min(calc(100% - 56px), var(--gb-max)); margin-inline: auto; }

/* Header */
.gb-header { position: relative; z-index: 20; }
.gb-header__inner { min-height: 92px; display: flex; align-items: center; gap: 22px; }
.gb-brand { display: inline-flex; align-items: center; gap: 12px; margin-right: auto; text-decoration: none; min-width: 0; }
.gb-brand__mark { width: 54px; height: 62px; object-fit: contain; flex: 0 0 auto; }
.gb-brand__copy { min-width: 0; line-height: 1.03; }
.gb-brand__name { display: block; font-weight: 900; font-size: clamp(1.05rem, 1.35vw, 1.3rem); letter-spacing: -.035em; }
.gb-brand__tagline { display: block; margin-top: 6px; color: var(--gb-muted); font: 650 .75rem/1.2 system-ui, sans-serif; white-space: nowrap; }
.gb-nav { display: flex; align-items: center; }
.gb-menu { display: flex; align-items: center; gap: 26px; list-style: none; margin: 0; padding: 0; }
.gb-menu a { text-decoration: none; font: 650 .92rem/1 system-ui, sans-serif; }
.gb-menu a:hover, .gb-menu .current-menu-item > a, .gb-menu .current_page_item > a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.gb-login { display: inline-flex; align-items: center; justify-content: center; height: 42px; padding: 0 14px; border-radius: 13px; background: #edf1f3; text-decoration: none; font: 700 .82rem/1 system-ui, sans-serif; }
.gb-menu-toggle { display: none; width: 44px; height: 44px; border: 0; border-radius: 14px; background: #edf1f3; color: var(--gb-ink); cursor: pointer; }
.gb-menu-toggle span, .gb-menu-toggle::before, .gb-menu-toggle::after { content: ""; display: block; width: 18px; height: 2px; margin: 4px auto; border-radius: 2px; background: currentColor; }

/* General content */
.gb-main { padding-bottom: 20px; }
.gb-entry { padding: 48px 0 78px; }
.gb-entry-inner { width: min(calc(100% - 56px), var(--gb-max)); margin-inline: auto; }
.gb-entry__title { max-width: 820px; margin: 0 0 28px; font-size: clamp(2.4rem, 5vw, 4.5rem); line-height: .99; letter-spacing: -.052em; }
.gb-entry-content > * { max-width: 780px; }
.gb-entry-content > .alignwide, .gb-entry-content > .alignfull, .gb-entry-content > .gb-home-section, .gb-entry-content > .gb-home-hero { max-width: none; }
.gb-entry-content h2 { font-size: clamp(1.8rem, 3.2vw, 2.8rem); line-height: 1.06; letter-spacing: -.04em; }
.gb-entry-content h3 { letter-spacing: -.025em; }
.gb-entry-content p { font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }

/* Homepage */
.gb-home-page .gb-entry { padding-top: 2px; }
.gb-home-page .gb-entry-inner { width: min(calc(100% - 36px), var(--gb-max)); }
.gb-home-page .gb-entry-content > * { max-width: none; }

.gb-home-hero {
  gap: 0 !important;
  min-height: 520px;
  margin-bottom: 14px !important;
  overflow: hidden;
  border: 1px solid var(--gb-line);
  border-radius: var(--gb-radius-xl);
  background: #fff;
}
.gb-home-hero > .wp-block-column { margin: 0 !important; min-width: 0; }
.gb-hero-copy {
  align-self: stretch !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(38px, 4.6vw, 62px);
  background: linear-gradient(110deg, #fffefa 0%, #fbfaf6 78%, #f7f6f1 100%);
}
.gb-hero-copy > * { max-width: 560px !important; }
.gb-eyebrow, .gb-section-label {
  margin: 0 0 16px !important;
  color: #65717a;
  font: 800 .71rem/1.2 system-ui, sans-serif !important;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.gb-home-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2.85rem, 4.55vw, 4.6rem);
  line-height: .98;
  letter-spacing: -.058em;
  text-wrap: balance;
}
.gb-hero-principle {
  margin: 0 0 24px !important;
  color: #3c4752;
  font-family: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", system-ui, sans-serif !important;
  font-size: clamp(1.7rem, 2.7vw, 2.45rem);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -.035em;
}
.gb-hero-lede { margin: 0 0 28px !important; color: #45505a; font-size: clamp(.98rem, 1.25vw, 1.08rem); line-height: 1.55; }
.gb-hero-media { align-self: stretch !important; }
.gb-hero-photo { margin: 0 !important; height: 100%; min-height: 520px; }
.gb-hero-photo img { width: 100%; height: 100%; min-height: 520px; object-fit: cover; object-position: 50% 49%; }

.wp-block-buttons { gap: 11px; }
.wp-block-button__link { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; padding: 0 20px; border: 1px solid var(--gb-ink); border-radius: 999px; background: var(--gb-ink); color: #fff; text-decoration: none !important; font: 750 .91rem/1 system-ui, sans-serif; }
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--gb-ink); }
.gb-button-primary .wp-block-button__link { background: var(--gb-blue); border-color: #d5e2e9; color: var(--gb-ink); }

.gb-home-section { margin-top: 14px; }
.gb-focus-section { padding: 0; }
.gb-focus-row { gap: 14px !important; margin: 0 0 14px !important; }
.gb-focus-row > .wp-block-column { min-width: 0; }
.gb-focus-card {
  position: relative;
  min-height: 232px;
  margin: 0 !important;
  overflow: hidden;
  border-radius: var(--gb-radius-lg);
  background: #20252a;
}
.gb-focus-card > * { max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; }
.gb-focus-photo { position: absolute; inset: 0; margin: 0 !important; }
.gb-focus-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.gb-focus-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.02) 38%, rgba(0,0,0,.74) 100%); pointer-events: none; }
.gb-focus-copy { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 22px; color: #fff; }
.gb-focus-copy h3 { margin: 0 0 5px; color: #fff; font-size: clamp(1.22rem, 1.8vw, 1.55rem); line-height: 1.02; }
.gb-focus-copy p { margin: 0; color: rgba(255,255,255,.9); font-size: .9rem; line-height: 1.38; }

.gb-contact-section { padding: clamp(38px, 4.4vw, 56px); border: 1px solid var(--gb-line); border-radius: var(--gb-radius-xl); background: #f1f4f5; }
.gb-contact-section > * { max-width: 680px !important; }
.gb-contact-section h2 { margin-top: 0; margin-bottom: 10px; }
.gb-contact-section > p:not(.gb-section-label) { color: var(--gb-muted); margin-bottom: 24px; }

/* Footer */
.gb-footer { padding: 24px 0 30px; }
.gb-footer__inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-top: 22px; border-top: 1px solid var(--gb-line); }
.gb-footer__name { font-weight: 850; letter-spacing: -.02em; }
.gb-footer__tagline { margin-top: 4px; color: var(--gb-muted); font: 650 .78rem/1.4 system-ui, sans-serif; }
.gb-footer-menu { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; }
.gb-footer-menu a { font: 650 .8rem/1 system-ui, sans-serif; text-decoration: none; }

@media (max-width: 980px) {
  .gb-shell { width: min(calc(100% - 40px), var(--gb-max)); }
  .gb-home-page .gb-entry-inner { width: min(calc(100% - 26px), var(--gb-max)); }
  .gb-home-hero { min-height: 470px; }
  .gb-hero-copy { padding: 38px 34px; }
  .gb-home-hero h1 { font-size: clamp(2.7rem, 4.8vw, 3.7rem); }
  .gb-hero-principle { font-size: clamp(1.55rem, 2.9vw, 2.05rem); }
  .gb-hero-photo, .gb-hero-photo img { min-height: 470px; }
  .gb-focus-card { min-height: 210px; }
}

@media (max-width: 781px) {
  body { background: var(--gb-paper); }
  .gb-site { width: 100%; margin: 0; border-radius: 0; box-shadow: none; }
  .gb-shell { width: min(calc(100% - 28px), var(--gb-max)); }
  .gb-header__inner { min-height: 82px; gap: 10px; }
  .gb-brand__mark { width: 46px; height: 54px; }
  .gb-brand__tagline { display: none; }
  .gb-brand__name { font-size: 1rem; }
  .gb-login { width: 42px; padding: 0; font-size: 0; }
  .gb-login::before { content: "\1f512"; font-size: 15px; }
  .gb-menu-toggle { display: block; }
  .gb-nav { display: none; position: absolute; top: 76px; left: 14px; right: 14px; padding: 18px; border-radius: 18px; background: rgba(251,250,246,.98); box-shadow: 0 18px 45px rgba(31,41,51,.16); }
  .gb-nav.is-open { display: block; }
  .gb-menu { flex-direction: column; align-items: stretch; gap: 0; }
  .gb-menu a { display: block; padding: 11px 4px; }
  .gb-home-page .gb-entry-inner { width: min(calc(100% - 20px), var(--gb-max)); }
  .gb-home-page .gb-entry { padding-top: 0; padding-bottom: 46px; }
  .gb-home-hero { min-height: 0; border-radius: 26px; }
  .gb-home-hero > .wp-block-column { flex-basis: 100% !important; }
  .gb-hero-copy { padding: 28px 24px 26px; }
  .gb-home-hero h1 { font-size: clamp(2.6rem, 11vw, 3.6rem); }
  .gb-hero-principle { font-size: clamp(1.45rem, 6.7vw, 2rem); margin-bottom: 20px !important; }
  .gb-hero-lede { font-size: .98rem; }
  .gb-hero-media { order: 2; }
  .gb-hero-photo, .gb-hero-photo img { min-height: 0; }
  .gb-hero-photo img { aspect-ratio: 4 / 3; object-position: 50% 42%; }
  .gb-focus-row { display: block !important; margin-bottom: 10px !important; }
  .gb-focus-row > .wp-block-column { margin-bottom: 10px; }
  .gb-focus-card { min-height: 150px; border-radius: 20px; }
  .gb-focus-copy { padding: 18px 20px; }
  .gb-focus-copy h3 { margin-bottom: 0; font-size: 1.18rem; }
  .gb-focus-copy p { display: none; }
  .gb-contact-section { padding: 30px 24px; border-radius: 24px; }
  .gb-footer__inner { align-items: flex-start; flex-direction: column; }
}
