/* OSAM redesign — sidebar layout, serif typography, light palette.
   Loaded after style.css; project overlays, menu, career popup and the
   contact form keep their original styles. */

@font-face {
  font-family: "Gelica";
  src: url("../assets/fonts/Gelica-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Gelica";
  src: url("../assets/fonts/Gelica-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #fdfdfc;
  --ink: #000;
  --muted: #8c8c8c;
  --card: #f7f7f6;
  --card-line: #ececea;
  --ui-blue: #0019ff;
  --lime-line: #dbf53b;
  --font-serif: "Gelica", Georgia, "Times New Roman", serif;
  --aside-w: 326px;
  --layout-gap: 36px;
}

body {
  background: var(--bg);
  color: var(--ink);
}

.edge-blur {
  display: none;
}

/* Layout */
.layout {
  display: grid;
  grid-template-columns: var(--aside-w) minmax(0, 1fr);
  gap: var(--layout-gap);
  align-items: start;
  max-width: 1200px;
  margin-inline: auto;
  padding: 30px 20px 20px;
}

.side-card,
.hero,
.process,
.pricing,
.about,
.cta {
  font-family: var(--font-serif);
}

.page {
  min-width: 0;
}

/* Pills & badges */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 39px;
  padding: 0 16px;
  border-radius: 999px;
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1;
  color: #fff;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.pill:hover {
  filter: brightness(1.15);
}

.pill:active {
  transform: translateY(1px);
}

.pill--black {
  border: 1px solid #242424;
  background: #101010;
  box-shadow: inset 0 -5px 8px rgba(255, 255, 255, 0.35);
}

.pill--blue {
  background: var(--ui-blue);
  box-shadow: inset 0 -5px 8px rgba(255, 255, 255, 0.35);
}

.pill--block {
  width: 100%;
  min-height: 40px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 35px;
  padding: 8px 16px;
  border-radius: 999px;
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.2;
  color: #000;
}

.badge--lime {
  border: 1px solid var(--lime-line);
  background: #e5ff45;
}

.badge--white {
  background: #fff;
}

/* Side card */
.side-card {
  position: sticky;
  top: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  height: min(678px, calc((100vh - 50px) / var(--page-zoom, 1)));
  min-height: 560px;
  padding: 20px 20px 24px;
  overflow: hidden;
  border-radius: 24px;
  background: #e4e4e3;
  isolation: isolate;
}

.side-card__blobs {
  position: absolute;
  inset: 0;
  z-index: -1;
  filter: blur(18px);
  background:
    radial-gradient(ellipse 34% 14% at 30% 46%, rgba(40, 40, 50, 0.55), transparent 70%),
    radial-gradient(ellipse 30% 14% at 82% 54%, rgba(235, 120, 60, 0.75), transparent 70%),
    radial-gradient(ellipse 22% 10% at 70% 60%, rgba(150, 90, 230, 0.7), transparent 70%),
    radial-gradient(ellipse 22% 16% at 8% 78%, rgba(206, 164, 70, 0.9), transparent 70%),
    radial-gradient(ellipse 30% 16% at 50% 90%, rgba(215, 175, 85, 0.75), transparent 70%);
}

.side-card__logo {
  display: inline-block;
  margin-bottom: 36px;
}

.side-card__title {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.2;
}

.side-card__text {
  margin: 0 0 20px;
  font-size: 16px;
  line-height: 1.3;
}

.side-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.side-card__bottom {
  display: grid;
  gap: 16px;
}

.side-card__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 14px;
}

.side-card__nav a,
.side-card__link {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}



/* Hero */
.hero {
  position: relative;
  min-height: 0;
  padding: 100px 0 64px;
  overflow: visible;
}

.hero__decor {
  position: absolute;
  top: -30px;
  right: -20px;
  z-index: -1;
  width: 320px;
  height: 260px;
  filter: blur(22px);
  background:
    radial-gradient(ellipse 40% 36% at 70% 40%, rgba(245, 190, 40, 0.8), transparent 70%),
    radial-gradient(ellipse 30% 26% at 40% 70%, rgba(235, 100, 150, 0.55), transparent 70%),
    radial-gradient(ellipse 26% 26% at 85% 78%, rgba(150, 90, 230, 0.55), transparent 70%);
  pointer-events: none;
}

