/* ============================================================
   components.css
   Mirrors the Figma component library (node 3218:10165).
   Active/clicked state deliberately reuses the rest state.
   ============================================================ */

/* --- Button base ------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 10px 16px;
  border-radius: var(--radius-8);
  font-family: var(--font-display);
  font-size: var(--btn-size);
  font-weight: var(--btn-weight);
  line-height: var(--btn-line);
  text-decoration: none;
  white-space: nowrap;
  border: 0;
  cursor: pointer;
}

@media (prefers-reduced-motion: no-preference) {
  .btn { transition: background-color var(--transition-fast) var(--ease-out),
                     box-shadow var(--transition-fast) var(--ease-out),
                     color var(--transition-fast) var(--ease-out); }
}

/* Icon-bearing variants use asymmetric padding, per Figma. */
.btn--icon { gap: 8px; padding-left: 16px; padding-right: 12px; }
.btn--icon:hover { gap: 12px; }

.btn__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Button / Primary --------------------------------------- */
.btn--primary {
  background: var(--gray-900);
  color: var(--gray-0);
}
.btn--primary:hover {
  background: var(--blue-900);
  box-shadow: var(--shadow-btn-primary-hover);
}
.btn--primary:active {
  background: var(--gray-900);
  box-shadow: none;
}

/* --- Button / Secondary ------------------------------------- */
.btn--secondary {
  background: var(--bg-secondary-default);
  color: var(--text-secondary);
  border: 2px solid var(--border-primary);
}
.btn--secondary:hover {
  background: var(--gray-50);
  color: var(--gray-900);
  filter: drop-shadow(var(--shadow-btn-secondary-hover));
}
.btn--secondary:active {
  background: var(--bg-secondary-default);
  color: var(--text-secondary);
  filter: none;
}

/* --- Button / Tertiary --------------------------------------- */
/* Ghost button — no fill or border. Used for the About page's
   "Terug naar home" back link.                                  */
.btn--tertiary {
  background: transparent;
  color: var(--text-secondary);
}
.btn--tertiary:hover { background: transparent; }
.btn--tertiary:active { background: transparent; }

/* --- Link (inline text link, e.g. footer socials) ------------ */
.link {
  color: var(--brand-500);
  font-family: var(--font-display);
  font-size: var(--btn-size);
  font-weight: var(--btn-weight);
  line-height: var(--btn-line);
  text-decoration: underline; /* NOT in Figma's static export — added so the
    link reads as a link without relying on colour alone. */
}

/* --- Logo mark (nav + footer) --------------------------------- */
/* NOT bound to a Figma layout grid — the badge is rotated, so its
   fixed-size frame keeps that rotation from nudging sibling
   layout/alignment.                                              */
.logo-badge-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 41px;
  height: 41px;
  flex-shrink: 0;
}

.logo-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--brand-500);
  border-radius: var(--radius-12);
  box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);
  transform: rotate(-2deg);
}

.logo-badge__text {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 40px;
  font-weight: 700;
  color: var(--text-inverse);
}

/* --- Header (sticky nav) --------------------------------------- */
/* NOT in Figma — the nav pill itself is the Figma component;
   pinning it on scroll is an addition. Transparent on purpose:
   only the pill (which has its own opaque background) should
   read as overlapping the page — not the header around it.
   Padding, not margin, so the 32px/8px spacing never collapses
   away underneath the sticky positioning.                       */
header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding-block: 32px 8px;
}

/* --- Top Nav ------------------------------------------------ */
.topnav {
  max-width: var(--prose-max);
  margin-inline: auto;
  background: var(--bg-default);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-16);
  filter: drop-shadow(var(--depth-0) var(--depth-025) calc(var(--depth-100) / 2) var(--black-200));
  padding: 16px 24px;
}

.topnav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topnav__brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }

.topnav__name {
  font-family: var(--font-display);
  font-size: var(--topnav-name-size);
  font-weight: var(--intro-weight);
  line-height: var(--topnav-name-line);
  color: var(--gray-800);
  text-decoration: none;
  white-space: nowrap;
}

.topnav__actions { display: flex; align-items: center; gap: 16px; }

/* The "Over mij" nav button is absent on tablet and mobile in
   the Figma design. Route to About is the hero CTA there. */
@media (max-width: 1199px) {
  .topnav__actions .btn--secondary { display: none; }
}

@media (max-width: 767px) {
  .topnav { padding: 16px 24px; }
  .topnav__name { font-size: 20px; line-height: 32px; white-space: normal; }
}

/* --- Photo frame (hero + about portrait) -------------------- */
/* White border, 24px radius, soft shadow. */
.photo-frame {
  background: var(--gray-0);
  border-radius: var(--radius-24);
  box-shadow: var(--shadow-photo);
  padding: 24px;
  max-width: 526px;
  width: 100%;
}

.photo-frame img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-12);
  object-fit: cover;
}

/* --- Work section ------------------------------------------- */
/* .voices ("Wat mensen over mij zeggen") is the same white surface
   at the same paddings — in Figma the two panels stack as
   identical siblings, so they share one rule rather than drifting
   apart later. Only what sits inside them differs.              */
.work,
.voices {
  background: var(--bg-default);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-16);
  padding: 80px 110px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow: clip;
}

@media (max-width: 1023px) {
  .work,
  .voices { padding: 72px 40px; }
}

@media (max-width: 767px) {
  .work,
  .voices { padding: 24px 16px; }
}

.work__intro,
.voices__intro { display: flex; flex-direction: column; gap: 12px; }
.work__intro .intro,
.voices__intro .intro { font-weight: 500; } /* Text/Intro/medium — the only spot this weight is used */

