/* ==========================================================================
   vanschaijk.eu — site styles
   Loaded after Bootstrap 5.3; only overrides and custom components live here.
   ========================================================================== */

/* scroll-behavior belongs on the scroll container (html), not body. */
html { scroll-behavior: smooth; }

body {
  font-family: 'Open Sans', sans-serif;
  background-color: #f4f4f4;
}

h1, h2, h3, h4, h5 { font-family: 'Montserrat', sans-serif; }

/* Fixed navbar needs matching scroll offset for the in-page anchors. */
:target { scroll-margin-top: 90px; }

/* --- Navbar --------------------------------------------------------------- */
.navbar {
  background: linear-gradient(90deg, #001F3F, #003366);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.navbar a { color: #fff !important; font-weight: 500; }
.navbar .nav-link.active { color: #FFD700 !important; font-weight: 700; }

/* --- Hero carousel ------------------------------------------------------- */
#heroCarousel .carousel-item {
  height: 40vh;
  background-size: cover;
  background-position: center;
  position: relative;
}
#heroCarousel .overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.55);
}
#heroCarousel .carousel-item .container { position: relative; z-index: 2; }
#heroCarousel .carousel-heading, #heroCarousel .carousel-lead {
  color: #fff !important;
  font-weight: 900 !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.85);
}
#heroCarousel .carousel-heading { font-size: 2.4rem; letter-spacing: 1px; margin-bottom: .5rem; }
#heroCarousel .carousel-lead { font-size: 1.2rem; font-weight: 500; }

/* Pause/play control for the auto-advancing carousel (WCAG 2.2.2). */
#heroCarousel .carousel-pause {
  position: absolute;
  bottom: 12px; right: 12px;
  z-index: 3;
  width: 38px; height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 0.85rem;
  cursor: pointer;
}
#heroCarousel .carousel-pause:hover,
#heroCarousel .carousel-pause:focus-visible {
  background: rgba(0, 0, 0, 0.7);
  outline: 2px solid #FFD700;
  outline-offset: 2px;
}

