/*!
 * Arete — "My Arete" client center (design: Midnight split)
 * One component, three layouts:
 *   ≥ 960px  desktop: split window (navy brand panel + four destinations)
 *   761–959  tablet: stacked window (navy header on top)
 *   ≤ 760px  phone: bottom sheet that slides up (swipe down or tap outside to close)
 * Everything is scoped to .cc-root. Colours, fonts and easing are variables below.
 */

html.cc-lock { overflow: hidden; }
html.cc-lock body { padding-right: var(--cc-sbw, 0px); }

.cc-root {
  /* brand */
  --cc-navy: #0A2E65;
  --cc-navy-2: #154385;
  --cc-navy-deep: #071E45;
  --cc-gold: #C59D52;
  --cc-gold-light: #E1C58C;
  --cc-gold-pale: #F3E7CC;
  --cc-surface: #F6F8FC;
  --cc-card: #FFFFFF;
  --cc-line: #E3E9F2;
  --cc-line-2: #DCE4EF;
  --cc-tile: #E8F0FA;
  --cc-chip: #F1F5FA;
  --cc-ink: #0C1A33;
  --cc-body: #56637C;
  --cc-muted: #50607A;
  --cc-on-navy: #BFD0EA;
  --cc-on-navy-2: #9FB3D3;
  /* type: set these to your site's own heading serif and body font */
  --cc-serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --cc-sans: 'Work Sans', 'Helvetica Neue', Arial, sans-serif;
  /* motion */
  --cc-ease-out: cubic-bezier(.16, 1, .3, 1);
  --cc-ease-std: cubic-bezier(.2, .8, .2, 1);
  --cc-ease-in: cubic-bezier(.4, 0, 1, 1);
  --cc-ease-sheet: cubic-bezier(.32, .72, 0, 1);

  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: none;
  font-family: var(--cc-sans);
  color: var(--cc-ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}
.cc-root.is-open { display: block; }
.cc-root *, .cc-root *::before, .cc-root *::after { box-sizing: border-box; }
.cc-root p, .cc-root h2, .cc-root ul { margin: 0; padding: 0; }
.cc-root ul { list-style: none; }
.cc-root svg { display: block; flex: none; }
.cc-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------------------------------------------------------------- scrim + window */
.cc-scrim {
  position: absolute;
  inset: 0;
  background: rgba(4, 13, 32, .58);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
  touch-action: none;
}
.cc-frame {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
}
.cc-dialog {
  pointer-events: auto;
  position: relative;
  width: min(1100px, 100%);
  max-height: 100%;
  display: flex;
  border-radius: 28px;
  overflow: hidden;
  background: var(--cc-surface);
  box-shadow: 0 60px 120px -30px rgba(2, 8, 24, .70), 0 0 0 1px rgba(255, 255, 255, .07);
  outline: none;
}

/* ---------------------------------------------------------------- navy brand panel */
.cc-brand {
  position: relative;
  flex: none;
  width: 420px;
  padding: 48px 44px 46px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  color: #FFFFFF;
  background: radial-gradient(120% 85% at 12% 0%, var(--cc-navy-2) 0%, var(--cc-navy) 40%, var(--cc-navy-deep) 78%);
}
.cc-chart { position: absolute; left: 0; top: 0; pointer-events: none; }
.cc-chart .cc-draw { stroke-dasharray: 1; stroke-dashoffset: 0; }
.cc-dot { transform-box: fill-box; transform-origin: center; }
.cc-logo { position: relative; display: block; width: auto; height: 28px; align-self: flex-start; }
.cc-head { position: relative; display: flex; flex-direction: column; }
.cc-grabber { display: none; }
.cc-eyebrow { font-size: 12.5px; font-weight: 600; line-height: 1.2; letter-spacing: .24em; color: var(--cc-gold-light); }
.cc-title {
  margin-top: 18px;
  font-family: var(--cc-serif);
  font-weight: 500;
  font-size: 58px;
  line-height: 1;
  letter-spacing: -.025em;
  color: #FFFFFF;
}
.cc-line { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.cc-line > span { display: block; }
.cc-rule { width: 56px; height: 3px; border-radius: 2px; background: var(--cc-gold); margin-top: 26px; transform-origin: left center; }
.cc-sub { margin-top: 22px; max-width: 322px; font-size: 16px; line-height: 1.65; color: var(--cc-on-navy); text-wrap: balance; }

.cc-help { position: relative; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.5; }
.cc-help > span { color: var(--cc-on-navy-2); }
.cc-help a {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--cc-gold-light);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 320ms var(--cc-ease-out), color 200ms;
}
.cc-help a:hover { color: var(--cc-gold-pale); background-size: 100% 1px; }
.cc-help--sheet { display: none; }

/* ---------------------------------------------------------------- the four destinations */
.cc-main { position: relative; flex: 1; min-width: 0; padding: 78px 32px 36px; overflow: auto; overscroll-behavior: contain; }
.cc-close {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 21px;
  border: 1px solid var(--cc-line-2);
  background: #FFFFFF;
  color: var(--cc-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font: inherit;
  transition: background-color 200ms, border-color 200ms;
}
.cc-close svg { transition: transform 360ms var(--cc-ease-out); }
.cc-close:hover { background: #EEF3FA; border-color: #C9D6E8; }
.cc-close:hover svg { transform: rotate(90deg); }

.cc-list { display: flex; flex-direction: column; gap: 12px; }
.cc-dest {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 20px;
  min-height: 112px;
  padding: 20px 22px 20px 20px;
  border-radius: 18px;
  border: 1px solid var(--cc-line);
  background: var(--cc-card);
  color: var(--cc-ink);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 240ms var(--cc-ease-std), box-shadow 240ms var(--cc-ease-std), border-color 240ms var(--cc-ease-std), background-color 160ms;
}
.cc-dest::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 260ms;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), rgba(197, 157, 82, .13), rgba(197, 157, 82, 0) 70%);
}
.cc-tile {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--cc-tile);
  color: var(--cc-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 240ms, color 240ms, transform 360ms var(--cc-ease-out);
}
.cc-tile svg { width: 26px; height: 26px; }
.cc-acc { stroke: var(--cc-gold); transition: stroke 240ms; }
.cc-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cc-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.cc-name { font-size: 18px; font-weight: 600; line-height: 1.25; letter-spacing: -.005em; }
.cc-chip {
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  color: var(--cc-muted);
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--cc-line);
  background: var(--cc-chip);
  transition: color 240ms, border-color 240ms, background-color 240ms;
}
.cc-desc { display: block; font-size: 14.5px; line-height: 1.55; color: var(--cc-body); }
.cc-desc--short { display: none; }
.cc-opening { display: none; font-size: 14.5px; line-height: 1.55; font-weight: 500; color: var(--cc-navy); }
.cc-go {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 22px;
  border: 1px solid var(--cc-line-2);
  color: var(--cc-navy);
  overflow: hidden;
  transition: background-color 240ms, border-color 240ms, color 240ms;
}
.cc-arr { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; transition: transform 420ms var(--cc-ease-out); }
.cc-arr svg { width: 16px; height: 16px; }
.cc-arr2 { transform: translate(-130%, 130%); }
.cc-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cc-gold), var(--cc-gold-light));
  transform: scaleX(0);
  transform-origin: left center;
}

