/* ============================================
   THEME VARIABLES: edit here to retheme
   ============================================ */
:root {
  /* Surfaces */
  --color-bg: #101214;
  --color-bg-alt: #16191D;
  --color-bg-card: #15181C;
  --color-bg-light: #FFFFFF;

  /* Text */
  --color-text: #FFFFFF;
  --color-text-muted: #9AA1AA;
  --color-text-faint: #6B7280;

  /* Lines */
  --color-border: rgba(255, 255, 255, 0.10);
  --color-border-strong: rgba(255, 255, 255, 0.18);

  /* Blue accent: decoration only (logo, labels, glow, selected states) */
  --color-accent: #3A5BD0;
  --color-accent-hover: #2E4AB0;
  --color-accent-deep: #1E3A8A;
  --color-accent-soft: rgba(58, 91, 208, 0.16);

  /* Buttons are white on black, never blue, so CTAs stay unmistakable */
  --color-btn: #FFFFFF;
  --color-btn-text: #101214;
  --color-btn-hover: #DFE3EA;

  /* Lighter blue for small text: --color-accent is too dark to read on #101214 */
  --color-accent-text: #8AA2EA;

  /* Ambient glow behind the hero */
  --glow-1: rgba(58, 91, 208, 0.30);
  --glow-2: rgba(30, 58, 138, 0.40);

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max-width: 1180px;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  --nav-height: 76px;
}

/* ============================================
   RESET / BASE
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 120px 32px;
}

/* Bracketed section label, e.g. [ SERVICES ] */
.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent-text);
  margin-bottom: 20px;
}

.eyebrow::before {
  content: '[ ';
}

.eyebrow::after {
  content: ' ]';
}

.section-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  max-width: 760px;
}

.section-lede {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin-bottom: 56px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 15px 30px;
  border-radius: var(--radius-pill);
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
  white-space: nowrap;
}

/* Arrow is decorative, so it lives in CSS and stays out of the translation strings */
.btn-primary::after,
.btn-link::after {
  content: '→';
  font-size: 1em;
  line-height: 1;
}

/* Primary CTA is white on the dark page: highest possible contrast.
   Blue stays reserved for accents (logo, labels, glow, selected states). */
.btn-primary {
  background: var(--color-btn);
  color: var(--color-btn-text);
}

.btn-primary:hover {
  background: var(--color-btn-hover);
  transform: translateY(-1px);
}

.btn-small {
  padding: 11px 22px;
  font-size: 0.88rem;
}

.btn-large {
  padding: 18px 38px;
  font-size: 1.02rem;
}

.btn-link {
  color: var(--color-text);
  font-weight: 500;
  padding: 15px 26px;
  border: 1px solid var(--color-border-strong);
}

.btn-link::after {
  content: '↓';
}

.btn-link:hover {
  border-color: var(--color-btn);
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.07);
}

/* ============================================
   NAV
   ============================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.nav.scrolled {
  background: rgba(16, 18, 20, 0.82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom-color: var(--color-border);
}

/* Three-column grid keeps the logo optically centred in the bar,
   independent of how wide the links on the right get. */
.nav-inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.65rem;
  letter-spacing: -0.03em;
  color: var(--color-accent-text);
  grid-column: 2;
  justify-self: center;
}

