/* ==========================================================================
   components.css — Reusable, page-agnostic UI blocks
   --------------------------------------------------------------------------
   Nav, footer, logo emblem, cards, photos, forms, FAQ, "TBA" cards, timeline.
   Anything here can be dropped onto a new page. Depends on tokens.css + base.css.
   ========================================================================== */

/* ── Logo (H&H Day mark; img in nav, SVG emblem variant elsewhere) ── */
.hhd-logo { display: block; width: 40px; height: 40px; flex-shrink: 0; object-fit: contain; }
.brand .hhd-logo { width: 48px; height: 48px; }

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.7rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text b { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--blue-ink); }
.brand-text small { font-size: 0.66rem; color: var(--ink-soft); letter-spacing: 0.02em; }

.nav-links { display: flex; align-items: center; gap: 1.8rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--blue); }
.nav-links .btn { padding: 0.55rem 1.2rem; font-size: 0.92rem; }
/* The .nav-links a rule above out-specifies .btn-primary's white text, so
   restore it explicitly for buttons in the nav. */
.nav-links a.btn-primary { color: #fff; }
.nav-links a.btn-primary:hover { color: #fff; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 0.4rem; }
.nav-toggle span { display: block; width: 24px; height: 2.5px; background: var(--blue-ink); border-radius: 2px; margin: 5px 0; transition: 0.25s; }

@media (max-width: 720px) {
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 0.5rem 1.5rem 1.5rem; box-shadow: var(--shadow-md);
    transform: translateY(-130%); transition: transform 0.3s ease;
  }
  .nav-links.open { transform: none; }
  .nav-links li { padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
  .nav-links .btn { justify-content: center; margin-top: 0.6rem; }
  .nav-toggle { display: block; }
}

/* ── FOOTER ── */
footer { background: var(--blue-ink); color: rgba(255,255,255,0.85); padding: 3.5rem 0 2rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; }
.foot-brand { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.8rem; }
.foot-brand img { width: 56px; height: 56px; background: #fff; border-radius: 12px; padding: 4px; }
.foot-brand b { font-family: var(--font-display); color: #fff; font-size: 1.1rem; }
footer h4 { color: #fff; font-family: var(--font-display); font-weight: 500; margin: 0 0 0.9rem; font-size: 1rem; }
footer a { color: rgba(255,255,255,0.82); text-decoration: none; }
footer a:hover { color: var(--green); }
.foot-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; font-size: 0.94rem; }
.foot-bottom {
  border-top: 1px solid rgba(255,255,255,0.14); margin-top: 2.5rem; padding-top: 1.5rem;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  font-size: 0.85rem; color: rgba(255,255,255,0.6);
}
.credit { display: inline-flex; align-items: center; gap: 0.4rem; }
.credit a { color: var(--green); font-weight: 500; }

@media (max-width: 940px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .foot-grid { grid-template-columns: 1fr; } .foot-bottom { flex-direction: column; text-align: center; } }

/* ── CARDS ── */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card .ic { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 1rem; }
.card .ic svg { width: 28px; height: 28px; color: #fff; }
.ic.b1 { background: var(--grad-cool); }
.ic.b2 { background: var(--green-deep); }
.ic.b3 { background: var(--blue); }
.card h3 { font-size: 1.25rem; margin-bottom: 0.3rem; }
.card p { color: var(--ink-soft); margin: 0; font-size: 0.97rem; }

@media (max-width: 940px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .cards { grid-template-columns: 1fr; } }

/* ── PHOTO SLOTS ──
   <figure class="photo ar-*"> reserves space and shows a labeled placeholder
   until a real image lands. Go live by swapping the inner .photo-ph for an
   <img> (it auto-fills via object-fit: cover). */
.photo { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); background: var(--sky); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ar-wide    { aspect-ratio: 16 / 9; }
.ar-4x3     { aspect-ratio: 4 / 3; }
.ar-square  { aspect-ratio: 1 / 1; }
.ar-portrait{ aspect-ratio: 4 / 5; }
.photo-ph {
  position: absolute; inset: 0;
  border: 2px dashed rgba(20,92,160,0.25);
  border-radius: inherit;
  background: linear-gradient(135deg, var(--sky) 0%, #fff 100%);
  display: grid; place-items: center; align-content: center; gap: 0.35rem;
  text-align: center; padding: 1.2rem; color: var(--ink-soft);
}
.photo-ph .cam { width: 38px; height: 38px; color: var(--blue); opacity: 0.7; }
.photo-ph .lbl { font-family: var(--font-display); font-weight: 500; color: var(--blue-ink); font-size: 1rem; line-height: 1.25; }
.photo-ph .dim { font-size: 0.75rem; opacity: 0.75; }

/* ── FORMS ── */
.form-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 2.5rem;
  box-shadow: var(--shadow-md); max-width: 760px; margin: 0 auto;
}
.form { display: grid; gap: 1.15rem; }
.form-row { display: grid; gap: 1.15rem; }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field label { font-family: var(--font-display); font-weight: 500; font-size: 0.92rem; color: var(--blue-ink); }
.field .req { color: var(--green-deep); }
.field input, .field textarea {
  font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  padding: 0.7rem 0.9rem; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: var(--focus-ring); }
.field textarea { min-height: 96px; resize: vertical; }
.check { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.95rem; color: var(--ink-soft); }
.check input { margin-top: 0.2rem; width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--blue); }
.form-note { font-size: 0.85rem; color: var(--ink-soft); margin: 0; }
.form .btn { justify-self: start; margin-top: 0.4rem; }
/* honeypot: hidden from humans, catches bots */
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

@media (min-width: 620px) { .form-row.two { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .form-card { padding: 1.6rem; } }

/* ── FAQ accordion (paired with js/main.js) ── */
.faq { max-width: 760px; margin: 0 auto; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 0.8rem; background: var(--white); overflow: hidden; }
.faq-q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: 1.2rem 1.4rem; font-family: var(--font-display); font-weight: 500;
  font-size: 1.05rem; color: var(--blue-ink);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq-q .chev { transition: transform 0.25s; flex-shrink: 0; color: var(--blue); }
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-a-inner { padding: 0 1.4rem 1.2rem; color: var(--ink-soft); }

/* ── "TBA" placeholder cards (speakers / vendors) ── */
.tba-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.tba-card { border: 2px dashed var(--line); border-radius: var(--radius); padding: 1.6rem 1rem; text-align: center; color: var(--ink-soft); background: rgba(255,255,255,0.5); }
.tba-card .avatar { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 0.8rem; background: var(--sky); display: grid; place-items: center; color: var(--blue); }
.tba-card .avatar svg { width: 30px; height: 30px; }
.tba-card b { color: var(--ink); font-family: var(--font-display); font-weight: 500; }

@media (max-width: 940px) { .tba-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .tba-grid { grid-template-columns: 1fr; } }

/* ── EXHIBITOR LOGO WALL ── */
.exhibitor-wall { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.2rem; }
.exhibitor { text-decoration: none; }
.logo-tile {
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  width: 100%; aspect-ratio: 3 / 2; padding: 1rem;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.2s ease;
}
a.exhibitor:hover .logo-tile { transform: translateY(-4px); box-shadow: var(--shadow-md); }
/* Cap every logo to the same height band so the wall reads as a uniform grid
   regardless of each source image's own dimensions. Wide wordmarks are also
   bounded by width; the shared max-height keeps them optically consistent. */
.logo-tile img { max-width: 100%; max-height: 60%; object-fit: contain; }
/* Emblem/square logos are given more height so they carry the same optical
   weight as the wide wordmarks (which fill the tile's width instead). */
.logo-tile.is-emblem img { max-height: 88%; }
/* Quadra's mark is white-on-black, so its tile goes black to sit seamlessly. */
.logo-tile.is-dark { background: #000; border-color: transparent; }
/* Knightdale Digital's brand mark + wordmark sit on a dark tile (its native
   presentation): pinwheel mark plus "KNIGHTDALE DIGITAL" in Barlow Condensed. */
/* container-type lets the lockup scale to its own tile (via cqw units) so the
   wordmark never overflows, at any column count / screen size. */
.logo-tile.is-kd { background: #0b111c; border-color: transparent; container-type: inline-size; }
.kd-lockup { display: flex; align-items: center; gap: 2.2cqw; }
.kd-mark { width: 15cqw; height: 15cqw; flex-shrink: 0; }
.kd-word {
  font-family: 'Barlow Condensed', var(--font-display); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; line-height: 1;
  font-size: 8cqw; color: #fff;
}
.kd-word b { font-weight: 700; color: #3dbfbf; }

/* Text tiles stand in for exhibitors whose logo isn't available yet. */
.logo-tile.is-text { background: var(--cream); }
.logo-tile.is-text .wordmark {
  font-family: var(--font-display); font-weight: 400; font-size: 1.35rem;
  color: var(--ink-soft); text-align: center; line-height: 1.2;
}
.logo-tile.is-text .wordmark b { font-weight: 600; color: var(--blue-ink); }

@media (max-width: 940px) { .exhibitor-wall { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px) { .exhibitor-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── TIMELINE ── */
.timeline { max-width: 720px; margin: 0 auto; position: relative; }
.timeline::before { content: ""; position: absolute; left: 18px; top: 8px; bottom: 8px; width: 3px; background: var(--line); border-radius: 3px; }
.tl-item { position: relative; padding: 0 0 1.6rem 3.4rem; }
.tl-item .dot { position: absolute; left: 9px; top: 4px; width: 21px; height: 21px; border-radius: 50%; background: var(--grad-warm); border: 3px solid #fff; box-shadow: var(--shadow-sm); }
.tl-item .time { font-family: var(--font-display); font-weight: 600; color: var(--blue-deep); }
.tl-item .what { color: var(--ink-soft); }
.tba-note { text-align: center; color: var(--ink-soft); font-style: italic; margin-top: 1rem; }
