/* ============================================================
   The Hub Group — Portal
   Palette drawn from the brand marks:
   bronze  #8a7440  (group logo ink)
   ink     #17140f  (brand logos)
   ivory   #fbfaf6  (paper)
   sand    #e8e2d2  (hairlines / quiet surfaces)
   ============================================================ */

:root {
  --bronze: #8a7440;
  --bronze-deep: #6e5b30;
  --ink: #17140f;
  --ivory: #fbfaf6;
  --sand: #e8e2d2;
  --muted: #7a7466;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  background: var(--ivory);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", "Noto Serif TC", "PMingLiU", serif;
  -webkit-font-smoothing: antialiased;
}

/* --- the gold hairline: the group's signature mark --- */
.rule {
  width: 64px;
  height: 1px;
  background: var(--bronze);
  margin: 0 auto;
  transition: width .5s ease;
}

/* ================= Landing (index) ================= */

.landing {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  padding: 2rem;
  text-align: center;
}

.landing a.gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  text-decoration: none;
  color: inherit;
  outline-offset: 12px;
}

.landing img.group-logo {
  width: min(340px, 70vw);
  height: auto;
  animation: rise .9s ease both;
}

.landing .enter {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: .9rem;
  animation: rise .9s .25s ease both;
}

.landing .enter span {
  font-size: .8rem;
  letter-spacing: .55em;
  text-indent: .55em; /* optically center the tracked text */
  color: var(--muted);
  text-transform: uppercase;
  transition: color .4s ease;
}

.landing a.gate:hover .enter span,
.landing a.gate:focus-visible .enter span { color: var(--bronze-deep); }
.landing a.gate:hover .rule,
.landing a.gate:focus-visible .rule { width: 120px; }

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

/* ================= Brands page ================= */

.brands-page {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

header.masthead {
  text-align: center;
  padding: 3.2rem 1.5rem 2.4rem;
}

header.masthead a {
  text-decoration: none;
  color: inherit;
}

header.masthead img {
  width: 108px;
  height: auto;
  display: block;
  margin: 0 auto 1.1rem;
}

header.masthead h1 {
  font-size: 1rem;
  font-weight: normal;
  letter-spacing: .5em;
  text-indent: .5em;
  color: var(--muted);
}

main.brands {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 1rem 2rem 4rem;
  gap: 2rem;
}

a.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;
  padding: 3.2rem 2rem;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid var(--sand);
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
  animation: rise .7s ease both;
}
a.brand:nth-child(2) { animation-delay: .12s; }
a.brand:nth-child(3) { animation-delay: .24s; }

a.brand:hover,
a.brand:focus-visible {
  transform: translateY(-6px);
  border-color: var(--bronze);
  box-shadow: 0 18px 40px -22px rgba(23, 20, 15, .35);
}

a.brand img {
  width: min(230px, 80%);
  height: auto;
}

a.brand .cta {
  font-size: .78rem;
  letter-spacing: .4em;
  text-indent: .4em;
  color: var(--muted);
  text-transform: uppercase;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: .7rem;
  transition: color .35s ease;
}

a.brand:hover .cta,
a.brand:focus-visible .cta { color: var(--bronze-deep); }
a.brand:hover .rule,
a.brand:focus-visible .rule { width: 110px; }

footer.colophon {
  text-align: center;
  padding: 1.6rem;
  font-size: .72rem;
  letter-spacing: .3em;
  text-indent: .3em;
  color: var(--muted);
  border-top: 1px solid var(--sand);
}

/* focus visibility */
a:focus-visible { outline: 2px solid var(--bronze); outline-offset: 6px; }

/* ---- responsive ---- */
@media (max-width: 900px) {
  main.brands { grid-template-columns: 1fr; max-width: 480px; }
}

/* ---- reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
