/* Portfolio 2026 — layout and typography from Figma specs */

:root {
  --color-black: #000000;
  --color-grey-700: #232123;
  --color-grey-600: #524E51;
  --color-grey-500: #807B7F;
  --color-grey-400: #AEA8AC;
  --color-grey-300: #C6C0C4;
  --color-grey-200: #DDD8DB;
  --color-grey-100: #F3F2F3;
  --color-blue-700: #0E0C2F;
  --color-blue-600: #142B63;
  --color-blue-400: #416096;
  --color-blue-100: #E8EFF6;
  --font-inter: 'Inter', system-ui, sans-serif;
  --gap-section: 120px;
  --width-content: 1269px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font-inter);
  color: var(--color-black);
  background: #EEE7E7;
  overflow-x: hidden;
}

/* Text selection highlight */
::selection {
  background: #fef08a;
  color: var(--color-black);
}

::-moz-selection {
  background: #fef08a;
  color: var(--color-black);
}

/* ——— Typography ——— */
.type-display {
  font-family: var(--font-inter);
  font-style: normal;
  font-weight: 200;
  font-size: 128px;
  line-height: 136px;
  color: var(--color-black);
}

.type-headline-large {
  font-family: var(--font-inter);
  font-style: normal;
  font-weight: 200;
  font-size: 90px;
  line-height: 109px;
  text-align: center;
  color: var(--color-black);
}

.type-headline-medium {
  font-family: var(--font-inter);
  font-style: normal;
  font-weight: 200;
  font-size: 64px;
  line-height: 77px;
  color: var(--color-black);
}

.type-headline-small {
  font-family: var(--font-inter);
  font-style: normal;
  font-weight: 200;
  font-size: 36px;
  line-height: 44px;
  color: var(--color-black);
}

.type-label {
  font-family: var(--font-inter);
  font-style: normal;
  font-weight: 500;
  font-size: 18px;
  line-height: 22px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #808080;
}

.type-body {
  font-family: var(--font-inter);
  font-style: normal;
  font-weight: 200;
  font-size: 24px;
  line-height: 29px;
  color: var(--color-black);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Main frame: 1269px wide, centered, 120px gap, top offset 144px */
.frame-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: var(--width-content);
  margin: 0 auto;
  padding: 144px 24px 80px;
  gap: var(--gap-section);
}

/* Hero: "Im Dimitar, design generalist based in Lisbon" */
.hero {
  width: 100%;
}

.hero-title {
  width: 100%;
  margin: 0;
}

/* Contact row: email, LinkedIn, CV */
.links-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 64px;
  width: 100%;
}

.links-row .link {
  text-decoration-line: underline;
}

.links-row .link:hover {
  color: var(--color-grey-600);
}

.lead {
  width: 100%;
  margin: 0;
}

.lead--light {
  font-weight: 300;
}

.lead--large {
  max-width: var(--width-content);
}

/* CTA row: "Read full case study" + icon */
.cta-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.cta-link {
  text-decoration-line: underline;
}

.cta-link:hover {
  color: var(--color-grey-600);
}

.cta-row .icon-external path {
  stroke: var(--color-black);
  transition: stroke 0.2s ease;
}

.cta-row:hover .icon-external path {
  stroke: var(--color-grey-600);
}

.icon-external {
  display: inline-block;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  vertical-align: middle;
}

/* Showcase images — no card, just image */
.showcase-image {
  width: 100%;
  margin: 0;
}

.showcase-image img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
}