/* --- About content panel -------------------------------------- */
/* Same "surface card" idea as .work, at a wider radius per Figma
   (About's cards use radius-24 where Home's work section uses
   radius-16 — a genuine difference between the two pages, not
   normalised away). Two of these stack per About page.           */
.about__panel {
  background: var(--bg-default);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-24);
  padding: 80px 110px;
  display: flex;
  flex-direction: column;
  gap: 72px;
}

@media (max-width: 1023px) {
  .about__panel { padding: 80px 40px; }
}

@media (max-width: 767px) {
  .about__panel { padding: 24px 16px; }
}

/* --- Project card ------------------------------------------- */
.card {
  border-radius: var(--radius-16);
  padding: 32px;
  overflow: clip;
}
.card--sand { background: var(--card-sand); }
.card--sky  { background: var(--card-sky); }
.card--ice  { background: var(--card-ice); }

.card__grid {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.card__body {
  flex: 1 0 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.card__header { display: flex; flex-direction: column; gap: 16px; }

.card__meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-display);
  font-size: var(--body-size);
  line-height: var(--body-line);
  color: var(--card-meta);
}
.card__meta strong { font-weight: 600; }
.card__meta span { font-weight: 400; }
.card__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--card-meta);
  flex-shrink: 0;
}

.card__content { display: flex; flex-direction: column; gap: 20px; }

.card__outcome-title {
  font-family: var(--font-display);
  font-size: var(--h5-size);
  line-height: var(--h5-line);
  font-weight: var(--h5-weight);
  color: var(--card-meta);
}

.card__outcomes {
  margin: 11px 0 0;
  padding-left: 24px;
  color: var(--gray-800);
}
.card__outcomes li { margin: 0; }

/* Card image holds its Figma aspect ratio at every breakpoint. */
.card__media {
  flex: 1 0 0;
  min-width: 0;
  align-self: stretch;
  border-radius: var(--radius-12);
  overflow: hidden;
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-12);
}

/* Cards alternate image side on desktop, per the design. */
.card--media-first .card__grid { flex-direction: row-reverse; }

@media (max-width: 767px) {
  .card { padding: 32px 24px; }
  .card__grid,
  .card--media-first .card__grid { flex-direction: column; gap: 40px; }
  /* flex: none (basis auto) lets aspect-ratio govern the height here.
     flex: 1 0 0 (used on desktop, where the row's own height wins)
     would otherwise collapse this to 0px tall: overflow:hidden makes
     the browser ignore aspect-ratio when resolving a 0 flex-basis. */
  .card__media { flex: none; width: 100%; aspect-ratio: 1 / 1; }
}

/* --- Testimonial card ---------------------------------------- */
/* "Wat mensen over mij zeggen". All three cards share one surface
   colour (no per-card colour like the project cards) and sit 16px
   apart — tighter than the 24px between project cards, so the
   quotes read as one list rather than three separate blocks.    */
.voices__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.voice {
  margin: 0;
  background: var(--card-ice);
  border-radius: var(--radius-16);
  padding: 32px;
}

/* Paragraph gap equals one line of the quote, which is how the
   blank line between paragraphs is set in Figma. */
.voice__quote {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--quote-line);
}

.voice__quote p {
  font-size: var(--quote-size);
  line-height: var(--quote-line);
  color: var(--text-secondary);
}

/* Not every quote has a portrait — Ryan Graute's has none in
   Figma, and the name then simply starts at the padding edge. */
.voice__author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.voice__avatar {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
}

/* Op mobiel zakt de kaartpadding naar 24px, gelijk aan de
   projectkaarten daar. Desktop en tablet houden 32px. */
@media (max-width: 767px) {
  .voice { padding: 24px; }
}

.voice__who { display: flex; flex-direction: column; }

.voice__name {
  font-family: var(--font-display);
  font-size: var(--h5-size);
  line-height: var(--h5-line);
  font-weight: var(--h5-weight);
  color: var(--text-primary);
}

.voice__role {
  font-size: var(--voice-role-size);
  line-height: var(--voice-role-line);
  color: var(--text-tertiary);
}

/* --- Footer -------------------------------------------------- */
.site-footer {
  background: var(--gray-100);
  padding-block: 56px 96px;
  padding-inline: var(--pad-mobile);
  margin-top: 96px;
}

@media (min-width: 768px) { .site-footer { padding-inline: var(--pad-tablet); } }
@media (min-width: 1200px) { .site-footer { padding-inline: 0; } }

.site-footer__inner {
  max-width: var(--prose-max);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.site-footer__brand { display: flex; align-items: center; gap: 12px; }

.site-footer__name {
  font-family: var(--font-display);
  font-size: var(--h3-size);
  line-height: var(--h3-line);
  font-weight: var(--h3-weight);
  color: var(--gray-900);
}

.site-footer__socials { display: flex; flex-direction: column; gap: 12px; }

.site-footer__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.site-footer__label {
  font-family: var(--font-display);
  font-size: var(--btn-size);
  font-weight: var(--btn-weight);
  line-height: var(--btn-line);
  color: var(--gray-900);
}

.site-footer__made {
  font-family: var(--font-display);
  font-size: var(--btn-size);
  font-weight: var(--btn-weight);
  line-height: var(--btn-line);
  color: var(--gray-700);
}

.site-footer__made {
  display: flex;
  align-items: center;
  min-height: 44px;
  width: 100%;
  border-top: 1px solid var(--border-primary);
  padding-top: 16px;
}

@media (max-width: 767px) {
  .site-footer__name { font-size: var(--h4-size); line-height: var(--h4-line); }
  .site-footer__row { gap: 12px 8px; }
}
