/* ═══════════════════════════════════════════════════════════════
   EUROBUILD DIANI · subpage.css
   Inherits all tokens from style.css (:root variables, base reset)
   ═══════════════════════════════════════════════════════════════ */


/* ── SUB HERO ── */
.sub-hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--base);
}
.sub-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.sub-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: grayscale(28%) contrast(1.05);
}
.sub-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(5,14,26,0.97) 0%,
    rgba(5,14,26,0.60) 42%,
    rgba(5,14,26,0.18) 100%
  );
}
.sub-hero-content {
  position: relative;
  z-index: 2;
  padding: 0 72px 72px;
  max-width: 900px;
}
.sub-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--cond);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(138,175,200,0.45);
  text-decoration: none;
  margin-bottom: 32px;
  transition: color 0.25s;
}
.sub-back:hover { color: var(--steel); }
.sub-hero-title {
  font-family: var(--serif);
  font-size: clamp(56px, 9vw, 108px);
  font-weight: 300;
  line-height: 0.92;
  color: var(--white);
  margin: 18px 0 26px;
  letter-spacing: -0.025em;
}
.sub-hero-title em {
  font-style: italic;
  color: var(--ice);
}
.sub-hero-tagline {
  font-family: var(--serif);
  font-size: clamp(15px, 1.35vw, 18px);
  font-weight: 300;
  font-style: italic;
  line-height: 1.7;
  color: rgba(220,233,245,0.72);
  max-width: 500px;
}


/* ── DIVIDERS ── */
.silver-line {
  position: relative;
  height: 1px;
  margin: 0;
  border: none;
  background: linear-gradient(
    90deg,
    transparent            0%,
    rgba(210,220,230,0.05) 15%,
    rgba(255,255,255,0.22) 50%,
    rgba(210,220,230,0.05) 85%,
    transparent            100%
  );
}


/* ── CAPABILITY STRIP ── */
.sub-capability {
  background: #0b1a29;
  padding: 40px 72px;
}
.capability-list {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 0;
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}
.capability-list span {
  font-family: var(--cond);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(138,175,200,0.48);
  padding: 0 16px;
}
.cap-dot {
  color: rgba(24,95,165,0.28) !important;
  padding: 0 !important;
  letter-spacing: 0 !important;
}


/* ═══════════════════════════════════════════════════════════════
   PROJECT BLOCKS
   Architecture: unified card, image-left / text-right on every
   project. No alternation. Reading flow never reverses.
   ═══════════════════════════════════════════════════════════════ */

.sub-projects {
  background: var(--base);
  padding: 96px 0 0;
}
.projects-header {
  padding: 0 72px 64px;
}

/* ── CARD SHELL ── */
.project-block {
  position: relative;
  display: grid;
  gap: 0;
  margin: 0 64px 56px;
  border: 1px solid rgba(138,175,200,0.08);
  background: linear-gradient(
    160deg,
    rgba(255,255,255,0.022) 0%,
    rgba(255,255,255,0.010) 100%
  );
  box-shadow:
    0 2px 0 rgba(255,255,255,0.018),
    0 24px 64px rgba(0,0,0,0.22);
  transition:
    transform    0.55s cubic-bezier(0.22,1,0.36,1),
    border-color 0.45s ease,
    box-shadow   0.45s ease;
  overflow: hidden;
}
.project-block:hover {
  transform: translateY(-6px);
  border-color: rgba(138,175,200,0.17);
  box-shadow:
    0 2px 0 rgba(255,255,255,0.024),
    0 40px 88px rgba(0,0,0,0.30);
}

/* thin accent line — top-left corner, grows on hover */
.project-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 0;
  background: linear-gradient(to bottom, var(--diani), transparent);
  z-index: 4;
  transition: height 0.6s cubic-bezier(0.22,1,0.36,1);
}
.project-block:hover::before { height: 100%; }

/* project number — ghosted, anchors card as numbered entry */
.project-index {
  font-family: var(--serif);
  font-size: 80px;
  line-height: 1;
  color: rgba(138,175,200,0.055);
  margin-bottom: 16px;
  letter-spacing: -0.05em;
  user-select: none;
  transition: color 0.5s ease;
}
.project-block:hover .project-index {
  color: rgba(138,175,200,0.09);
}


/* ── IMAGE PANEL ── */
.project-image {
  position: relative;
  overflow: hidden;
}
.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(20%) contrast(1.04);
  transform: scale(1.04);
  transition:
    transform 1.2s cubic-bezier(0.22,1,0.36,1),
    filter    0.7s ease;
}
.project-block:hover .project-image img {
  transform: scale(1.0);
  filter: grayscale(5%) contrast(1.07);
}

