/* Layout refresh for the light site. Loaded after each page's inline CSS. */

.hero,
.intro,
.offer-list,
.gallery-grid,
.hook,
.footer,
.resume-header,
.stats-row,
.resume-photo,
.hero-photo,
.message-block,
.section-label,
.payment-card {
  animation: none !important;
  opacity: 1 !important;
}

/* Home */
body:has(.hero) .hero {
  min-height: 92vh;
  height: auto;
  display: grid;
  align-items: end;
  isolation: isolate;
  background: #101b17;
}

body:has(.hero) .hero > img {
  filter: saturate(1.12) contrast(1.08) brightness(0.72);
}

body:has(.hero) .hero::after {
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(8,15,13,0.20) 0%, rgba(8,15,13,0.10) 43%, rgba(8,15,13,0.04) 100%),
    linear-gradient(0deg, rgba(8,15,13,0.42) 0%, rgba(8,15,13,0.04) 56%, rgba(8,15,13,0) 100%);
}

body:has(.hero) .hero-content {
  width: min(1400px, calc(100% - 104px));
  margin: 0 auto;
  padding: 0 0 clamp(48px, 9vh, 84px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

body:has(.hero) .hero-name {
  font-size: clamp(48px, 7vw, 90px);
  color: #fffdf8;
  letter-spacing: 0;
  line-height: 0.8;
  max-width: 330px;
  text-shadow: 0 22px 48px rgba(0,0,0,0.38);
}

body:has(.hero) .hero-name em {
  color: #bfffea;
  display: block;
  padding-left: clamp(12px, 4vw, 46px);
}

body:has(.hero) .hero-title {
  color: rgba(255,253,248,0.86);
  letter-spacing: 0.12em;
  line-height: 1.7;
  max-width: 330px;
  margin: 18px 0 26px;
}

body:has(.hero) .hero-ctas {
  justify-content: flex-start;
  gap: 10px;
}

body:has(.hero) .btn {
  letter-spacing: 0.08em;
  padding: 13px 18px;
  border-radius: 2px;
}

body:has(.hero) .btn-primary {
  background: #fffdf8;
  color: #101b17;
  box-shadow: 0 14px 34px rgba(0,0,0,0.22);
}

body:has(.hero) .btn-primary:hover {
  background: #d6fff3;
}

body:has(.hero) .btn-secondary {
  background: rgba(255,253,248,0.08);
  color: #fffdf8;
  border-color: rgba(255,253,248,0.38);
}

body:has(.hero) .btn-secondary:hover {
  border-color: #fffdf8;
  color: #fffdf8;
}

body:has(.hero) .container {
  max-width: 1120px;
  padding-top: 72px;
}

body:has(.hero) .intro {
  max-width: 650px;
  margin: 0 0 58px;
  text-align: left;
}

body:has(.hero) .intro p {
  font-size: clamp(20px, 3vw, 31px);
  line-height: 1.35;
}

body:has(.hero) .offer-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

body:has(.hero) .offer-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  padding: 22px;
  border: 0;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(255,253,248,0.38);
}

body:has(.hero) .offer-name {
  font-size: 17px;
  line-height: 1.2;
}

body:has(.hero) .offer-desc {
  margin-top: 0;
}

body:has(.hero) .gallery-grid {
  grid-template-columns: 1.2fr 0.8fr 1fr;
  grid-auto-rows: 180px;
  gap: 12px;
}

body:has(.hero) .gallery-item {
  aspect-ratio: auto;
  min-height: 0;
  background: var(--card2);
}

body:has(.hero) .gallery-item:nth-child(1),
body:has(.hero) .gallery-item:nth-child(6) {
  grid-row: span 2;
}

body:has(.hero) .gallery-item:nth-child(4) {
  grid-column: span 2;
}

body:has(.hero) .hook {
  margin-top: 72px;
  padding-top: 34px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  text-align: left;
}

body:has(.hero) .hook p {
  font-size: 18px;
  line-height: 1.65;
  max-width: 620px;
  margin: 0;
}

/* Resume */
body:has(.resume-header) .resume-header {
  max-width: 1120px;
  padding: 88px 22px 34px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

body:has(.resume-header) .resume-name {
  font-size: clamp(46px, 7.6vw, 86px);
  letter-spacing: 0;
  line-height: 0.85;
  max-width: 420px;
}

body:has(.resume-header) .resume-title {
  max-width: 560px;
  margin-top: 18px;
  letter-spacing: 0.12em;
  line-height: 1.7;
}

body:has(.resume-header) .container {
  max-width: 820px;
  display: block;
  padding-top: 34px;
}

body:has(.resume-header) .summary {
  margin: 0 0 10px;
  font-size: 16px;
  max-width: 620px;
}

body:has(.resume-header) .stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--border);
  background: rgba(255,253,248,0.5);
}

