/* ==========================================================================
   hendfamily.com: launch pad
   Mobile first. Breakpoints: <360 (IG tiles become list rows), >=640 (2/3 columns)
   ========================================================================== */

:root {
  /* Palette */
  --bg: #fbeadd;
  --ink: #2f2119;          /* headings / names */
  --ink-soft: #594538;     /* subtitle / descriptors */
  --ink-muted: #6a5345;    /* @handles, footer: still >= 4.5:1 on the glass */
  --focus: #a8481f;

  /* Glass */
  --glass: rgba(255, 255, 255, 0.42);
  --glass-solid: rgba(255, 252, 249, 0.9); /* used when backdrop-filter is unsupported */
  --radius: 24px;
  --shadow-base:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 0 0 1px rgba(255, 255, 255, 0.55),
    0 1px 2px rgba(90, 55, 30, 0.06),
    0 10px 28px -12px rgba(90, 55, 30, 0.18);

  /* Motion */
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);   /* overshoot */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  /* Type */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Spacing */
  --gutter: clamp(16px, 4vw, 32px);
  --gap: clamp(12px, 2.2vw, 20px);
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  color: var(--ink);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Background ---------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(160deg, #fdf5ea 0%, #fbe8db 42%, #f8dcd5 70%, #f5e6d1 100%);
}

/* Radial gradients are already soft-edged, so no filter: blur() is needed (cheaper to animate). */
.blob {
  position: absolute;
  width: 70vmax;
  height: 70vmax;
  border-radius: 50%;
  background: radial-gradient(circle, var(--c) 0%, transparent 62%);
  opacity: 0.75;
  will-change: transform;
  animation: drift 38s ease-in-out infinite alternate;
}
.blob--peach  { --c: #ffc6a2; top: -30vmax; left: -25vmax; }
.blob--blush  { --c: #f6b3c4; bottom: -35vmax; right: -25vmax; animation-duration: 46s; animation-delay: -12s; }
.blob--butter { --c: #f8dc93; top: 20%; left: 35%; width: 55vmax; height: 55vmax; opacity: 0.6; animation-duration: 52s; animation-delay: -25s; }

@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(6vmax, 4vmax, 0) scale(1.08); }
  100% { transform: translate3d(-4vmax, 7vmax, 0) scale(0.96); }
}

/* ---------- Layout ---------- */

.page {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: calc(880px + 2 * var(--gutter));
  margin-inline: auto;
  padding:
    max(var(--gutter), env(safe-area-inset-top))
    max(var(--gutter), env(safe-area-inset-right))
    var(--gutter)
    max(var(--gutter), env(safe-area-inset-left));
}

.intro {
  text-align: center;
  margin: clamp(8px, 3vw, 24px) 0 clamp(24px, 5vw, 44px);
}

.title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.1rem, 1.5rem + 3vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.subtitle {
  margin: 0.55rem 0 0;
  color: var(--ink-soft);
  font-size: clamp(0.98rem, 0.92rem + 0.3vw, 1.1rem);
}

.tiles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--gap);
}
.tiles + .tiles { margin-top: var(--gap); }

.tiles--brands { grid-template-columns: 1fr; }
.tiles--social { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.tiles > li { display: flex; min-width: 0; }

/* ---------- Tile (glass) ---------- */

.tile {
  /* per-tile colors come from the tile--{color} classes below */
  --tint: rgba(255, 255, 255, 0);
  --glow: rgba(200, 140, 90, 0.25);
  --glow-strong: rgba(200, 140, 90, 0.45);

  position: relative;
  isolation: isolate;
  overflow: hidden;
  flex: 1;
  min-width: 0;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: inherit;
  text-decoration: none;
  border-radius: var(--radius);
  background:
    radial-gradient(120% 90% at 50% 0%, var(--tint) 0%, transparent 65%),
    var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: var(--shadow-base), 0 18px 40px -18px var(--glow);
  transition:
    transform 0.6s var(--spring),
    box-shadow 0.45s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}

/* Light sheen that sweeps across on hover/focus. It snaps back instantly (no transition) while off-tile. */
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.6) 48%, rgba(255, 255, 255, 0.15) 56%, transparent 70%);
  transform: translateX(-120%);
}

@media (hover: hover) {
  .tile:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-base), 0 26px 56px -16px var(--glow-strong);
  }
  .tile:hover::after {
    transform: translateX(120%);
    transition: transform 0.9s var(--ease-out);
  }
}

