/* Berecons — tokens, reset, shared type and controls */

:root {
  /* Palette: Rotary brand colours on a dark charcoal base; turquoise matches the logo. */
  --surface: #242528;         /* dark charcoal: main background, lets the accents pop */
  --surface-deep: #1b1c1e;    /* darkest step, for text on light controls */
  --charcoal: #54565a;        /* Rotary Charcoal: details, cards, rules */
  --white: #ffffff;
  --grey: #b1b1b1;            /* Rotary Smoke */
  --grey-light: #d0cfcd;      /* Rotary Silver */
  --turquoise: #38cebb;       /* logo turquoise */
  --yellow: #f7a81b;          /* Rotary Gold */
  --blue: #17458f;            /* Rotary Royal Blue */

  --on-dark-muted: rgba(255, 255, 255, 0.74);
  --on-dark-line: rgba(255, 255, 255, 0.22);

  --font-sans: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 2.5vw, 36px);
  /* Content edge shared by every section: full width up to --max, then centred */
  --max: 1560px;
  --edge: max(var(--gutter), calc((100% - var(--max)) / 2));
  --header-h: 96px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-reveal: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--turquoise);
  outline-offset: 3px;
}

/* hidden always wins over component display rules */
[hidden] {
  display: none !important;
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--white);
  color: var(--surface-deep);
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: none;
}

/* Pill + dot button: label and arrow are separate shapes that move together */
.btn {
  --btn-h: 52px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.btn__label {
  display: inline-flex;
  align-items: center;
  height: var(--btn-h);
  padding: 0 calc(var(--btn-h) * 0.46);
  border-radius: 999px;
  background: var(--white);
  color: var(--surface-deep);
  white-space: nowrap;
  transition: background-color 0.4s var(--ease-out);
}

.btn__dot {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  width: var(--btn-h);
  height: var(--btn-h);
  border-radius: 50%;
  background: var(--turquoise);
  color: var(--surface-deep);
  transition: background-color 0.3s ease;
}

/* Arrow swap: the arrow leaves to the top-right while its twin arrives from the bottom-left */
.btn__dot svg {
  grid-area: 1 / 1;
  transition: transform 0.3s ease;
}

.btn__dot svg + svg {
  transform: translate(-150%, 150%);
}

.btn:hover .btn__label,
.btn:focus-visible .btn__label {
  background: var(--turquoise);
}

.btn:hover .btn__dot,
.btn:focus-visible .btn__dot {
  background: var(--white);
}

.btn:hover .btn__dot svg:first-child,
.btn:focus-visible .btn__dot svg:first-child {
  transform: translate(150%, -150%);
}

.btn:hover .btn__dot svg + svg,
.btn:focus-visible .btn__dot svg + svg {
  transform: none;
}

/* Gold arrow circle used on cards; the card decides when it swaps */
.arrow-dot {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--surface-deep);
  transition: background-color 0.3s ease;
}

.arrow-dot svg {
  grid-area: 1 / 1;
  transition: transform 0.3s ease;
}

.arrow-dot svg + svg {
  transform: translate(-150%, 150%);
}

.btn--sm {
  --btn-h: 42px;
  font-size: 15px;
}

.text-link {
  position: relative;
  display: inline-flex;
  gap: 0.4em;
  padding: 4px 0;
  font-weight: 500;
  text-decoration: none;
  color: var(--white);
}

.text-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  opacity: 0.4;
  transform-origin: left;
  transition: opacity 0.3s ease;
}

.text-link:hover::after {
  opacity: 1;
}

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