/* 3D section: videos + image with small gaps between them */
.section-3d-media {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Video embed — content width, 16:9, muted via URL */
.video-embed {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-embed-fallback {
  position: absolute;
  inset: 0;
  background: var(--color-grey-700);
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.video-embed-fallback:hover {
  background: var(--color-black);
}

.video-embed-fallback-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.video-embed-fallback-play {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-grey-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  padding-left: 6px;
  box-sizing: border-box;
}

.video-embed-fallback:hover .video-embed-fallback-play {
  background: #fff;
  color: var(--color-black);
}

.video-embed-fallback-text {
  font-family: var(--font-inter);
  font-size: 18px;
  font-weight: 500;
}

/* PO list section */
.po-section {
  width: 100%;
}

.section-label {
  margin-bottom: 16px;
}

.po-image {
  width: 100%;
  height: auto;
  display: block;
}

/* Mobile showcase — three invoice screens with rotation */
.mobile-showcase {
  width: 100%;
  margin: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: 280px;
}

.mobile-showcase-image {
  max-width: 32%;
  height: auto;
  display: block;
  vertical-align: top;
  object-fit: contain;
}

.mobile-invoice-1 {
  transform: rotate(-10deg);
  z-index: 1;
}

.mobile-invoice-2 {
  z-index: 2;
  margin: 0 -2%;
}

.mobile-invoice-3 {
  transform: rotate(10deg);
  z-index: 1;
}

.eightfields-placeholder {
  font-family: var(--font-inter);
  font-size: 18px;
  color: var(--color-grey-500);
}

/* Logos grid — 2 rows × 3 columns, full content width */
.logos-grid {
  width: 100%;
  max-width: var(--width-content);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 96px 80px;
  align-items: start;
}

.logo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.logos-grid .logo-item:nth-child(4) {
  transform: translateY(24px);
}

.logos-grid .logo-item img {
  max-width: 220px;
  max-height: 110px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.logo-name {
  font-family: var(--font-inter);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.3;
  color: var(--color-grey-700);
}

/* ——— Scroll indicator (right-side dots) ——— */
.scroll-indicator {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 100;
  pointer-events: auto;
}

.scroll-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--color-grey-300);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.scroll-dot:hover {
  background: var(--color-grey-500);
}

.scroll-dot.is-active {
  background: #fff;
  transform: scale(1.35);
}

/* ——— Case study password modal (replaces prompt for Brave/mobile) ——— */
.password-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.password-modal.is-open {
  visibility: visible;
  opacity: 1;
}

.password-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.password-modal-box {
  position: relative;
  background: #fff;
  padding: 24px;
  border-radius: 8px;
  max-width: 320px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.password-modal-title {
  margin: 0 0 8px;
  font-family: var(--font-inter);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.3;
  color: var(--color-black);
}

.password-modal-desc {
  margin: 0 0 16px;
  font-family: var(--font-inter);
  font-size: 14px;
  line-height: 1.4;
  color: var(--color-grey-600);
}

.password-modal-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.password-modal-input {
  width: 100%;
  padding: 10px 12px;
  font-family: var(--font-inter);
  font-size: 16px;
  border: 1px solid var(--color-grey-300);
  border-radius: 4px;
  box-sizing: border-box;
}

.password-modal-input:focus {
  outline: none;
  border-color: var(--color-grey-600);
}

.password-modal-error {
  margin: 0;
  font-size: 14px;
  color: #c00;
}

.password-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
}

.password-modal-btn {
  padding: 8px 16px;
  font-family: var(--font-inter);
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.password-modal-cancel {
  background: var(--color-grey-200);
  color: var(--color-grey-700);
}

.password-modal-submit {
  background: var(--color-black);
  color: #fff;
}

.password-modal-submit:hover {
  background: var(--color-grey-700);
}

/* ——— Emoji burst (click = explosion + gravity) ——— */
#emoji-burst-container {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  overflow: visible;
}

.emoji-particle {
  position: fixed;
  left: 0;
  top: 0;
  pointer-events: none;
  font-size: 1.5rem;
  line-height: 1;
  user-select: none;
  z-index: 10000;
}

/* Responsive: scale down type and spacing */
@media (max-width: 900px) {
  .scroll-indicator {
    display: none;
  }

  .frame-main {
    padding-top: 80px;
    gap: 48px;
    padding-left: 20px;
    padding-right: 20px;
    min-width: 0;
  }

  .hero-title {
    font-size: clamp(52px, 14vw, 96px);
    line-height: 1.1;
  }

  .links-row {
    flex-wrap: wrap;
    gap: 24px;
  }

  .links-row .link {
    font-size: 18px;
  }

  .lead,
  .lead--light,
  .lead--large {
    font-size: clamp(28px, 6vw, 48px);
    line-height: 1.25;
  }

  .cta-row .icon-external {
    width: 16px;
    height: 16px;
  }

  .cta-link {
    font-size: 18px;
  }

  .section-3d-media {
    gap: 16px;
  }

  .logos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 48px 48px;
  }

  .logos-grid .logo-item img {
    max-width: 120px;
    max-height: 60px;
  }

  .logo-name {
    font-size: 16px;
  }
}