.tile:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-base), 0 26px 56px -16px var(--glow-strong);
}
.tile:focus-visible::after {
  transform: translateX(120%);
  transition: transform 0.9s var(--ease-out);
}

/* Press: quick squish */
.tile:active {
  transform: translateY(-1px) scale(0.97);
  transition-duration: 0.12s, 0.45s;
}

/* Fallback when backdrop-filter isn't supported: more opaque so text stays readable */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .tile {
    background:
      radial-gradient(120% 90% at 50% 0%, var(--tint) 0%, transparent 65%),
      var(--glass-solid);
  }
}

/* Color themes: tint inside the glass + glow behind it */
.tile--gold       { --tint: rgba(246, 196, 80, 0.3);  --glow: rgba(214, 156, 36, 0.38); --glow-strong: rgba(214, 156, 36, 0.62); }
.tile--blue       { --tint: rgba(70, 100, 210, 0.16); --glow: rgba(28, 45, 110, 0.32);  --glow-strong: rgba(28, 45, 110, 0.52); }
.tile--terracotta { --tint: rgba(214, 120, 90, 0.2);  --glow: rgba(190, 95, 65, 0.32);  --glow-strong: rgba(190, 95, 65, 0.55); }
.tile--pink       { --tint: rgba(240, 150, 175, 0.24); --glow: rgba(225, 115, 150, 0.34); --glow-strong: rgba(225, 115, 150, 0.58); }
.tile--sage       { --tint: rgba(140, 170, 130, 0.24); --glow: rgba(100, 135, 95, 0.32);  --glow-strong: rgba(100, 135, 95, 0.55); }
.tile--lavender   { --tint: rgba(145, 125, 230, 0.34); --glow: rgba(115, 90, 200, 0.4);   --glow-strong: rgba(115, 90, 200, 0.62); }

/* ---------- Shared text ---------- */

.tile-name {
  font-weight: 650;
  color: var(--ink);
  line-height: 1.2;
}
.tile-desc,
.tile-handle {
  color: var(--ink-muted);
  line-height: 1.3;
}

/* ---------- Monograms (fallbacks until real images are added) ---------- */