body:has(.resume-header) .stat {
  min-width: 0;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

body:has(.resume-header) .stat:nth-child(2n),
body:has(.resume-header) .stat:last-child {
  border-right: 0;
}

body:has(.resume-header) .stat:nth-last-child(-n+2) {
  border-bottom: 0;
}

body:has(.resume-header) .resume-photo {
  border-radius: 0;
  margin: 10px 0 40px;
  box-shadow: var(--shadow);
}

body:has(.resume-header) .entry {
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}

body:has(.resume-header) .entry:first-child {
  border-top: 1px solid var(--border);
}

/* Tip */
body:has(.payment-grid) .hero-photo {
  --tip-hero-scale: 900px;
  --tip-hero-y: 44%;
  height: min(68vh, 640px);
  min-height: 460px;
  background: #101b17;
  background-image: url("images/DS205850 (1).jpg");
  background-repeat: no-repeat;
  background-size: max(100vw, var(--tip-hero-scale)) auto;
  background-position: center var(--tip-hero-y);
}

body:has(.payment-grid) .hero-photo > img {
  opacity: 0;
}

body:has(.payment-grid) .hero-photo::after {
  background:
    linear-gradient(90deg, rgba(8,15,13,0.26), rgba(8,15,13,0.04)),
    linear-gradient(0deg, rgba(8,15,13,0.28), rgba(8,15,13,0));
}

body:has(.payment-grid) .hero-photo-text {
  left: clamp(22px, 6vw, 72px);
  right: auto;
  bottom: clamp(32px, 8vh, 78px);
  max-width: 540px;
  text-align: left;
}

body:has(.payment-grid) .hero-name {
  font-size: clamp(64px, 12vw, 124px);
  color: #fffdf8;
  letter-spacing: 0;
  line-height: 0.8;
  text-shadow: 0 22px 48px rgba(0,0,0,0.38);
}

body:has(.payment-grid) .hero-name em {
  color: #bfffea;
  display: block;
  padding-left: clamp(12px, 4vw, 46px);
}

body:has(.payment-grid) .hero-title {
  color: rgba(255,253,248,0.72);
  letter-spacing: 0.13em;
  line-height: 1.7;
}

body:has(.payment-grid) .container {
  max-width: 920px;
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  gap: 28px 54px;
  padding-top: 46px;
}

body:has(.payment-grid) .message-block {
  grid-row: 1 / span 2;
  padding: 0;
  border-bottom: 0;
  text-align: left;
}

body:has(.payment-grid) .message-main {
  margin: 0;
  max-width: none;
  font-size: clamp(20px, 3vw, 30px);
  line-height: 1.4;
}

body:has(.payment-grid) .message-contact {
  justify-content: flex-start;
}

body:has(.payment-grid) .container > .section-label,
body:has(.payment-grid) .payment-grid {
  grid-column: 2;
}

body:has(.payment-grid) .container > .section-label {
  grid-row: 1;
  margin-top: 0;
}

body:has(.payment-grid) .payment-grid {
  grid-row: 2;
  align-self: start;
}

body:has(.payment-grid) .payment-name {
  font-size: 17px;
}

body:has(.payment-grid) .payment-handle {
  font-size: 13px;
}

body:has(.payment-grid) .payment-note {
  font-size: 12px;
}

body:has(.payment-grid) .payment-card {
  border-radius: 0;
  background: rgba(255,253,248,0.62);
  box-shadow: none;
}

body:has(.payment-grid) .payment-card:hover {
  transform: translateX(0);
  background: #fffdf8;
}

body:has(.payment-grid) .footer {
  grid-column: 1 / -1;
}

@media (max-width: 900px) {
  body:has(.hero) .hero-content,
  body:has(.resume-header) .container,
  body:has(.payment-grid) .container {
    grid-template-columns: 1fr;
  }

  body:has(.hero) .hero-title {
    margin-left: 0;
    margin-right: 0;
  }

  body:has(.hero) .hero-ctas {
    justify-content: flex-start;
  }

  body:has(.hero) .offer-list {
    grid-template-columns: repeat(2, 1fr);
  }

  body:has(.hero) .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 170px;
  }

  body:has(.hero) .gallery-item:nth-child(4) {
    grid-column: span 1;
  }

  body:has(.payment-grid) .container > .section-label,
  body:has(.payment-grid) .payment-grid {
    grid-column: 1;
  }

  body:has(.payment-grid) .message-block,
  body:has(.payment-grid) .container > .section-label,
  body:has(.payment-grid) .payment-grid {
    grid-row: auto;
  }

  body:has(.payment-grid) .payment-grid {
    padding-top: 0;
  }
}

@media (max-width: 560px) {
  body:has(.hero) .hero {
    min-height: 760px;
  }

  body:has(.hero) .hero::after {
    background:
      linear-gradient(90deg, rgba(8,15,13,0.24), rgba(8,15,13,0.08)),
      linear-gradient(0deg, rgba(8,15,13,0.44), rgba(8,15,13,0.02) 60%);
  }

  body:has(.hero) .hero-content {
    width: calc(100% - 32px);
  }

  body:has(.hero) .hero-name {
    font-size: clamp(50px, 16vw, 78px);
  }

  body:has(.hero) .hero-name em {
    padding-left: 18px;
  }

  body:has(.hero) .btn {
    width: 100%;
    text-align: center;
  }

  body:has(.hero) .offer-list {
    grid-template-columns: 1fr;
  }

  body:has(.hero) .offer-item {
    min-height: 0;
    padding: 20px;
  }

  body:has(.hero) .gallery-grid {
    grid-auto-rows: 150px;
    gap: 8px;
  }

  body:has(.hero) .gallery-item:nth-child(1),
  body:has(.hero) .gallery-item:nth-child(6) {
    grid-row: span 1;
  }

  body:has(.resume-header) .stats-row {
    grid-template-columns: 1fr;
  }

  body:has(.resume-header) .stat,
  body:has(.resume-header) .stat:nth-child(2n),
  body:has(.resume-header) .stat:last-child {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  body:has(.resume-header) .stat:last-child {
    border-bottom: 0;
  }

  body:has(.resume-header) .resume-name {
    font-size: clamp(42px, 14vw, 62px);
    max-width: 300px;
  }

  body:has(.payment-grid) .hero-photo {
    --tip-hero-scale: 1100px;
    --tip-hero-y: 52%;
    min-height: 560px;
    background-size: var(--tip-hero-scale) auto;
    background-position: center var(--tip-hero-y);
  }

  body:has(.payment-grid) .hero-photo-text {
    left: 18px;
    right: 18px;
  }
}
