@import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;1,400&family=Raleway:ital,wght@0,300;0,400;0,500;0,600;0,700;1,700&display=swap");

/* Red Horizon components — class-based, token-driven. Every value is a token from tokens.css. */

.rh {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 26px;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}
.rh *, .rh *::before, .rh *::after { box-sizing: border-box; }
.rh ::selection { background: var(--accent); color: var(--on-accent); }
.rh a { color: var(--accent-text); text-decoration: none; }
.rh a:hover { color: var(--ink-heading); }
.rh :focus-visible { outline: var(--size-rule-weight) solid var(--focus); outline-offset: 2px; }

/* Icon: a brand glyph (uploaded SVG) painted in currentColor via mask. Set --icon:url(...) */
.rh-icon {
  display: inline-block;
  width: 1em; height: 1em;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
          mask: var(--icon) center / contain no-repeat;
  vertical-align: middle;
}

/* Button ------------------------------------------------------------ */
.rh-button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-10);
  height: var(--size-control);
  padding: 0 var(--space-22);
  margin: var(--space-5);
  border: 0; border-radius: var(--radius-0);
  font-family: var(--font-body);
  font-size: 14px; font-weight: 600; line-height: var(--size-control);
  letter-spacing: 1px; text-transform: uppercase; white-space: nowrap;
  background: var(--accent); color: var(--on-accent);
  cursor: pointer;
  transition: background-color .2s ease-in-out, color .2s ease-in-out, box-shadow .2s ease-in-out;
}
.rh a.rh-button, .rh a.rh-button:hover { color: var(--on-accent); }
.rh-button:hover { background: var(--neutral-700); }
.rh-button--dark { background: var(--neutral-700); }
.rh-button--dark:hover { background: var(--accent); }
.rh-button--light { background: var(--neutral-100); color: var(--neutral-800); }
.rh .rh-button--light:hover { background: var(--neutral-700); color: var(--white); }
.rh-button--border { background: transparent; color: var(--ink-heading); box-shadow: inset 0 0 0 2px var(--ink-heading); }
.rh .rh-button--border:hover { background: var(--accent); color: var(--on-accent); box-shadow: inset 0 0 0 2px var(--accent); }
.rh-button--small { height: 30px; line-height: 30px; padding: 0 var(--space-15); font-size: 12px; }
.rh-button--large { height: 48px; line-height: 48px; padding: 0 var(--space-30); font-size: 16px; }
.rh-button[disabled] { opacity: .5; cursor: not-allowed; }

/* HeadingBlock ------------------------------------------------------ */
.rh-heading { margin: 0 0 var(--space-50); }
.rh-heading h2, .rh-heading h1, .rh-heading h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 32px; font-weight: 700; line-height: 1.15;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--ink-heading);
}
.rh-heading h2 span, .rh-heading h1 span { color: var(--accent-text); }
.rh-heading__sub {
  display: block; margin-top: var(--space-10);
  font-family: var(--font-body); font-size: 20px; font-weight: 300; line-height: 1.45;
  color: var(--ink-muted);
}
.rh-heading::after {
  content: ""; display: block;
  margin-top: var(--space-20);
  width: var(--size-rule-width);
  border-top: var(--size-rule-weight) solid var(--rule);
}
.rh-heading--center { text-align: center; }
.rh-heading--center::after { margin-left: auto; margin-right: auto; }
.rh-heading--plain::after { display: none; }

/* Eyebrow: uppercase kicker above a title (replaces the Crete Round italic kicker) */
.rh-eyebrow {
  display: block; margin: 0 0 var(--space-10);
  font-family: var(--font-display); font-size: 13px; font-weight: 600; line-height: 1.4;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--accent-text);
}

/* Text mark: a platform name set in type where no official mark is supplied (X) */
.rh-mark { font-family: var(--font-display); font-weight: 700; font-style: normal; line-height: 1; }

/* FancyTitle -------------------------------------------------------- */
.rh-fancy-title { margin: 0 0 var(--space-30); }
.rh-fancy-title h4 {
  margin: 0; padding: 0 0 var(--space-10);
  border-bottom: var(--size-rule-weight) solid var(--accent);
  font-family: var(--font-display);
  font-size: 20px; font-weight: 700; line-height: 1.3;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--ink-heading);
}
.rh-fancy-title h4 span { color: var(--accent-text); }

