/* Piece of the Action Racing — shared styles */

/* Palette from the club logo: charcoal, gold horseshoe, red ring. */
:root {
  --brand: #24262c;
  --brand-dark: #17181d;
  --brand-soft: #43464f;
  --gold: #c9a227;
  --gold-soft: #e3c766;
  --gold-deep: #8a6d1a;
  --red: #d3202a;
  --cream: #faf7f0;
  --paper: #ffffff;
  --ink: #23241f;
  --ink-soft: #5d5f57;
  --line: #e4ded1;
  --danger: #d3202a;
  --ok: #2c7a4b;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Source Sans 3", -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
}

/* Oswald for headings, Anton for the big brand moments — both condensed
   sans faces close to the logo's wordmark. */
h1, h2, h3, .brand {
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-weight: 600;
  color: var(--brand);
  line-height: 1.2;
  margin: 0 0 .5em;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

a { color: var(--gold-deep); }

img { max-width: 100%; display: block; }

.wrap {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ── Header ── */

.site-header {
  background: var(--brand);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
  border-bottom: 3px solid var(--red); /* nod to the red ring in the logo */
}

.logo {
  height: 42px;
  width: 42px;
  border-radius: 9px;
  flex-shrink: 0;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
  flex-wrap: wrap;
}

.brand {
  font-family: "Anton", "Oswald", "Arial Narrow", sans-serif;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 400;
  margin: 0;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.brand .gold { color: var(--gold-soft); }

.site-nav {
  margin-left: auto;
  display: flex;
  gap: 4px 18px;
  flex-wrap: wrap;
  align-items: center;
}

.site-nav a {
  color: #e8e4d8;
  text-decoration: none;
  font-size: .95rem;
}

.site-nav a:hover { color: var(--gold-soft); }

.btn {
  display: inline-block;
  background: var(--gold);
  color: var(--brand-dark) !important;
  font-weight: 700;
  text-decoration: none;
  border: none;
  border-radius: 6px;
  padding: 10px 22px;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
}

.btn:hover { background: var(--gold-soft); }

.btn.ghost {
  background: transparent;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,.55);
  font-weight: 600;
}

.btn.ghost:hover { border-color: var(--gold-soft); color: var(--gold-soft) !important; }

.btn.small { padding: 6px 14px; font-size: .9rem; }

.btn.danger { background: var(--danger); color: #fff !important; }

/* ── Hero ── */

.hero {
  position: relative;
  color: #fff;
  background: var(--brand-dark);
  overflow: hidden; /* the zooming photo must not spill out */
}

.hero .photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 35%;
  opacity: .38;
  /* slow cinematic drift — brings the banner to life */
  animation: heroDrift 28s ease-in-out infinite alternate;
}

@keyframes heroDrift {
  from { transform: scale(1); }
  to   { transform: scale(1.1) translate(-1.5%, -1.5%); }
}

/* Heading lines, intro and button rise in one after another */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

.hero h1 .l1   { animation: riseIn .7s ease-out .1s both; }
.hero h1 .gold { animation: riseIn .7s ease-out .3s both; }
.hero h1 .sub  { animation: riseIn .7s ease-out .5s both; }
.hero p.lead   { animation: riseIn .7s ease-out .7s both; }
.hero .btn     { animation: riseIn .7s ease-out .9s both; }
.hero-logo     { animation: riseIn .7s ease-out both; }

@media (prefers-reduced-motion: reduce) {
  .hero .photo, .hero h1 .l1, .hero h1 .gold, .hero h1 .sub,
  .hero p.lead, .hero .btn, .hero-logo { animation: none; }
}

.hero .wrap {
  position: relative;
  padding: clamp(60px, 12vw, 130px) 16px;
  max-width: 820px;
  text-align: center;
}

/* Big club badge, top-left of the photo banner */
.hero-logo {
  position: absolute;
  top: 24px;
  left: 24px;
  width: clamp(126px, 16.5vw, 225px);
  border-radius: 22px;
  box-shadow: 0 6px 18px rgba(0,0,0,.45);
  z-index: 2;
}

@media (max-width: 640px) {
  .hero-logo { width: 108px; top: 12px; left: 12px; border-radius: 14px; }
  /* keep the centred hero text clear of the badge on small screens */
  .hero .wrap { padding-top: 150px; }
}

.hero h1 {
  font-family: "Anton", "Oswald", "Arial Narrow", sans-serif;
  font-weight: 400;
  /* 30% up on the base h1 size */
  font-size: clamp(2.6rem, 6.5vw, 4.2rem);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .04em;
  line-height: 1.12;
}

/* Three stacked lines: Own a / Piece of the Action / in our yearling by Ardad */
.hero h1 .l1 { display: block; font-size: .52em; letter-spacing: .1em; }
/* same gold as the buttons */
.hero h1 .gold { display: block; color: var(--gold); }
.hero h1 .sub {
  display: block;
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-weight: 500;
  font-size: .38em;
  letter-spacing: .14em;
  color: #fff;
  margin-top: .5em;
}

.hero p.lead {
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
  color: #eee9da;
  margin-bottom: 1.6em;
}

/* ── Sections ── */

section { padding: clamp(40px, 7vw, 72px) 0; }

section.alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.kicker {
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: .6em;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}

.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}

@media (max-width: 820px) {
  .grid2, .grid3 { grid-template-columns: 1fr; }
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 4px rgba(34,39,31,.06);
}

section.alt .card { background: var(--cream); }

.rounded { border-radius: 12px; box-shadow: 0 4px 18px rgba(34,39,31,.18); }

/* ── Facts & pedigree tables ── */

table.facts, table.pedigree {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
}

table.facts td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

table.facts td:first-child {
  color: var(--ink-soft);
  width: 38%;
  font-weight: 600;
}

table.pedigree td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  background: var(--paper);
  vertical-align: middle;
}