.hero__badge {
  margin-bottom: 20px;
}

.hero__title {
  display: block;
  max-width: 580px;
  margin: 0;
  font-family: var(--font-serif);
  font-size: 42px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
}

.hero__lead {
  max-width: 380px;
  margin: 18px 0 20px;
  font-size: 16px;
  line-height: 1.25;
}

/* Projects grid (existing articles, restyled) */
.projects-showcase {
  --project-photo-radius: 20px;
  padding: 0;
}

.projects-showcase .container {
  width: 100%;
}

.projects-showcase__list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 16px;
}

.project-showcase[data-project-featured] {
  order: 0;
}

.project-showcase__card {
  color: var(--ink);
}

.project-showcase__media {
  aspect-ratio: 250 / 310;
}

.project-showcase__tags {
  left: 8px;
  top: 8px;
  gap: 4px;
}

.project-showcase__tags span {
  min-height: 26px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.28);
  font-family: var(--font-serif);
  font-size: 12px;
}

.project-showcase__info {
  padding: 12px 0 0;
}

.project-showcase__title {
  margin: 0 0 2px;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.2;
}

.project-showcase__lead {
  display: -webkit-box;
  overflow: hidden;
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

/* Sections */
.section-title {
  max-width: 560px;
  margin: 0 auto;
  font-size: 36px;
  font-weight: 400;
  line-height: 1.15;
  text-align: center;
}

.section-lead {
  max-width: 440px;
  margin: 16px auto 0;
  font-size: 16px;
  line-height: 1.3;
  text-align: center;
}

.process {
  padding: 120px 0 0;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 40px 0 0;
}

.process-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  min-height: 200px;
  padding: 16px;
  border-radius: 16px;
  background: var(--card);
}

.process-card__head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.process-card p {
  margin: 0;
  max-width: 360px;
  font-size: 16px;
  line-height: 1.3;
}

.pricing {
  padding: 100px 0 0;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 40px;
  padding: 8px;
  border-radius: 20px;
  background: #f0f0ef;
}

.price-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: 14px;
  background: #fff;
}

.price-card__name {
  margin: 0;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.2;
}

.price-card__price {
  margin: 4px 0 4px;
  font-size: 20px;
  line-height: 1.2;
}

.price-card__status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  font-size: 12px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #78f046;
  box-shadow: 0 0 0 2px rgba(85, 238, 17, 0.1);
}

.price-card__block {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--card-line);
  font-size: 14px;
  line-height: 1.3;
}

.price-card__block p,
.price-card__block ul {
  margin: 0;
}

.price-card__label {
  font-size: 14px;
}

.price-card__block ul {
  display: grid;
  gap: 4px;
  padding: 0;
  list-style: none;
}

.price-card__block li::before {
  content: "– ";
}

.about {
  padding: 56px 0 0;
}

.about__grid {
  display: grid;
  grid-template-columns: 351px minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  margin-top: 16px;
}

.about__photo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 20px;
}

.about__title {
  margin: 0 0 18px;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.2;
}

.about__title span {
  color: var(--muted);
}

.about__copy p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.3;
}

.about__copy strong {
  color: #000;
  font-weight: 400;
}

/* CTA footer */
.cta {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 42px;
  margin-top: 16px;
  min-height: 0;
  padding: 64px 24px 28px;
  overflow: hidden;
  border-radius: 20px;
  background: #050505;
  color: #fff;
  text-align: center;
  isolation: isolate;
}

.cta__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0;
  overflow: hidden;
  color: #121212;
  font-size: 64px;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

/* Four staggered rows of the same phrase, each wider than the block and
   shifted so the words break at different places, like in the layout. */
.cta__row {
  display: flex;
  gap: 40px;
  width: max-content;
}

.cta__row:nth-child(4n + 2) {
  transform: translateX(-230px);
}