/* FeatureBox -------------------------------------------------------- */
.rh-feature { position: relative; padding-left: 80px; }
.rh-feature__icon {
  position: absolute; left: 0; top: 0;
  font-size: var(--size-icon-feature); line-height: 1;
  color: var(--accent-text);
}
.rh-feature h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16px; font-weight: 700; line-height: 1.4;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--ink-heading);
}
.rh-feature p { margin: var(--space-10) 0 0; color: var(--ink); }

/* ContactCard ------------------------------------------------------- */
.rh-contact {
  position: relative;
  margin-top: 68px;
  padding: 68px var(--space-30) var(--space-30);
  text-align: center;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-5);
}
.rh-contact__icon {
  position: absolute; top: -48px; left: 50%; margin-left: -48px;
  width: var(--size-icon-card); height: var(--size-icon-card);
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-round);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  font-size: 42px; color: var(--accent-text);
}
.rh-contact h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16px; font-weight: 700; line-height: 1.4;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--ink-heading);
}
.rh-contact__sub {
  display: block; margin-top: var(--space-5);
  font-family: var(--font-display); font-size: 16px; font-weight: 300;
  letter-spacing: 0; text-transform: none;
}

/* PortfolioItem ----------------------------------------------------- */
.rh-work { display: block; max-width: 280px; }
.rh-work__media { position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: var(--black); }
.rh-work__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.rh-work__overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--overlay);
  opacity: 0; transition: opacity .4s ease;
}
.rh-work__go {
  width: var(--size-control); height: var(--size-control);
  display: flex; align-items: center; justify-content: center;
  background: var(--neutral-50); color: var(--neutral-800);
  font-size: 18px;
}
.rh-work:hover .rh-work__overlay, .rh-work:focus-within .rh-work__overlay, .rh-work--hover .rh-work__overlay { opacity: 1; }
.rh-work:hover .rh-work__go { color: var(--red); }
.rh-work__desc { padding: var(--space-15) var(--space-5) var(--space-10); text-align: center; }
.rh-work__desc h3 {
  margin: 0;
  font-family: var(--font-display); font-size: 19px; font-weight: 600; line-height: 1.3;
}
.rh .rh-work__desc h3 a { color: var(--ink-heading); }
.rh .rh-work__desc h3 a:hover { color: var(--accent-text); }
.rh-work__desc span { display: block; margin-top: 3px; font-size: 14px; line-height: 22px; color: var(--ink-muted); }

/* Hero -------------------------------------------------------------- */
.rh-hero {
  position: relative;
  display: flex; align-items: center;
  min-height: 420px;
  padding: var(--space-60);
  background-color: var(--black);
  background-size: cover; background-position: center;
  color: var(--white);
}
.rh-hero h2 {
  margin: 0; max-width: 620px;
  font-family: var(--font-display);
  font-size: 60px; font-weight: 700; line-height: .95;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--white);
}
.rh-hero p { margin: var(--space-30) 0 0; max-width: 460px; font-size: 16px; line-height: 1.6; color: var(--neutral-300); }

/* QuoteBand --------------------------------------------------------- */
.rh-quote {
  padding: var(--space-125) var(--space-20);
  background-color: var(--black);
  background-size: cover; background-position: center;
}
.rh-quote__plate {
  margin: 0 auto; max-width: 720px;
  padding: var(--space-20);
  text-align: center;
  background: var(--scrim);
  border-radius: var(--radius-5);
}
.rh-quote__plate h2 {
  margin: 0;
  font-family: var(--font-display); font-size: 32px; font-weight: 700; line-height: 1.15;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--neutral-800);
}
.rh-quote__plate cite {
  display: block; margin-top: var(--space-15);
  font-family: var(--font-display); font-size: 14px; font-weight: 600; font-style: normal; line-height: 1.4;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--neutral-800);
}