/* hover (only on devices that really hover) */
@media (hover: hover) {
  .cc-dest:hover { transform: translateY(-2px); border-color: rgba(197, 157, 82, .62); box-shadow: 0 22px 44px -22px rgba(10, 46, 101, .40), 0 2px 8px rgba(10, 46, 101, .06); }
  .cc-dest:hover::before { opacity: 1; }
  .cc-dest:hover .cc-tile { background: var(--cc-navy); color: var(--cc-gold-light); transform: scale(1.05); }
  .cc-dest:hover .cc-acc { stroke: #FFFFFF; }
  .cc-dest:hover .cc-chip { color: var(--cc-navy); border-color: #CFDAEA; background: #FFFFFF; }
  .cc-dest:hover .cc-go { background: var(--cc-gold); border-color: var(--cc-gold); color: var(--cc-navy-deep); }
  .cc-dest:hover .cc-arr1 { transform: translate(130%, -130%); }
  .cc-dest:hover .cc-arr2 { transform: none; }
}
.cc-dest:active { transform: scale(.995); transition-duration: 90ms; }

/* keyboard focus */
.cc-dest:focus-visible { outline: 2px solid var(--cc-navy); outline-offset: 3px; border-color: rgba(197, 157, 82, .62); }
.cc-dest:focus-visible .cc-tile { background: var(--cc-navy); color: var(--cc-gold-light); }
.cc-dest:focus-visible .cc-acc { stroke: #FFFFFF; }
.cc-dest:focus-visible .cc-go { background: var(--cc-gold); border-color: var(--cc-gold); color: var(--cc-navy-deep); }
.cc-close:focus-visible { outline: 2px solid var(--cc-navy); outline-offset: 3px; }
.cc-help a:focus-visible { outline: 2px solid var(--cc-gold-light); outline-offset: 3px; border-radius: 2px; }
.cc-dialog:focus-visible { outline: none; }

/* "Opening Canopy…" while the portal loads */
.cc-dest.is-launching .cc-desc { display: none; }
.cc-dest.is-launching .cc-opening { display: block; }
.cc-dest.is-launching .cc-tile { background: var(--cc-navy); color: var(--cc-gold-light); }
.cc-dest.is-launching .cc-acc { stroke: #FFFFFF; }
.cc-dest.is-launching .cc-go { background: var(--cc-gold); border-color: var(--cc-gold); color: var(--cc-navy-deep); }
.cc-dest.is-launching .cc-arr1 { transform: translate(130%, -130%); }
.cc-dest.is-launching .cc-arr2 { transform: none; }
.cc-dest.is-launching .cc-progress { animation: cc-progress 1150ms var(--cc-ease-std) forwards; }

/* ---------------------------------------------------------------- opening + closing choreography */
@keyframes cc-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cc-fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes cc-rise { from { opacity: 0; transform: translateY(28px) scale(.975); } to { opacity: 1; transform: none; } }
@keyframes cc-drop { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(10px) scale(.985); } }
@keyframes cc-fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes cc-line-up { from { transform: translateY(108%); } to { transform: none; } }
@keyframes cc-rule { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes cc-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes cc-slide-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes cc-pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes cc-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes cc-sheet-in { from { transform: translateY(100%); } to { transform: none; } }
@keyframes cc-sheet-out { from { transform: translateY(var(--cc-drag, 0px)); } to { transform: translateY(100%); } }
@keyframes cc-row-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* entrances use fill-mode "backwards", so hover and focus states take over the moment they finish */
.cc-root.is-open .cc-scrim { animation: cc-fade 320ms ease-out backwards; }
.cc-root.is-open .cc-dialog { animation: cc-rise 680ms var(--cc-ease-out) 60ms backwards; }
.cc-root.is-open .cc-logo { animation: cc-fade 600ms ease-out 160ms backwards; }
.cc-root.is-open .cc-eyebrow { animation: cc-fade-up 520ms var(--cc-ease-out) 200ms backwards; }
.cc-root.is-open .cc-line > span { animation: cc-line-up 760ms var(--cc-ease-out) 240ms backwards; }
.cc-root.is-open .cc-line + .cc-line > span { animation-delay: 310ms; }
.cc-root.is-open .cc-rule { animation: cc-rule 760ms var(--cc-ease-out) 460ms backwards; }
.cc-root.is-open .cc-sub { animation: cc-fade-up 600ms var(--cc-ease-out) 520ms backwards; }
.cc-root.is-open .cc-help { animation: cc-fade-up 560ms var(--cc-ease-out) 780ms backwards; }
.cc-root.is-open .cc-chart .cc-draw { animation: cc-draw 1500ms var(--cc-ease-std) 540ms backwards; }
.cc-root.is-open .cc-chart .cc-ticks { animation: cc-fade 700ms ease-out 1100ms backwards; }
.cc-root.is-open .cc-chart .cc-dot { animation: cc-pop 520ms var(--cc-ease-out) 1820ms backwards; }
.cc-root.is-open .cc-dest { animation: cc-slide-in 620ms var(--cc-ease-out) backwards; }
.cc-root.is-open .cc-list > li:nth-child(1) .cc-dest { animation-delay: 320ms; }
.cc-root.is-open .cc-list > li:nth-child(2) .cc-dest { animation-delay: 380ms; }
.cc-root.is-open .cc-list > li:nth-child(3) .cc-dest { animation-delay: 440ms; }
.cc-root.is-open .cc-list > li:nth-child(4) .cc-dest { animation-delay: 500ms; }
.cc-root.is-open .cc-close { animation: cc-pop 460ms var(--cc-ease-out) 600ms backwards; }
.cc-root.is-closing .cc-scrim { animation: cc-fade-out 220ms ease-in forwards; }
.cc-root.is-closing .cc-dialog { animation: cc-drop 200ms var(--cc-ease-in) forwards; }

/* ---------------------------------------------------------------- tablet: stacked window */
@media (max-width: 959px) {
  .cc-dialog { flex-direction: column; width: min(640px, 100%); }
  .cc-brand {
    width: auto;
    padding: 24px 32px 28px;
    gap: 0;
    justify-content: flex-start;
    background: radial-gradient(120% 120% at 10% 0%, var(--cc-navy-2) 0%, var(--cc-navy) 45%, var(--cc-navy-deep) 85%);
  }
  .cc-root .cc-chart, .cc-root .cc-logo, .cc-root .cc-help--panel { display: none; }
  .cc-main { position: static; } /* so the × sits on the navy header (positioned against the window) */
  .cc-eyebrow { min-height: 44px; display: flex; align-items: center; padding-right: 56px; }
  .cc-title { margin-top: 4px; font-size: 46px; }
  .cc-line { display: inline-block; vertical-align: top; }
  .cc-rule { margin-top: 20px; }
  .cc-sub { margin-top: 16px; max-width: 520px; font-size: 15.5px; }
  .cc-main { padding: 20px 24px 8px; }
  .cc-close { top: 24px; right: 24px; width: 44px; height: 44px; border-radius: 22px; border-color: rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .10); color: #FFFFFF; }
  .cc-close:hover { background: rgba(255, 255, 255, .20); border-color: rgba(255, 255, 255, .28); }
  .cc-close:focus-visible { outline-color: var(--cc-gold-light); }
  .cc-help--sheet { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 8px; padding: 6px 24px 18px; font-size: 14px; }
  .cc-help--sheet > span { color: var(--cc-body); }
  .cc-help--sheet a { align-self: center; min-height: 44px; color: var(--cc-navy); }
  .cc-help--sheet a:hover { color: var(--cc-navy-deep); }
  .cc-help--sheet a:focus-visible { outline-color: var(--cc-navy); }
}

/* ---------------------------------------------------------------- phone: bottom sheet */
@media (max-width: 760px) {
  .cc-frame { align-items: flex-end; padding: 0; }
  .cc-dialog {
    width: 100%;
    max-height: calc(100% - 40px);
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -24px 60px -20px rgba(0, 0, 0, .6);
  }
  .cc-brand { padding: 12px 24px 24px; touch-action: none; cursor: grab; }
  .cc-grabber { display: block; width: 40px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .32); margin: 0 auto 4px; }
  .cc-eyebrow { font-size: 11.5px; }
  .cc-title { margin-top: 2px; font-size: 36px; line-height: 1.05; letter-spacing: -.02em; }
  .cc-rule { width: 44px; margin-top: 16px; }
  .cc-sub { margin-top: 14px; max-width: none; font-size: 14.5px; line-height: 1.55; }
  .cc-close { top: 21px; right: 16px; }
  .cc-main { padding: 16px 16px 0; }
  .cc-list { gap: 10px; }
  .cc-dest { grid-template-columns: 44px minmax(0, 1fr) 32px; gap: 14px; min-height: 100px; padding: 14px; border-radius: 16px; }
  .cc-dest:active { transform: scale(.98); background: #EEF3FA; }
  .cc-tile { width: 44px; height: 44px; border-radius: 13px; }
  .cc-tile svg { width: 22px; height: 22px; }
  .cc-text { gap: 3px; }
  .cc-title-row { flex-direction: column-reverse; align-items: flex-start; gap: 3px; }
  .cc-name { font-size: 15.5px; line-height: 1.3; }
  .cc-chip { padding: 0; border: 0; background: none; font-size: 10.5px; line-height: 1.3; letter-spacing: .14em; text-transform: uppercase; color: #6A768C; }
  .cc-desc, .cc-opening { font-size: 13.5px; line-height: 1.45; }
  .cc-desc--long { display: none; }
  .cc-desc--short { display: block; }
  .cc-go { width: 32px; height: 32px; border-radius: 16px; }
  .cc-arr svg { width: 13px; height: 13px; }
  .cc-help--sheet { padding: 4px 24px calc(14px + env(safe-area-inset-bottom, 0px)); font-size: 13.5px; }

  .cc-root.is-open .cc-scrim { animation: cc-fade 400ms ease-out backwards; }
  .cc-root.is-open .cc-dialog { animation: cc-sheet-in 560ms var(--cc-ease-sheet) backwards; }
  .cc-root.is-open .cc-line > span, .cc-root.is-open .cc-line + .cc-line > span { animation: cc-fade-up 560ms var(--cc-ease-out) 260ms backwards; }
  .cc-root.is-open .cc-rule { animation-delay: 380ms; }
  .cc-root.is-open .cc-sub { animation-delay: 420ms; }
  .cc-root.is-open .cc-eyebrow { animation-delay: 220ms; }
  .cc-root.is-open .cc-dest { animation-name: cc-row-up; animation-duration: 520ms; }
  .cc-root.is-open .cc-list > li:nth-child(1) .cc-dest { animation-delay: 300ms; }
  .cc-root.is-open .cc-list > li:nth-child(2) .cc-dest { animation-delay: 350ms; }
  .cc-root.is-open .cc-list > li:nth-child(3) .cc-dest { animation-delay: 400ms; }
  .cc-root.is-open .cc-list > li:nth-child(4) .cc-dest { animation-delay: 450ms; }
  .cc-root.is-open .cc-help { animation: cc-fade 500ms ease-out 560ms backwards; }
  .cc-root.is-open .cc-close { animation: cc-fade 400ms ease-out 300ms backwards; }
  .cc-root.is-closing .cc-scrim { animation: cc-fade-out 260ms ease-in forwards; }
  .cc-root.is-closing .cc-dialog { animation: cc-sheet-out 280ms var(--cc-ease-in) forwards; }
  .cc-root.is-dragging .cc-brand { cursor: grabbing; }
}

/* ---------------------------------------------------------------- reduced motion: short fades, nothing moves */
@media (prefers-reduced-motion: reduce) {
  .cc-root *, .cc-root *::before, .cc-root *::after {
    animation-delay: 0s !important;
    animation-duration: 160ms !important;
    transition-duration: 0s !important;
  }
  @keyframes cc-rise { from { opacity: 0; } to { opacity: 1; } }
  @keyframes cc-drop { from { opacity: 1; } to { opacity: 0; } }
  @keyframes cc-fade-up { from { opacity: 0; } to { opacity: 1; } }
  @keyframes cc-line-up { from { opacity: 0; } to { opacity: 1; } }
  @keyframes cc-rule { from { opacity: 0; } to { opacity: 1; } }
  @keyframes cc-draw { from { opacity: 0; } to { opacity: 1; } }
  @keyframes cc-slide-in { from { opacity: 0; } to { opacity: 1; } }
  @keyframes cc-pop { from { opacity: 0; } to { opacity: 1; } }
  @keyframes cc-sheet-in { from { opacity: 0; } to { opacity: 1; } }
  @keyframes cc-sheet-out { from { opacity: 1; } to { opacity: 0; } }
  @keyframes cc-row-up { from { opacity: 0; } to { opacity: 1; } }
  .cc-dest:hover, .cc-dest:active, .cc-dest:hover .cc-tile { transform: none !important; }
}