.nav-right {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a:not(.btn) {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.nav-links a:not(.btn):hover {
  color: var(--color-text);
}

/* LANGUAGE SWITCH */
.lang-switch {
  display: flex;
  align-items: center;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  overflow: hidden;
  flex-shrink: 0;
}

.lang-btn {
  padding: 7px 13px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  background: transparent;
  transition: background 0.18s ease, color 0.18s ease;
}

.lang-btn:hover {
  color: var(--color-text);
}

.lang-btn.is-active {
  background: var(--color-btn);
  color: var(--color-btn-text);
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: calc(100vh - var(--nav-height));
  padding: 64px 32px 120px;
  overflow: hidden;
}

/* Soft ambient glow, the only "decoration" on the page */
.hero::before {
  content: '';
  position: absolute;
  inset: -30% -10% 0;
  background:
    radial-gradient(45% 45% at 50% 40%, var(--glow-1), transparent 70%),
    radial-gradient(38% 38% at 72% 68%, var(--glow-2), transparent 72%),
    radial-gradient(35% 35% at 24% 62%, var(--glow-2), transparent 72%);
  filter: blur(20px);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

/* Pill badge above the headline */
.hero-badge {
  display: inline-block;
  padding: 9px 20px;
  margin-bottom: 32px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background: rgba(255, 255, 255, 0.03);
}

.hero-headline {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  line-height: 1.0;
  letter-spacing: -0.035em;
  margin-bottom: 28px;
}

.hero-subhead {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--color-text-muted);
  max-width: 620px;
  margin: 0 auto 44px;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ============================================
   SERVICES
   ============================================ */
.services {
  border-top: 1px solid var(--color-border);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 16px;
}

.service-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 36px 30px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.service-card:hover {
  border-color: var(--color-border-strong);
  background: var(--color-bg-alt);
}

/* Bracketed index, e.g. [001] */
.service-index {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--color-accent-text);
  margin-bottom: 20px;
}

.service-index::before {
  content: '[';
}

.service-index::after {
  content: ']';
}

.service-card h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.service-card p {
  color: var(--color-text-muted);
  font-size: 0.97rem;
}

/* ============================================
   PORTFOLIO / EMAIL SHOWCASE
   ============================================ */
.portfolio {
  border-top: 1px solid var(--color-border);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.portfolio-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.portfolio-item:hover {
  transform: translateY(-4px);
  border-color: var(--color-accent);
}

/* The email frame stays light: real email screenshots will be light too */
.email-frame {
  display: block;
  background: #F4F5F7;
}

.email-frame-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 20px;
  min-height: 220px;
  background: #FFFFFF;
}

.block {
  display: block;
  border-radius: 4px;
  background: #E4E8F3;
}

.block-lg {
  height: 90px;
}

.block-sm {
  height: 16px;
  width: 80%;
}

.block-sm.short {
  width: 50%;
}

.block-cta {
  height: 34px;
  width: 140px;
  background: var(--color-accent);
  opacity: 0.22;
  margin-top: auto;
}

.portfolio-caption {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 18px 20px;
}

.portfolio-caption strong {
  font-size: 0.95rem;
  font-weight: 600;
}

.portfolio-caption span {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(8, 9, 11, 0.94);
  backdrop-filter: blur(6px);
  padding: 32px;
}

.lightbox.open {
  display: flex;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 28px;
  font-size: 2.2rem;
  line-height: 1;
  color: #FFFFFF;
  opacity: 0.7;
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-content {
  width: 100%;
  max-width: 480px;
}

.lightbox-content .email-frame {
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.email-frame-large .email-frame-body {
  min-height: 340px;
  padding: 32px 26px;
}

.email-frame-large .block-lg {
  height: 140px;
}

.lightbox-caption {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 22px;
  text-align: center;
}

.lightbox-caption span {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* ============================================
   FINAL CTA
   ============================================ */
.final-cta {
  position: relative;
  border-top: 1px solid var(--color-border);
  overflow: hidden;
}

.final-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(50% 70% at 50% 100%, var(--glow-1), transparent 70%);
  pointer-events: none;
}

.final-cta .section-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.final-cta .section-title,
.final-cta .section-lede {
  max-width: 620px;
}

.final-cta .section-lede {
  margin-bottom: 40px;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px 32px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-logo {
  justify-self: start;
}

.footer-links {
  display: flex;
  gap: 28px;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.footer-links a:hover {
  color: var(--color-text);
}

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding: 20px 32px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-text-faint);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .services-grid,
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .section-inner {
    padding: 84px 24px;
  }

  .nav-inner {
    padding: 0 20px;
  }

  /* Tighten the right-hand controls so the centred logo still clears them at 375px */
  .nav-right {
    gap: 10px;
  }

  .logo {
    font-size: 1.45rem;
  }

  .lang-btn {
    padding: 5px 9px;
    font-size: 0.72rem;
  }

  .hamburger {
    display: flex;
    width: 32px;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(16, 18, 20, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    padding: 8px 24px 24px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .nav-links.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-links a:not(.btn) {
    width: 100%;
    padding: 15px 0;
    border-bottom: 1px solid var(--color-border);
  }

  .nav-links .btn {
    margin-top: 16px;
    width: 100%;
  }

  .hero {
    padding: 48px 24px 84px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .services-grid,
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============================================
   APPLICATION FORM
   Full-screen multi-step qualifier ending at booking
   ============================================ */
.apply {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  flex-direction: column;
  background: var(--color-bg);
}

.apply.open {
  display: flex;
}

/* Same ambient glow as the hero, so the form feels part of the page */
.apply::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(50% 45% at 50% 30%, var(--glow-1), transparent 70%),
    radial-gradient(40% 40% at 78% 82%, var(--glow-2), transparent 72%);
  pointer-events: none;
}

/* Top bar: logo, progress, close */
.apply-bar {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 22px 32px;
  border-bottom: 1px solid var(--color-border);
}

/* Override the grid placement .logo inherits from the nav */
.apply-logo {
  font-size: 1.3rem;
  grid-column: 1;
  justify-self: start;
}

.apply-progress {
  grid-column: 2;
}

.apply-progress {
  width: min(340px, 40vw);
  height: 3px;
  border-radius: var(--radius-pill);
  background: var(--color-border);
  overflow: hidden;
}

.apply-progress span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: var(--radius-pill);
  background: var(--color-btn);
  transition: width 0.3s ease;
}

.apply-close {
  grid-column: 3;
  justify-self: end;
  font-size: 2rem;
  line-height: 1;
  color: var(--color-text-muted);
}

.apply-close:hover {
  color: var(--color-text);
}

/* Body: one step visible at a time */
.apply-body {
  position: relative;
  z-index: 1;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 32px;
}

.apply-step {
  display: none;
  border: none;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
}

.apply-step.is-active {
  display: block;
  animation: applyIn 0.32s ease both;
}

@keyframes applyIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.apply-count {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--color-accent-text);
  margin-bottom: 18px;
}

.apply-count::before { content: '['; }
.apply-count::after  { content: ']'; }

.apply-q {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.apply-help {
  color: var(--color-text-muted);
  font-size: 1rem;
  margin-bottom: 32px;
}

/* Text inputs */
.apply-fields {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.apply-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.apply-field > span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.apply-field input,
.apply-field textarea {
  width: 100%;
  padding: 15px 18px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.18s ease, background 0.18s ease;
  resize: vertical;
}

.apply-field input::placeholder,
.apply-field textarea::placeholder {
  color: var(--color-text-faint);
}

.apply-field input:focus,
.apply-field textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  background: var(--color-bg-alt);
}

/* Selectable options */
.apply-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.apply-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 17px 20px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-bg-card);
  cursor: pointer;
  font-size: 1rem;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.apply-option:hover {
  border-color: var(--color-text-muted);
}

.apply-option input {
  appearance: none;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border: 1px solid var(--color-border-strong);
  background: transparent;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.apply-option input[type="radio"] {
  border-radius: 50%;
}

.apply-option input[type="checkbox"] {
  border-radius: 5px;
}

/* Checked state colours the whole row, in white so it is unmistakable */
.apply-option:has(input:checked) {
  border-color: var(--color-btn);
  background: rgba(255, 255, 255, 0.08);
}

.apply-option input:checked {
  border-color: var(--color-btn);
  background: var(--color-btn);
  box-shadow: inset 0 0 0 4px var(--color-bg-card);
}

/* Inline validation message */
.apply-error {
  display: none;
  margin-top: 18px;
  font-size: 0.9rem;
  color: #FF8080;
}

.apply-error.show {
  display: block;
}

/* Final booking step */
.apply-done {
  text-align: center;
}

.apply-tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--color-btn);
  color: var(--color-btn);
  font-size: 1.5rem;
}

.apply-book {
  margin-top: 8px;
}

.apply-note {
  margin-top: 28px;
  font-size: 0.8rem;
  font-style: italic;
  color: var(--color-text-faint);
}

/* Bottom navigation */
.apply-nav {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 32px;
  border-top: 1px solid var(--color-border);
}

.apply-back {
  padding: 12px 22px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  transition: color 0.18s ease, border-color 0.18s ease;
}

.apply-back:hover:not(:disabled) {
  color: var(--color-text);
  border-color: var(--color-text-muted);
}

.apply-back:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.apply-steps {
  font-size: 0.85rem;
  color: var(--color-text-faint);
  letter-spacing: 0.04em;
}

/* Footer "Apply Now" is a button but should read as a footer link */
.footer-apply {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.footer-apply:hover {
  color: var(--color-text);
}

@media (max-width: 720px) {
  .apply-bar {
    padding: 16px 20px;
    gap: 14px;
  }

  .apply-logo {
    font-size: 1.15rem;
  }

  .apply-body {
    padding: 36px 20px;
    justify-content: flex-start;
  }

  .apply-nav {
    padding: 16px 20px;
  }

  .apply-steps {
    display: none;
  }

  .apply-nav .btn,
  .apply-back {
    flex: 1;
    justify-content: center;
  }
}

/* ============================================
   REAL EMAIL SCREENSHOTS
   Emails are very tall, so the tile crops to a preview
   and the lightbox scrolls the full send.
   ============================================ */
.email-frame-body.has-image {
  display: block;
  padding: 0;
  min-height: 0;
  height: 280px;
  overflow: hidden;
}

.email-frame-body.has-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Fades the hard crop so it reads as "continues below" */
.email-frame-body.has-image::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 64px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #FFFFFF);
  pointer-events: none;
}

.portfolio-item .email-frame {
  position: relative;
}

/* In the lightbox the same frame scrolls the whole email */
.email-frame-large .email-frame-body.has-image {
  height: auto;
  /* Never collapse to zero, even while the image is still decoding */
  min-height: 240px;
  max-height: 72vh;
  overflow-y: auto;
}

.email-frame-large .email-frame-body.has-image::after {
  content: none;
}

/* ============================================
   AFFILIATION DISCLAIMER
   Concept work must never read as client work
   ============================================ */
.work-disclaimer {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 720px;
  margin: -32px 0 48px;
  padding: 16px 20px;
  border: 1px solid var(--color-border-strong);
  border-left: 2px solid var(--color-accent-text);
  border-radius: var(--radius-sm);
  background: var(--color-bg-card);
  font-size: 0.86rem;
  color: var(--color-text-muted);
}

.work-disclaimer strong {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-text);
}

/* Per-tile concept tag, next to the brand name */
.portfolio-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.portfolio-brand {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.portfolio-tag {
  padding: 2px 8px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

@media (max-width: 720px) {
  .work-disclaimer {
    margin: -20px 0 36px;
  }
}

/* Small muted note under the portfolio heading */
.work-subnote {
  margin: -8px 0 18px;
  font-size: 0.82rem;
  color: var(--color-text-faint);
}

/* Thumbnails crop to a uniform height regardless of the email's aspect ratio.
   Text emails are much narrower/taller than designed ones, so cover + top
   keeps every tile the same height while showing the start of the send. */
.email-frame-body.has-image img {
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* The lightbox shows the full uncropped image at its native proportions */
.email-frame-large .email-frame-body.has-image img {
  height: auto;
  object-fit: fill;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .services-grid,
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .section-inner {
    padding: 84px 24px;
  }

  .nav-inner {
    padding: 0 20px;
  }

  /* Tighten the right-hand controls so the centred logo still clears them at 375px */
  .nav-right {
    gap: 10px;
  }

  .logo {
    font-size: 1.45rem;
  }

  .lang-btn {
    padding: 5px 9px;
    font-size: 0.72rem;
  }

  .hamburger {
    display: flex;
    width: 32px;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(16, 18, 20, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    padding: 8px 24px 24px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .nav-links.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-links a:not(.btn) {
    width: 100%;
    padding: 15px 0;
    border-bottom: 1px solid var(--color-border);
  }

  .nav-links .btn {
    margin-top: 16px;
    width: 100%;
  }

  .hero {
    padding: 48px 24px 84px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .services-grid,
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============================================
   APPLICATION FORM
   Full-screen multi-step qualifier ending at booking
   ============================================ */
.apply {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  flex-direction: column;
  background: var(--color-bg);
}

.apply.open {
  display: flex;
}

/* Same ambient glow as the hero, so the form feels part of the page */
.apply::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(50% 45% at 50% 30%, var(--glow-1), transparent 70%),
    radial-gradient(40% 40% at 78% 82%, var(--glow-2), transparent 72%);
  pointer-events: none;
}

/* Top bar: logo, progress, close */
.apply-bar {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 22px 32px;
  border-bottom: 1px solid var(--color-border);
}

/* Override the grid placement .logo inherits from the nav */
.apply-logo {
  font-size: 1.3rem;
  grid-column: 1;
  justify-self: start;
}

.apply-progress {
  grid-column: 2;
}

.apply-progress {
  width: min(340px, 40vw);
  height: 3px;
  border-radius: var(--radius-pill);
  background: var(--color-border);
  overflow: hidden;
}

.apply-progress span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: var(--radius-pill);
  background: var(--color-btn);
  transition: width 0.3s ease;
}

.apply-close {
  grid-column: 3;
  justify-self: end;
  font-size: 2rem;
  line-height: 1;
  color: var(--color-text-muted);
}

.apply-close:hover {
  color: var(--color-text);
}

/* Body: one step visible at a time */
.apply-body {
  position: relative;
  z-index: 1;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 32px;
}

.apply-step {
  display: none;
  border: none;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
}

.apply-step.is-active {
  display: block;
  animation: applyIn 0.32s ease both;
}

@keyframes applyIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.apply-count {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--color-accent-text);
  margin-bottom: 18px;
}

.apply-count::before { content: '['; }
.apply-count::after  { content: ']'; }

.apply-q {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.apply-help {
  color: var(--color-text-muted);
  font-size: 1rem;
  margin-bottom: 32px;
}

/* Text inputs */
.apply-fields {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.apply-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.apply-field > span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.apply-field input,
.apply-field textarea {
  width: 100%;
  padding: 15px 18px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.18s ease, background 0.18s ease;
  resize: vertical;
}

.apply-field input::placeholder,
.apply-field textarea::placeholder {
  color: var(--color-text-faint);
}

.apply-field input:focus,
.apply-field textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  background: var(--color-bg-alt);
}

/* Selectable options */
.apply-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.apply-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 17px 20px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-bg-card);
  cursor: pointer;
  font-size: 1rem;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.apply-option:hover {
  border-color: var(--color-text-muted);
}

.apply-option input {
  appearance: none;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border: 1px solid var(--color-border-strong);
  background: transparent;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.apply-option input[type="radio"] {
  border-radius: 50%;
}

.apply-option input[type="checkbox"] {
  border-radius: 5px;
}

/* Checked state colours the whole row, in white so it is unmistakable */
.apply-option:has(input:checked) {
  border-color: var(--color-btn);
  background: rgba(255, 255, 255, 0.08);
}

.apply-option input:checked {
  border-color: var(--color-btn);
  background: var(--color-btn);
  box-shadow: inset 0 0 0 4px var(--color-bg-card);
}

/* Inline validation message */
.apply-error {
  display: none;
  margin-top: 18px;
  font-size: 0.9rem;
  color: #FF8080;
}

.apply-error.show {
  display: block;
}

/* Final booking step */
.apply-done {
  text-align: center;
}

.apply-tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--color-btn);
  color: var(--color-btn);
  font-size: 1.5rem;
}

.apply-book {
  margin-top: 8px;
}

.apply-note {
  margin-top: 28px;
  font-size: 0.8rem;
  font-style: italic;
  color: var(--color-text-faint);
}

/* Bottom navigation */
.apply-nav {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 32px;
  border-top: 1px solid var(--color-border);
}

.apply-back {
  padding: 12px 22px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  transition: color 0.18s ease, border-color 0.18s ease;
}

.apply-back:hover:not(:disabled) {
  color: var(--color-text);
  border-color: var(--color-text-muted);
}

.apply-back:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.apply-steps {
  font-size: 0.85rem;
  color: var(--color-text-faint);
  letter-spacing: 0.04em;
}

/* Footer "Apply Now" is a button but should read as a footer link */
.footer-apply {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.footer-apply:hover {
  color: var(--color-text);
}

@media (max-width: 720px) {
  .apply-bar {
    padding: 16px 20px;
    gap: 14px;
  }

  .apply-logo {
    font-size: 1.15rem;
  }

  .apply-body {
    padding: 36px 20px;
    justify-content: flex-start;
  }

  .apply-nav {
    padding: 16px 20px;
  }

  .apply-steps {
    display: none;
  }

  .apply-nav .btn,
  .apply-back {
    flex: 1;
    justify-content: center;
  }
}

/* ============================================
   REAL EMAIL SCREENSHOTS
   Emails are very tall, so the tile crops to a preview
   and the lightbox scrolls the full send.
   ============================================ */
.email-frame-body.has-image {
  display: block;
  padding: 0;
  min-height: 0;
  height: 280px;
  overflow: hidden;
}

.email-frame-body.has-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Fades the hard crop so it reads as "continues below" */
.email-frame-body.has-image::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 64px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #FFFFFF);
  pointer-events: none;
}

.portfolio-item .email-frame {
  position: relative;
}

/* In the lightbox the same frame scrolls the whole email */
.email-frame-large .email-frame-body.has-image {
  height: auto;
  /* Never collapse to zero, even while the image is still decoding */
  min-height: 240px;
  max-height: 72vh;
  overflow-y: auto;
}

.email-frame-large .email-frame-body.has-image::after {
  content: none;
}

/* ============================================
   AFFILIATION DISCLAIMER
   Concept work must never read as client work
   ============================================ */
.work-disclaimer {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 720px;
  margin: -32px 0 48px;
  padding: 16px 20px;
  border: 1px solid var(--color-border-strong);
  border-left: 2px solid var(--color-accent-text);
  border-radius: var(--radius-sm);
  background: var(--color-bg-card);
  font-size: 0.86rem;
  color: var(--color-text-muted);
}

.work-disclaimer strong {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-text);
}

/* Per-tile concept tag, next to the brand name */
.portfolio-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.portfolio-brand {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.portfolio-tag {
  padding: 2px 8px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

@media (max-width: 720px) {
  .work-disclaimer {
    margin: -20px 0 36px;
  }
}

/* Small muted note under the portfolio heading */
.work-subnote {
  margin: -8px 0 18px;
  font-size: 0.82rem;
  color: var(--color-text-faint);
}

/* Thumbnails crop to a uniform height regardless of the email's aspect ratio.
   Text emails are much narrower/taller than designed ones, so cover + top
   keeps every tile the same height while showing the start of the send. */
.email-frame-body.has-image img {
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* The lightbox shows the full uncropped image at its native proportions */
.email-frame-large .email-frame-body.has-image img {
  height: auto;
  object-fit: fill;
}