/* Header / PrimaryNav ----------------------------------------------- */
.rh-header {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-30);
  padding: 0 var(--space-30);
  min-height: 100px;
  background: transparent;
}
.rh-header__logo img { display: block; height: 60px; width: auto; }
.rh-nav { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.rh-nav a {
  display: block; padding: 39px var(--space-15);
  font-family: var(--font-display); font-size: 13px; font-weight: 700; line-height: 22px;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--ink-heading);
  transition: color .2s ease;
}
.rh .rh-nav a:hover, .rh .rh-nav a[aria-current="true"] { color: var(--accent-text); }

/* Footer ------------------------------------------------------------ */
.rh-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-20);
  padding: var(--space-40) var(--space-30);
  background: var(--surface-alt);
  font-size: 14px; line-height: 1.7;
  color: var(--ink);
}
.rh-footer strong { color: var(--ink-heading); font-weight: 600; }
.rh-footer__social { display: flex; gap: var(--space-15); justify-content: flex-end; font-size: 16px; }
.rh .rh-footer a { color: var(--ink); }
.rh .rh-footer a:hover { color: var(--accent-text); }
.rh .rh-contact__sub { color: var(--ink-heading); }
.rh .rh-contact__sub:hover { color: var(--accent-text); }

/* QuoteBand, spectrum variant: colorful imagery, dark plate, white type, spectrum rule */
.rh-quote--spectrum .rh-quote__plate {
  background: var(--scrim-dark);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.rh-quote--spectrum .rh-quote__plate h2 { color: var(--white); }
.rh-quote--spectrum .rh-quote__plate cite { color: var(--neutral-300); }
.rh-quote--spectrum .rh-quote__plate h2::after {
  content: ""; display: block; width: var(--size-rule-width); height: var(--size-rule-weight);
  margin: var(--space-20) auto 0;
  background: linear-gradient(90deg, var(--spectrum-crimson), var(--spectrum-magenta), var(--spectrum-violet), var(--spectrum-blue), var(--spectrum-cyan));
}

/* Gallery: one large 16:9 stage, prev/next, counter, thumbnail strip. Behavior: RedHorizon.mountGalleries() */
.rh-gallery:focus-within { outline: none; }
.rh-gallery__stage { position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: var(--black); }
.rh-gallery__image { display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity .3s ease; }
.rh-gallery__image.is-fading { opacity: .35; }
.rh-gallery__prev, .rh-gallery__next {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border: 0; border-radius: var(--radius-0);
  display: flex; align-items: center; justify-content: center;
  background: var(--overlay); color: var(--white); font-size: 18px; cursor: pointer;
  transition: background-color .2s ease-in-out;
}
.rh-gallery__prev { left: var(--space-15); }
.rh-gallery__next { right: var(--space-15); }
.rh-gallery__prev .rh-icon { transform: scaleX(-1); }
.rh-gallery__prev:hover, .rh-gallery__next:hover { background: var(--accent); }
.rh-gallery__count {
  position: absolute; left: var(--space-15); bottom: var(--space-15);
  padding: 4px var(--space-10); background: var(--overlay); color: var(--white);
  font-family: var(--font-display); font-size: 13px; font-weight: 600; line-height: 1.4; letter-spacing: 3px;
}
.rh-gallery__thumbs {
  list-style: none; margin: var(--space-10) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: var(--space-10);
}
.rh-gallery__thumb {
  position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: var(--radius-0);
  aspect-ratio: 16 / 9; background: var(--black); cursor: pointer; opacity: .5; transition: opacity .2s ease;
}
.rh-gallery__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rh-gallery__thumb::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: transparent; }
.rh-gallery__thumb:hover { opacity: .85; }
.rh-gallery__thumb[aria-current="true"] { opacity: 1; }
.rh-gallery__thumb[aria-current="true"]::after { background: var(--accent); }

/* ProjectMeta: label / value rows between hairlines */
.rh-meta { margin: 0; }
.rh-meta > div {
  display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: var(--space-20);
  padding: var(--space-15) 0; border-top: 1px solid var(--border);
}
.rh-meta > div:last-child { border-bottom: 1px solid var(--border); }
.rh-meta dt {
  margin: 0; padding-top: 3px;
  font-family: var(--font-display); font-size: 13px; font-weight: 600; line-height: 1.4;
  letter-spacing: 3px; text-transform: uppercase; color: var(--ink-muted);
}
.rh-meta dd { margin: 0; font-weight: 600; color: var(--ink-heading); overflow-wrap: anywhere; }