/* gradient overlay on image */
.project-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(5,14,26,0.12) 0%,
    transparent 60%
  );
  opacity: 0.8;
  transition: opacity 0.55s ease;
  pointer-events: none;
  z-index: 1;
}
.project-block:hover .project-image::after { opacity: 0.3; }


/* ── CONTENT PANEL ── */
.project-content {
  background: transparent;
  border: none;
  padding: 52px 56px 52px 52px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: transform 0.55s cubic-bezier(0.22,1,0.36,1);
}
.project-block:hover .project-content {
  transform: translateY(-5px);
}


/* ── META LINE ── */
.project-meta {
  font-family: var(--cond);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--steel);
  opacity: 0.7;
  margin-bottom: 16px;
}


/* ── DETAILS BAR ── */
.project-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 28px;
  border-top: 0.5px solid rgba(138,175,200,0.09);
  border-bottom: 0.5px solid rgba(138,175,200,0.09);
  padding: 11px 0;
}
.project-details span {
  font-family: var(--cond);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(138,175,200,0.55);
  padding-right: 16px;
  margin-right: 16px;
  border-right: 0.5px solid rgba(138,175,200,0.13);
  line-height: 1.8;
}
.project-details span:last-child {
  border-right: none;
  margin-right: 0;
  padding-right: 0;
}


/* ── TITLE ── */
.project-title {
  font-family: var(--serif);
  font-size: clamp(26px, 2.8vw, 42px);
  font-weight: 400;
  line-height: 1.05;
  color: var(--white);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.project-title em {
  font-style: italic;
  font-weight: 300;
  color: var(--ice);
}


/* ── DESCRIPTION ── */
.project-desc {
  font-family: var(--sans);
  font-size: clamp(14px, 1vw, 15px);
  font-weight: 300;
  line-height: 1.95;
  color: rgba(220,232,244,0.76);
  margin-bottom: 28px;
  max-width: 520px;
}


/* ── ROLE TAG ── */
.project-role {
  font-family: var(--cond);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(24,95,165,0.80);
  padding: 10px 14px;
  border-left: 1.5px solid rgba(24,95,165,0.38);
  background: rgba(24,95,165,0.042);
  margin-top: auto;
  align-self: flex-start;
  transition: border-color 0.3s, background 0.3s;
}
.project-block:hover .project-role {
  border-color: rgba(24,95,165,0.62);
  background: rgba(24,95,165,0.07);
}


/* ── LAYOUT: image left, content right — every project ── */
.project-block--left,
.project-block--right,
.project-block--full {
  grid-template-columns: 1.08fr 0.92fr;
}
.project-block--left .project-image,
.project-block--right .project-image,
.project-block--full .project-image  {
  order: 1;
  min-height: 520px;
}
.project-block--left .project-content,
.project-block--right .project-content,
.project-block--full .project-content {
  order: 2;
}

/* ── EVEN CARDS: subtle size variation — prevents monotony ── */
.project-block:nth-child(even) {
  grid-template-columns: 0.92fr 1.08fr;
}
.project-block:nth-child(even) .project-image  { min-height: 480px; }
.project-block:nth-child(even) .project-content { padding: 48px 52px 48px 56px; }


/* ═══════════════════════════════════════════════════════════════
   REVEAL SYSTEM
   Single source of truth. No !important. No conflicts.
   Desktop: 0.75s refined ease.
   Mobile:  0.55s lighter lift — still alive, not disabled.
   ═══════════════════════════════════════════════════════════════ */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity   0.75s cubic-bezier(0.22,1,0.36,1),
    transform 0.75s cubic-bezier(0.22,1,0.36,1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* project blocks get a slightly longer, more architectural reveal */
.project-block.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity      0.85s cubic-bezier(0.22,1,0.36,1),
    transform    0.85s cubic-bezier(0.22,1,0.36,1),
    border-color 0.45s ease,
    box-shadow   0.45s ease;
  /* NOTE: hover overrides are separate — transition handles both */
}
.project-block.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
/* hover lift still works after reveal completes */
.project-block.reveal.visible:hover {
  transform: translateY(-6px);
}


/* ── STATS ── */
.sub-stats {
  background: #0b1a29;
  padding: 72px 72px;
  border-top: 0.5px solid rgba(138,175,200,0.07);
  border-bottom: 0.5px solid rgba(138,175,200,0.07);
  margin-top: 56px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 0;
  align-items: start;
  max-width: 860px;
}
.stat-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 48px 0 0;
  border-right: 0.5px solid rgba(138,175,200,0.08);
}
.stat-item:first-child { padding-left: 0; }
.stat-item:last-child  { border-right: none; }
.stat-number {
  display: block;
  font-family: var(--serif);
  font-size: clamp(30px, 3.2vw, 46px);
  font-weight: 300;
  font-style: italic;
  color: var(--ice);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.stat-label {
  display: block;
  font-family: var(--cond);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(138,175,200,0.48);
  line-height: 1.7;
  max-width: 200px;
}


/* ── CLOSING STATEMENT ── */
.sub-statement {
  background: var(--base);
  padding: 96px 72px;
  max-width: 1000px;
}
.sub-statement-text {
  font-family: var(--serif);
  font-size: clamp(19px, 2vw, 28px);
  font-weight: 300;
  line-height: 1.7;
  color: rgba(225,235,245,0.72);
}
.sub-statement-text em {
  font-style: italic;
  color: var(--ice);
}


/* ── CTA ── */
.sub-cta {
  background: var(--base);
  padding: 80px 72px 112px;
  border-top: 0.5px solid rgba(138,175,200,0.06);
}
.sub-cta-label {
  font-family: var(--cond);
  font-size: 9px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--steel);
  opacity: 0.6;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sub-cta-label::before {
  content: '';
  display: block;
  width: 18px;
  height: 0.5px;
  background: currentColor;
}
.sub-cta-text {
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 44px);
  font-weight: 300;
  color: rgba(238,243,248,0.84);
  margin-bottom: 32px;
  line-height: 1.2;
}
.sub-cta-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 17px 36px;
  border-radius: 2px;
  background: var(--diani);
  color: #f5f9ff;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: var(--cond);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  box-shadow:
    0 10px 32px rgba(24,95,165,0.24),
    inset 0 1px 0 rgba(255,255,255,0.08);
  transition:
    transform  0.35s ease,
    box-shadow 0.35s ease,
    background 0.3s ease;
}
.sub-cta-link:hover {
  transform: translateY(-3px);
  background: #1a72c2;
  box-shadow:
    0 18px 44px rgba(24,95,165,0.34),
    inset 0 1px 0 rgba(255,255,255,0.12);
}
.sub-cta-link:active { transform: translateY(-1px); }