.monogram {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -2px 6px rgba(0, 0, 0, 0.06);
}
.monogram--gold       { background: linear-gradient(145deg, #fbe3a0, #e7b54d); color: #5a3a08; }
.monogram--terracotta { background: linear-gradient(145deg, #f5c3ae, #d98a6c); color: #5b2614; }
.monogram--pink       { background: linear-gradient(145deg, #fde0e8, #f2a9be); color: #6b2239; }
.monogram--sage       { background: linear-gradient(145deg, #dfe8d6, #a9bf9f); color: #2f4529; }
.monogram--lavender   { background: linear-gradient(145deg, #e8e0fa, #b9a8e4); color: #3a2a66; }

/* When a real image is uncommented, it sits before the monogram and hides it. */
.logo > img + .monogram,
.logo > img + .wordmark-batchly,
.avatar > img + .monogram { display: none; }

/* ---------- Brand tiles ---------- */

.tile--brand {
  gap: 0.3rem;
  padding: clamp(22px, 4vw, 36px) clamp(18px, 3vw, 28px);
  min-height: clamp(170px, 30vw, 230px);
}

.logo {
  display: grid;
  place-items: center;
  height: clamp(64px, 11vw, 88px);
  margin-bottom: 0.65rem;
}
/* Square logo artwork (both brands' files have their own background), shown as an app-icon-style badge */
.logo > img {
  width: clamp(64px, 11vw, 88px);
  height: clamp(64px, 11vw, 88px);
  object-fit: cover;
  border-radius: 22%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6), 0 8px 18px -8px rgba(60, 40, 20, 0.45);
}
.logo .monogram {
  width: clamp(64px, 11vw, 88px);
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2rem);
}

.wordmark-batchly {
  display: inline-flex;
  align-items: baseline;
  padding: 0.5em 0.85em;
  border-radius: 16px;
  background: #f7efdd;
  color: #1c2d6e;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(1.45rem, 1.1rem + 1.4vw, 1.9rem);
  letter-spacing: -0.03em;
  line-height: 1;
  box-shadow: inset 0 0 0 1.5px rgba(28, 45, 110, 0.14), 0 6px 16px -8px rgba(28, 45, 110, 0.35);
}
.wordmark-batchly b {
  font-weight: 800;
  letter-spacing: 0.01em;
  margin-left: 0.04em;
}

.tile--brand .tile-name {
  font-size: clamp(1.15rem, 1.02rem + 0.6vw, 1.35rem);
}
.tile--brand .tile-desc {
  font-size: clamp(0.92rem, 0.88rem + 0.2vw, 1rem);
}

/* ---------- Instagram tiles ---------- */

.tile--ig {
  --avatar: clamp(52px, 15vw, 72px);
  justify-content: flex-start; /* top-align so photos line up when names wrap to different line counts */
  gap: 0.55rem;
  padding: 14px 8px 16px;
}

.avatar {
  position: relative;
  flex: none;
  width: var(--avatar);
  height: var(--avatar);
}
.avatar > img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
}
.avatar .monogram {
  font-size: calc(var(--avatar) * 0.36);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), inset 0 -2px 6px rgba(0, 0, 0, 0.06);
}

.ig-badge {
  position: absolute;
  right: -3px;
  bottom: -3px;
  display: grid;
  place-items: center;
  width: max(22px, calc(var(--avatar) * 0.32));
  height: max(22px, calc(var(--avatar) * 0.32));
  border-radius: 50%;
  color: #fff;
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
  box-shadow: 0 0 0 2px #fff, 0 3px 8px -2px rgba(120, 30, 80, 0.35);
}
.ig-badge svg { width: 62%; height: 62%; }

.ig-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.tile--ig .tile-name {
  font-size: clamp(0.8rem, 0.74rem + 0.3vw, 1rem);
  hyphens: manual;           /* wrap between words only, never "Pot-tery" */
  overflow-wrap: break-word; /* last resort if a single word can't fit */
}
.tile--ig .tile-handle {
  font-size: clamp(0.78rem, 0.74rem + 0.15vw, 0.86rem);
  overflow-wrap: anywhere;
  display: none; /* hidden in the compact 3-across phone layout; shown below */
}

/* <br class="br-phone"> forces a line break only in the 3-across phone layout
   (so short names stack like the longer ones); it's ignored everywhere else. */
@media (max-width: 359.98px), (min-width: 640px) {
  .br-phone { display: none; }
}

/* Very narrow phones: IG tiles become horizontal list rows */
@media (max-width: 359.98px) {
  .tiles--social { grid-template-columns: 1fr; }
  .tile--ig {
    --avatar: 52px;
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
    gap: 0.9rem;
    padding: 12px 16px;
  }
  .tile--ig .tile-name { font-size: 0.98rem; }
  .tile--ig .tile-handle { display: block; }
}

/* Tablet / desktop */
@media (min-width: 640px) {
  .tiles--brands { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile--ig {
    --avatar: clamp(64px, 8vw, 84px);
    gap: 0.7rem;
    padding: clamp(18px, 2.6vw, 26px) clamp(12px, 2vw, 20px);
  }
  .tile--ig .tile-handle { display: block; }
}

/* ---------- Footer ---------- */

.site-footer {
  text-align: center;
  padding: 0.5rem var(--gutter) max(18px, env(safe-area-inset-bottom));
  color: var(--ink-muted);
  font-size: 0.8rem;
}
.site-footer p { margin: 0; }

/* ---------- Entrance: fade/rise with a short stagger ---------- */

.intro,
.tiles > li {
  animation: rise 0.7s var(--ease-out) both;
}
.tiles--brands > li:nth-child(1) { animation-delay: 0.08s; }
.tiles--brands > li:nth-child(2) { animation-delay: 0.16s; }
.tiles--social > li:nth-child(1) { animation-delay: 0.24s; }
.tiles--social > li:nth-child(2) { animation-delay: 0.31s; }
.tiles--social > li:nth-child(3) { animation-delay: 0.38s; }
.tiles--social > li:nth-child(4) { animation-delay: 0.45s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
}

/* ---------- Reduced motion: no drift, stagger, sheen or lift ---------- */

@media (prefers-reduced-motion: reduce) {
  .blob,
  .intro,
  .tiles > li { animation: none; }

  .tile,
  .tile:hover,
  .tile:focus-visible,
  .tile:active {
    transform: none;
    transition: box-shadow 0.2s linear, opacity 0.2s linear;
  }
  .tile::after { display: none; }
  .tile:active { opacity: 0.85; }
}
