/* Randy Cohen Executive Programs. Most styling sits inline in the templates; this file holds the base and animations. */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: #EEEDE9; color: #221C18;
  font: 400 16px/1.6 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; }
a { color: #7A1F26; text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: #5C141A; }
[hidden] { display: none !important; }
/* Menu links land just below the pinned menu; site.js keeps --rc-head equal to its real height */
section[id] { scroll-margin-top: calc(var(--rc-head, 56px) + 8px); }
@media (max-width: 600px) { section[id] { scroll-margin-top: calc(var(--rc-head, 84px) + 8px); } }

/* Code screen and "Prepared for" screen */
.screen {
  min-height: 100vh; min-height: 100svh; background: #221C18; color: #EEEDE9;
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 64px 16px;
}
.welcome-screen { position: fixed; inset: 0; z-index: 100; animation: rcOut .7s cubic-bezier(.2,.7,.2,1) 2.8s forwards; }
@keyframes rcOut { to { opacity: 0; visibility: hidden; } }

@keyframes rcRule { from { width: 0 } to { width: 120px } }
@keyframes rcFade { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }
.rc-rule { height: 1px; background: #B89B5E; width: 0; margin: 0 auto; animation: rcRule .9s cubic-bezier(.2,.7,.2,1) .2s forwards; }
.rc-f1 { opacity: 0; animation: rcFade .8s cubic-bezier(.2,.7,.2,1) .9s forwards; }
.rc-f2 { opacity: 0; animation: rcFade .9s cubic-bezier(.2,.7,.2,1) 1.25s forwards; }
.rc-f3 { opacity: 0; animation: rcFade .8s cubic-bezier(.2,.7,.2,1) 1.8s forwards; }
.rc-f4 { opacity: 0; animation: rcFade .8s cubic-bezier(.2,.7,.2,1) 2.3s forwards; }
.rc-bar { transition: width 1.1s cubic-bezier(.2,.7,.2,1), background-color .6s; }
.rc-input:focus { outline: none; border-color: #B89B5E; }
.rc-btn:focus-visible, .rc-input:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid #B89B5E; outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rc-rule { animation: none; width: 120px; }
  .rc-f1, .rc-f2, .rc-f3, .rc-f4 { animation: none; opacity: 1; }
  .welcome-screen { animation: rcOut .01s linear 1.5s forwards; }
  .rc-bar { transition: none; }
}

/* "The inspiration for this program": the video stays in view while the text scrolls (desktop) */
@media (min-width: 960px) { .rc-sticky { position: sticky; top: 96px; align-self: flex-start; } }

/* Laptop and desktop: render at 90%, the scale that reads best on a 13-15" screen.
   Full-height screens divide by the same factor so they still fill the window. */
@media (min-width: 1024px) {
  html { zoom: .9; }
  .screen { min-height: calc(100vh / .9); min-height: calc(100svh / .9); }
  .rc-sticky { top: 108px; }
}

/* Sample program calendar: 2, 3 or 6 months per row */
@media (min-width: 640px) { .rc-cal { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
@media (min-width: 1100px) { .rc-cal { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; } }

/* Pinned menu on phones: name, EN/PT and icons on one row, the four links on a second row */
@media (max-width: 600px) {
  .rc-head { gap: 2px 10px !important; padding-top: 6px !important; padding-bottom: 4px !important; }
  .rc-head-r { display: contents !important; }
  .rc-head > a:first-child { flex: 1 1 auto; font-size: 19px !important; }
  .rc-logo-sub { display: none; }
  .rc-lang { order: 1; }
  .rc-book { order: 2; font-size: 0 !important; gap: 0 !important; padding: 0 12px !important; }
  .rc-head-r > :last-child { order: 3; }
  .rc-nav { order: 4; flex: 1 1 100%; flex-wrap: nowrap !important; overflow-x: auto; white-space: nowrap; scrollbar-width: none;
    gap: 6px 12px !important; font-size: 11px !important; letter-spacing: .05em !important; padding: 4px 0 8px; }
  .rc-nav::-webkit-scrollbar { display: none; }
}