.sub-back-home {
  display: block;
  margin-top: 26px;
  font-family: var(--cond);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(138,175,200,0.36);
  text-decoration: none;
  transition: color 0.2s;
}
.sub-back-home:hover { color: var(--steel); }


/* ── FLOATING RETURN BUTTON ── */
.floating-home {
  position: fixed;
  top: 26px;
  right: 32px;
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
  border-radius: 2px;
  background: rgba(8,18,31,0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(238,243,248,0.82);
  text-decoration: none;
  font-family: var(--cond);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  border: 1px solid rgba(138,175,200,0.12);
  box-shadow: 0 8px 28px rgba(0,0,0,0.22);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition:
    opacity    0.4s ease,
    transform  0.4s ease,
    background 0.3s ease,
    border-color 0.3s ease;
}
.floating-home.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.floating-home:hover {
  background: rgba(12,26,44,0.94);
  border-color: rgba(138,175,200,0.24);
}


/* ═══════════════════════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════════════════════ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5,14,26,0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
@media (min-width: 769px) {
  .modal-backdrop {
    align-items: center;
    padding: 24px;
  }
}
.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: #0E1F30;
  border: 0.5px solid rgba(138,175,200,0.14);
  border-radius: 2px 2px 0 0;
  width: 100%;
  max-width: 480px;
  position: relative;
  transform: translateY(30px);
  transition: transform 0.4s cubic-bezier(0.22,1,0.36,1);
}
@media (min-width: 769px) {
  .modal {
    border-radius: 2px;
    transform: translateY(20px);
    max-height: 92svh;
    overflow-y: auto;
    overflow-x: hidden;
  }
}
.modal-backdrop.open .modal { transform: translateY(0); }
.modal-close-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: flex-end;
  padding: 14px 16px 0;
  background: #0E1F30;
}
.modal-close {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 50%;
  color: #fff;
  font-size: 16px;
  font-weight: 300;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  flex-shrink: 0;
}
.modal-close:hover  { background: rgba(255,255,255,0.13); transform: scale(1.05); }
.modal-close:active { transform: scale(0.95); }
.modal-body { padding: 10px 28px 36px; }
.modal-label {
  font-family: var(--cond);
  font-size: 9px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--steel);
  opacity: 0.5;
  margin-bottom: 10px;
}
.modal-heading {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 300;
  color: var(--ice);
  line-height: 1.2;
  margin-bottom: 26px;
}
.modal-heading em { font-style: italic; color: var(--steel); }
.modal-form { display: flex; flex-direction: column; gap: 14px; }
.modal-form .form-field { display: flex; flex-direction: column; gap: 6px; }
.modal-form .form-label {
  font-family: var(--cond);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(138,175,200,0.42);
}
.modal-form .form-input,
.modal-form .form-textarea {
  background: rgba(255,255,255,0.03);
  border: 0.5px solid rgba(138,175,200,0.12);
  border-radius: 2px;
  padding: 12px 14px;
  color: var(--ice);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 300;
  outline: none;
  width: 100%;
  -webkit-appearance: none;
  transition: border-color 0.2s, background 0.2s;
}
.modal-form .form-input:focus,
.modal-form .form-textarea:focus {
  border-color: rgba(24,95,165,0.52);
  background: rgba(24,95,165,0.042);
}
.modal-form .form-textarea {
  resize: none;
  height: 88px;
  line-height: 1.6;
}
.modal-form .form-input::placeholder,
.modal-form .form-textarea::placeholder {
  color: rgba(138,175,200,0.24);
}
.modal-form-footer {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.spinner {
  width: 13px;
  height: 13px;
  border: 1.5px solid rgba(255,255,255,0.22);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
  display: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
.form-submit.loading .spinner { display: block; }
.form-submit.loading .btn-text { opacity: 0.72; }
.modal-form .form-submit {
  padding: 13px 28px;
  background: var(--diani);
  border: none;
  border-radius: 2px;
  color: var(--white);
  font-family: var(--cond);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 160px;
  justify-content: center;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
}
.modal-form .form-submit:hover  { background: #1a72c2; }
.modal-form .form-submit:active { transform: scale(0.98); }
.modal-form .form-submit:disabled { opacity: 0.72; cursor: not-allowed; }
.modal-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--cond);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(138,175,200,0.46);
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}
.modal-whatsapp:hover { color: var(--steel); }
.modal-success {
  display: none;
  font-family: var(--cond);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--steel);
  margin-top: 8px;
}
.modal-success.show { display: block; }


/* ═══════════════════════════════════════════════════════════════
   MOBILE
   One clean breakpoint. No !important wars.
   Animations are lighter, not disabled.
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

  /* ── Hero ── */
  .sub-hero-content { padding: 0 24px 48px; }
  .sub-hero-tagline { font-size: 15px; }

  /* ── Capability ── */
  .sub-capability  { padding: 34px 24px; }
  .capability-list span { font-size: 9px; padding: 0 10px; }

  /* ── Projects ── */
  .sub-projects    { padding: 56px 0 0; }
  .projects-header { padding: 0 24px 40px; }

  /* Cards: full bleed, no hover lift, stacked layout */
  .project-block,
  .project-block:nth-child(even) {
    grid-template-columns: 1fr;
    margin: 0 0 8px;
    border-left: none;
    border-right: none;
    box-shadow: none;
    transform: none;
  }
  .project-block:hover,
  .project-block:nth-child(even):hover {
    transform: none;
    box-shadow: none;
  }
  .project-block:hover .project-content,
  .project-block:nth-child(even):hover .project-content {
    transform: none;
  }
  .project-block::before { display: none; }

  .project-block--left .project-image,
  .project-block--right .project-image,
  .project-block--full .project-image,
  .project-block:nth-child(even) .project-image  {
    order: 1;
    min-height: 56vw;
  }
  .project-block--left .project-content,
  .project-block--right .project-content,
  .project-block--full .project-content,
  .project-block:nth-child(even) .project-content {
    order: 2;
    padding: 28px 22px 32px;
  }

  .project-index   { font-size: 52px; margin-bottom: 10px; }
  .project-desc    { max-width: 100%; font-size: 14px; }
  .project-details { flex-direction: column; gap: 4px; }
  .project-details span {
    border-right: none;
    padding-right: 0;
    margin-right: 0;
  }

  /* ── Reveal — lighter lift, not disabled ── */
  .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition:
      opacity   0.55s cubic-bezier(0.22,1,0.36,1),
      transform 0.55s cubic-bezier(0.22,1,0.36,1);
  }
  .reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }
  .project-block.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition:
      opacity   0.55s cubic-bezier(0.22,1,0.36,1),
      transform 0.55s cubic-bezier(0.22,1,0.36,1);
  }
  .project-block.reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }

  /* ── Stats ── */
  .sub-stats    { padding: 48px 24px; margin-top: 0; }
  .stats-grid   { grid-template-columns: 1fr; gap: 0; max-width: 100%; }
  .stat-item    {
    padding: 0 0 24px;
    margin-bottom: 24px;
    border-right: none;
    border-bottom: 0.5px solid rgba(138,175,200,0.07);
  }
  .stat-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

  /* ── Statement + CTA ── */
  .sub-statement { padding: 56px 24px; }
  .sub-cta       { padding: 56px 24px 80px; }
  .sub-back-home { margin-top: 22px; }

  /* ── Floating home ── */
  .floating-home {
    top: 16px;
    right: 16px;
    padding: 11px 16px;
    font-size: 9px;
    letter-spacing: 0.16em;
  }

  /* ── Modal ── */
  .modal-body    { padding: 10px 22px 32px; }
  .modal-heading { font-size: 22px; margin-bottom: 20px; }
  .modal-form-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
}