/* --- Links & buttons ----------------------------------------------------- */
.linkedin-link {
  color: #0A66C2;
  background: #fff;
  padding: 8px 10px;
  border-radius: 50%;
  font-size: 1.1rem;
  margin-left: 10px;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.linkedin-link:hover {
  background: #0A66C2;
  color: #fff;
  box-shadow: 0 0 12px rgba(10, 102, 194, 0.7);
}

.btn-glossy {
  background: linear-gradient(135deg, #FFD700, #FFC300);
  color: #001F3F;
  border: none;
  border-radius: 30px;
  padding: 12px 28px;
  font-weight: 700;
  transition: all 0.25s ease;
}
.btn-glossy:hover {
  background: linear-gradient(135deg, #FFC300, #FFD700);
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
  color: #001F3F;
}

/* --- Sections & cards ---------------------------------------------------- */
section { padding: 60px 0; }

/* The closing section butts up against the footer, so it gets a deeper base.
   Tied to :last-of-type rather than #contact so reordering keeps it right. */
body > section:last-of-type { padding-bottom: 100px; }

.card-section {
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  padding: 30px;
  margin-bottom: 30px;
}

/* --- Hero card (tunable photo size/position via custom properties) -------- */
.hero-card {
  --radius: 22px;
  --hero-size: cover;
  --hero-pos: center 30%;
  min-height: clamp(260px, 28vw, 380px);
  position: relative;
  padding: 56px 28px 72px;
  border-radius: var(--radius);
  overflow: hidden;
  color: #fff;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35) inset, 0 8px 32px rgba(0, 0, 0, 0.25);

  /* Gradient first (always full cover), photo second (resizable). */
  background-image:
    linear-gradient(180deg, rgba(5, 16, 32, 0.35), rgba(5, 16, 32, 0.55)),
    var(--hero-img);
  background-size: 100% 100%, var(--hero-size);
  background-position: center, var(--hero-pos);
  background-repeat: no-repeat, no-repeat;
}

.hero-card .btn.btn-cta {
  background-color: #ffc107 !important;
  color: #0f2742 !important;
  border: none !important;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(255, 193, 7, 0.35);
  text-decoration: none;
  margin-top: 8px;
}

.hero-card .hero-inner h1 {
  font-size: clamp(40px, 6.5vw, 72px);
  line-height: 1.05;
  letter-spacing: 0.2px;
}
.hero-card .hero-inner h2 {
  font-size: clamp(24px, 3.6vw, 42px);
  font-weight: 800;
  margin-bottom: 10px;
}
.hero-card .hero-inner p {
  font-size: clamp(16px, 2.2vw, 22px);
  opacity: 0.95;
}

/* --- Timeline ------------------------------------------------------------ */
.timeline {
  position: relative;
  margin-left: 40px;
  padding-left: 20px;
  border-left: 3px solid #003366;
}
.timeline-item { margin-bottom: 30px; position: relative; }
.timeline-year {
  position: absolute;
  left: -60px; top: 0;
  background: #FFD700;
  color: #003366;
  font-weight: bold;
  padding: 5px 10px;
  border-radius: 20px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
}
.timeline-content {
  background: #fff;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* --- Press -------------------------------------------------------------- */
#press .card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}
#press .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}
#press img { border-radius: 4px; }
#press .btn-glossy { border-radius: 30px; }
.object-fit-cover { object-fit: cover; }

/* --- Sticky notes ------------------------------------------------------- */
.sticky-wall {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  /* Generous gap: the notes are rotated and must not clip each other. */
  gap: 2.75rem 2rem;
  max-width: 1000px;
  margin-inline: auto;
  padding-top: 12px;
  /* Rotating a note widens its bounding box by roughly h*sin(tilt)/2 per side,
     which grows with the height of the quote. This reserve keeps a tall note on
     a narrow phone from bleeding past the viewport and causing a sideways
     scrollbar. Measured worst case at 3deg and 400px tall: ~10.2px. */
  padding-inline: 12px;
}

.notes-section {
  /* Belt and braces: clip any horizontal bleed without turning the section into
     a scroll container. overflow-y stays explicitly visible so the hover lift
     and the shadows are not cut off. */
  overflow-x: clip;
  overflow-y: visible;
}

.sticky-note {
  --tilt: 0deg;
  --paper: #fdf28b;
  --paper-shade: rgba(0, 0, 0, 0.07);

  position: relative;
  display: flex;
  flex-direction: column;
  min-height: clamp(225px, 22vw, 250px);
  margin: 0;
  padding: 34px 24px 20px;
  color: #33302a;
  background-color: var(--paper);
  /* Faint diagonal wash so the paper is not a flat colour field. */
  background-image: linear-gradient(150deg, rgba(255, 255, 255, 0.5), transparent 55%, var(--paper-shade));
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.12),
    0 8px 16px -6px rgba(0, 0, 0, 0.28);
  transform: rotate(var(--tilt));
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

/* Tape strip across the top edge. */
.sticky-note::before {
  content: "";
  position: absolute;
  top: -11px;
  left: 50%;
  width: 92px;
  height: 24px;
  transform: translateX(-50%) rotate(calc(var(--tilt) * -1.6));
  background: linear-gradient(
    180deg,
    rgba(233, 230, 214, 0.92) 0%,
    rgba(246, 244, 234, 0.86) 45%,
    rgba(214, 210, 192, 0.9) 100%);
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-top-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
  /* Slightly ragged ends, the way a torn piece of tape sits. */
  clip-path: polygon(0 6%, 4% 0, 96% 3%, 100% 0, 100% 94%, 95% 100%, 5% 97%, 0 100%);
}

.sticky-note:hover,
.sticky-note:focus-within {
  /* Straightens and lifts, so a note can be read square-on. */
  transform: rotate(0deg) translateY(-5px);
  box-shadow:
    0 2px 3px rgba(0, 0, 0, 0.12),
    0 18px 28px -10px rgba(0, 0, 0, 0.35);
  z-index: 2;
}

.sticky-note-text {
  margin: 0;
  font-family: 'Caveat', 'Segoe Script', 'Bradley Hand', cursive;
  font-weight: 600;
  font-size: clamp(1.3rem, 1.05rem + 0.7vw, 1.6rem);
  line-height: 1.32;
}
.sticky-note-text p { margin: 0; }

.sticky-note-author {
  margin-top: auto;
  padding-top: 14px;
  font-family: 'Caveat', 'Segoe Script', 'Bradley Hand', cursive;
  font-size: 1.1rem;
  font-weight: 500;
  text-align: right;
  /* 0.85 keeps the softer look and still clears WCAG AA (5.35:1) on the
     lightest paper; 0.72 measured 3.94:1 on pink and failed. */
  color: rgba(51, 48, 42, 0.85);
}

/* Paper colour and tilt cycle every five notes. */
.sticky-note:nth-child(5n + 1) { --paper: #fdf28b; --tilt: -2.5deg; }
.sticky-note:nth-child(5n + 2) { --paper: #fbc4d0; --tilt:  3deg; }
.sticky-note:nth-child(5n + 3) { --paper: #b8e0f6; --tilt: -1.5deg; }
.sticky-note:nth-child(5n + 4) { --paper: #c8f0c0; --tilt:  2.5deg; }
.sticky-note:nth-child(5n + 5) { --paper: #fed7a8; --tilt: -3deg; }

/* Keeps the paper roughly square. Multi-column layouts produce columns
   narrower than this cap, so it only bites in a single-column (phone) view,
   where a full-width note would otherwise read as a banner. */
.sticky-note {
  max-width: 340px;
  margin-inline: auto;
}

/* --- Language switcher (in the navbar) ----------------------------------- */
.lang-switch {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.lang-switch a {
  display: block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.7) !important;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.lang-switch a:hover,
.lang-switch a:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  color: #fff !important;
}
.lang-switch a.active {
  background: #FFD700;
  color: #001F3F !important;
}
/* On a collapsed navbar the switcher sits below the links, aligned with them. */
@media (max-width: 991.98px) {
  .lang-switch { justify-content: flex-start; padding: 0.5rem 0; }
}

/* --- Breadcrumb --------------------------------------------------------- */
.breadcrumb-item a { color: #003366; text-decoration: none; }
.breadcrumb-item a:hover { text-decoration: underline; }

/* --- Footer ------------------------------------------------------------- */
footer {
  background: linear-gradient(90deg, #001F3F, #003366);
  color: #fff;
  text-align: center;
  padding: 38px 20px;
}

/* Every page links to every other page, so a crawler reaches all of them from
   anywhere on the site. */
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: center;
}
.footer-nav a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.95rem;
}
.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: #FFD700;
  text-decoration: underline;
}
.footer-nav a[aria-current="page"] {
  color: #FFD700;
  font-weight: 600;
}

/* --- Scroll-to-top ------------------------------------------------------ */
#scrollTopBtn {
  display: none;
  position: fixed;
  /* --bottom is raised on pages carrying the reCAPTCHA badge; see below. */
  bottom: var(--scrolltop-bottom, 30px);
  right: 30px;
  z-index: 99;
  background-color: #FFD700;
  color: #001F3F;
  border: none;
  width: 50px; height: 50px;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  font-size: 24px;
  transition: all 0.3s ease;
}
#scrollTopBtn:hover {
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
  transform: translateY(-3px);
}

/* Google's reCAPTCHA badge is fixed at bottom:14px and 60px tall, so it fills
   14-74px. The button is 50px tall, so lifting it to 92px clears the badge with
   18px to spare — including when the badge expands on hover. */
body.has-recaptcha { --scrolltop-bottom: 92px; }

/* --- Scroll reveal (staggered) ------------------------------------------ */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out;
  transition-delay: var(--reveal-delay, 0.2s);
  will-change: opacity, transform;
}
.scroll-reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* --- Contact form ------------------------------------------------------- */
.form-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --- Responsive tweaks -------------------------------------------------- */
@media (max-width: 576px) {
  #heroCarousel .carousel-item { height: 34vh; }
  #heroCarousel .carousel-heading { font-size: 1.6rem; }
  .sticky-wall { gap: 2.5rem 1.5rem; }
  /* 100px of empty space above the footer is a lot on a phone. */
  body > section:last-of-type { padding-bottom: 72px; }
  .timeline { margin-left: 0; padding-left: 16px; }
  .timeline-year { position: static; display: inline-block; margin-bottom: 8px; left: auto; }
}

/* --- Reduced motion ----------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .btn-glossy:hover, #press .card:hover, #scrollTopBtn:hover { transform: none; }
  /* Keep the tilt (a static transform), but stop the straighten-and-lift. */
  .sticky-note { transition: none; }
  .sticky-note:hover, .sticky-note:focus-within { transform: rotate(var(--tilt)); }
}