table.pedigree td.sire-line { background: #f3efe2; }

table.pedigree .horse-name { font-weight: 700; color: var(--brand); }

/* ── Share tiers ── */

.tier {
  display: flex;
  flex-direction: column;
  text-align: center;
  border-top: 5px solid var(--gold);
}

.tier.featured {
  border-top-color: var(--brand);
  background: var(--brand);
  color: #f2efe5;
}

.tier.featured h3, .tier.featured .price { color: #fff; }
.tier.featured .per { color: var(--gold-soft); }

.tier .pct {
  font-family: "Anton", "Oswald", "Arial Narrow", sans-serif;
  font-size: 2.6rem;
  font-weight: 400;
  color: var(--gold);
  margin: 0;
}

.tier .price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand);
  margin: .2em 0 0;
}

.tier .per { color: var(--ink-soft); font-size: .92rem; margin-bottom: 1em; }

.tier ul {
  text-align: left;
  margin: 0 0 1.4em;
  padding-left: 1.2em;
  font-size: .95rem;
  flex: 1;
}

.tier ul li { margin-bottom: .45em; }

/* ── Forms ── */

label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 4px; }

input, textarea, select {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  font-size: .98rem;
  border: 1px solid #c9c3b4;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  margin-bottom: 14px;
}

input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--gold);
  border-color: var(--gold);
}

textarea { min-height: 110px; resize: vertical; }

.form-msg { font-size: .92rem; min-height: 1.4em; margin-top: 8px; }
.form-msg.error { color: var(--danger); }
.form-msg.ok { color: var(--ok); }

/* ── Feed items (updates / entries) ── */

.feed { display: flex; flex-direction: column; gap: 16px; }

.feed-item { position: relative; }

.feed-item .date {
  color: var(--gold);
  font-weight: 700;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.feed-item h3 { margin: .2em 0 .3em; }

.feed-item p { margin: 0; white-space: pre-line; }

.feed-item .del {
  position: absolute;
  top: 16px;
  right: 16px;
}

.empty { color: var(--ink-soft); font-style: italic; }

/* ── Simple list table (admin members) ── */

table.list {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
  background: var(--paper);
}

table.list th, table.list td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 8px 10px;
  vertical-align: top;
}

table.list th { color: var(--ink-soft); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; }

/* ── Footer ── */

.site-footer {
  background: var(--brand-dark);
  color: #b9bbc2;
  font-size: .88rem;
  padding: 36px 0;
}

.site-footer a { color: #d9d3c0; }

.site-footer .small { font-size: .8rem; margin-top: 1.2em; color: #8e9097; }

/* ── Login page ── */

.login-card {
  max-width: 420px;
  margin: 8vh auto;
  padding: 32px;
}

/* ── Utility ── */

.pill {
  display: inline-block;
  background: #f3efe2;
  border: 1px solid var(--line);
  color: var(--brand);
  font-size: .8rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 12px;
  margin: 0 6px 6px 0;
}

.center { text-align: center; }
.mt { margin-top: 24px; }

/* Bars without the wordmark: centre the nav so the bar reads balanced */
.site-header.centered .site-nav {
  margin: 0 auto;
  justify-content: center;
}

/* Members in the nav: plain gold text, no box */
.site-nav a.gold-link { color: var(--gold); font-weight: 700; }
.site-nav a.gold-link:hover { color: var(--gold-soft); }

/* Shared benefits checklist above the tier cards */
.benefits ul.ticks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 28px;
  font-size: 1rem;
}

.benefits ul.ticks li::before {
  content: "✓";
  color: var(--gold);
  font-weight: 700;
  margin-right: 10px;
}

@media (max-width: 640px) {
  .benefits ul.ticks { grid-template-columns: 1fr; }
}

/* With the perks shared, the tier cards are price-only */
.tier .per { flex: 1; }