.cta__row:nth-child(4n + 3) {
  transform: translateX(-100px);
}

/* Desktop block is short: only the first four rows are used */
.cta__row:nth-child(n + 5) {
  display: none;
}

.cta__title {
  max-width: 460px;
  margin: 0;
  font-size: 42px;
  font-weight: 400;
  line-height: 1.2;
}

.cta__cols {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 32px;
  align-self: flex-end;
  margin-right: 8%;
  text-align: left;
  font-size: 12px;
  line-height: 1.3;
}

.cta__cols h3 {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 400;
}

.cta__cols ul {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cta__cols p {
  margin: 0;
}

.cta__cols a,
.cta__cols button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.cta__cols a:hover,
.cta__cols button:hover {
  text-decoration: underline;
}

/* Tablet / mobile */
@media (max-width: 899px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 16px 16px 16px;
  }


  .side-card {
    position: relative;
    top: 0;
    height: auto;
    min-height: 0;
    gap: 40px;
    padding: 20px 20px 24px;
  }

  .side-card__title,
  .side-card__text {
    display: none;
  }

  .side-card__logo {
    margin-bottom: 8px;
  }

  .hero {
    padding: 24px 0 40px;
  }

  .hero__decor {
    right: -40px;
    top: -10px;
    opacity: 0.8;
  }

  .about__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 899px) {
  .projects-showcase__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .hero__title {
    font-size: 34px;
  }

  .projects-showcase__list,
  .process-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .projects-showcase__list {
    gap: 28px;
  }

  .section-title {
    font-size: 28px;
  }

  .process {
    padding-top: 72px;
  }

  .pricing {
    padding-top: 72px;
  }

  .cta {
    padding-top: 48px;
  }

  .cta__title {
    font-size: 32px;
  }

  .cta__cols {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Large screens: scale the whole page up proportionally (--page-zoom is set
   in the page head from the viewport width, 1 at <=1240px, capped at 2.5). */
@media (min-width: 1241px) {
  .layout,
  .career-popup {
    zoom: var(--page-zoom, 1);
  }
}

/* Hovering a project blurs the others. The filter sits on the card, not on
   the article, because the fixed detail overlay lives inside the article and
   a filtered ancestor would become its containing block. */
.project-showcase__card {
  transition:
    filter 1s ease,
    opacity 1s ease;
}

@media (hover: hover) {
  .projects-showcase__list:has(.project-showcase__card:hover)
    .project-showcase:not(:hover)
    .project-showcase__card {
    filter: blur(4px);
    opacity: 0.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-showcase__card {
    transition: none;
  }
}

/* Contact (book a call) popup: the original form on the glass overlay.
   Narrower than the full overlay so the side margins match the site. */
/* The inner column itself is 760px, so the close button sits on the content's
   right edge instead of the far edge of the screen. */
.career-popup__inner {
  width: min(760px, calc(100% - 32px));
}

.career-popup .career-popup__head,
.career-popup .career-form,
.contact-popup .contact-form {
  width: 100%;
  margin-inline: 0;
}

.career-popup__title,
.career-popup__subtitle {
  padding-right: 64px; /* keeps text clear of the close button */
}

.contact-popup .contact-form {
  margin-top: 72px;
  gap: 16px;
}

.contact-popup .contact-interest {
  margin-bottom: 24px;
}

.contact-popup .contact-interest .career-group__title {
  margin-bottom: 20px;
}

.contact-popup .field input,
.contact-popup .field textarea,
.contact-popup .contact-method__button,
.contact-popup .contact-method__input {
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.35);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #232323;
  font-weight: 600;
}

.contact-popup .field input::placeholder,
.contact-popup .field textarea::placeholder,
.contact-popup .contact-method__input::placeholder {
  color: #232323;
  opacity: 0.85;
}

.contact-popup .field input:focus,
.contact-popup .field textarea:focus,
.contact-popup .contact-method__input:focus {
  background: rgba(255, 255, 255, 0.6);
}

.contact-popup .contact-method__button:focus-visible {
  outline-color: #232323;
}

.contact-popup .btn--send {
  justify-self: start;
  width: auto;
  min-height: 68px;
  padding: 0 40px;
  border: 1px solid #232323;
  background: #232323;
  color: #fff;
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 600;
}

.contact-popup .btn--send:hover {
  background: #000;
}

.contact-popup .contact-form__status {
  color: #232323;
}

.contact-popup .contact-form__status.is-error {
  color: #c62828;
}

.contact-popup .contact-form__status.is-success {
  color: #2e7d32;
}

@media (max-width: 640px) {
  .contact-popup .contact-form {
    margin-top: 48px;
  }

  .contact-popup .btn--send {
    justify-self: stretch;
  }
}

/* Card video sits over the poster <img> (first frame), so something is
   visible immediately and the video fades in when it can play. */
.project-showcase__media .project-showcase__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Project cards are plain links to the case pages (crawlable); the title
   link is stretched over the whole card. */
.project-showcase__card {
  position: relative;
}

.project-showcase__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
}

.project-showcase__link:focus-visible {
  outline: none;
}

.project-showcase__link:focus-visible::after {
  outline: 2px solid #000;
  outline-offset: 4px;
  border-radius: 20px;
}

/* Compact chips in both popups so the groups sit on as few lines as possible */
.career-popup .career-chips {
  gap: 12px 14px;
}

.career-popup .career-chip {
  padding: 14px 24px;
}

/* Textareas wrap their text, so a horizontal scrollbar is never needed; it
   only showed up from sub-pixel rounding when the page is scaled up. */
textarea {
  overflow-x: hidden;
}

/* Success popup (after a Career application) */
.success-popup {
  z-index: 330;
}

.success-popup__inner {
  display: grid;
  align-content: center;
  min-height: 100%;
}

.success-popup__body {
  display: grid;
  justify-items: start;
  gap: 20px;
  width: 100%;
}

.success-popup__body .career-popup__title {
  margin: 0;
}

.success-popup__text {
  margin: 0;
  max-width: 560px;
  color: #232323;
  font-size: 20px;
  line-height: 1.4;
}

.success-popup__link {
  margin-top: 12px;
  min-height: 56px;
  padding: 0 28px;
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
}

/* Avoid a lone emoji / word on the last line of popup titles */
.career-popup__title {
  text-wrap: balance;
}

/* "– " bullets on links; plain text rows (Founder, e-mail) stay bare */
.cta__cols li::before {
  content: "– ";
}

.cta__cols li:not(:has(a, button))::before,
.cta__cols li:has(a[href^="mailto"])::before,
.cta__legal li::before {
  content: none;
}

.cta__legal a:hover,
.cta__legal a:focus-visible {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .cta__cols {
    align-self: stretch;
    margin-right: 0;
  }

  .cta__bg {
    font-size: 44px;
  }
}

/* Mobile: no side card (it only duplicated the hero and footer); the logo
   moves to the hero and the legal links to the footer. */
.hero__logo {
  display: none;
}

@media (max-width: 899px) {
  .side-card {
    display: none;
  }

  .hero__logo {
    display: block;
    width: 28px;
    margin-bottom: 20px;
  }

  .hero {
    padding-top: 28px;
  }

  .cta__row:nth-child(n + 5) {
    display: flex;
  }

  .cta__bg {
    font-size: 44px;
  }

  .cta__cols {
    grid-template-columns: 1fr;
    font-size: 16px;
    line-height: 1.35;
    gap: 28px;
  }

  .cta__cols h3 {
    margin-bottom: 8px;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
  }

  .cta__cols ul {
    gap: 6px;
  }

  /* The legal column loses its spacer heading and sits last in the stack */
  .cta__legal h3 {
    display: none;
  }

  .cta__legal {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
  }
}

/* Mobile: project cards are full width, so their tags can be bigger */
@media (max-width: 640px) {
  .project-showcase__tags {
    top: 12px;
    left: 12px;
    gap: 8px;
    max-width: calc(100% - 24px);
  }

  .project-showcase__tags span {
    min-height: 36px;
    padding: 0 16px;
    font-size: 16px;
  }
}
