:root {
  --ink: #08070d;
  --paper: #f4f1eb;
  --card: #121018;
  --muted: #aaa2b5;
  --line: #342e3f;
  --violet: #9b71f3;
  --violet-dark: #7b4fda;
  --yellow: #c8a7ff;
  --green: #58c98b;
  --shadow: 0 24px 70px rgba(25, 14, 44, .2);
}

body {
  overflow-x: hidden;
  background: var(--ink);
  color: #f7f4fb;
}

section[id] {
  scroll-margin-top: 110px;
}

.shell {
  width: min(1220px, calc(100% - 56px));
}

.topbar {
  position: fixed;
  z-index: 50;
  inset: 0 0 auto;
  height: 46px;
  padding: 6px 20px 0;
  background: rgba(8, 7, 13, .92);
  color: #c9c0d3;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  backdrop-filter: blur(18px);
}

.topbar span {
  color: #d2b7ff;
}

header {
  position: fixed;
  z-index: 40;
  inset: 46px 5.5% auto;
  top: 46px;
  height: 68px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(11, 9, 16, .76);
  color: #fff;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .22);
  backdrop-filter: blur(22px);
}

header .nav {
  width: 100%;
  padding: 0 22px;
}

.brand {
  color: #fff;
  letter-spacing: -.02em;
}

.mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border-color: rgba(255, 255, 255, .24);
  box-shadow: none;
}

.brand small {
  color: #b5aabd;
}

.navlinks {
  gap: 24px;
  color: #d3cbdc;
  font-size: .84rem;
}

.navlinks a:not(.nav-cta):hover {
  color: #cdb2ff;
}

.nav-cta {
  border-radius: 999px;
  background: var(--violet);
  color: #fff;
  padding: 11px 18px;
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: 990px;
  display: flex;
  align-items: center;
  padding: 185px 0 130px;
  overflow: hidden;
  text-align: left;
  color: #fff;
  background:
    radial-gradient(circle at 82% 36%, rgba(155, 113, 243, .22), transparent 31%),
    linear-gradient(90deg, #07070a 0%, #0b0811 56%, #07070a 100%),
    #07070a;
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 760px;
  height: 760px;
  left: -360px;
  bottom: -430px;
  border: 105px solid rgba(155, 113, 243, .1);
  border-radius: 50%;
}

.hero-grid {
  display: block;
  width: min(1220px, calc(100% - 56px));
  max-width: none;
  margin: 0 auto;
}

.eyebrow {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #d2c1f2;
  font-size: .72rem;
  letter-spacing: .17em;
}

.eyebrow i {
  width: 38px;
  height: 1px;
  border-radius: 0;
  background: currentColor;
}

.hero h1 {
  max-width: 770px;
  margin: 30px 0 28px;
  font-size: clamp(4.7rem, 8.4vw, 8.3rem);
  line-height: .89;
  letter-spacing: -.075em;
}

.hero h1 span {
  display: block;
  color: #b997ff;
  font-family: Georgia, serif;
  font-weight: 400;
  letter-spacing: -.065em;
}

.hero p {
  max-width: 570px;
  margin: 0 0 32px;
  color: #c7bfce;
  font-size: 1.03rem;
}

.hero-actions {
  justify-content: flex-start;
  gap: 14px;
}

.primary,
.secondary {
  border-radius: 999px;
  padding: 14px 20px;
}

.primary {
  background: var(--violet);
  box-shadow: none;
}

.primary:hover {
  background: #ab86f7;
}

.secondary {
  border: 1px solid rgba(255, 255, 255, .32);
  background: rgba(255, 255, 255, .04);
  color: #fff;
}

.stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 760px;
  margin: 58px 0 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, .18);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.stat {
  padding: 24px 20px 0 0;
  border-right: 0;
  border-left: 1px solid rgba(255, 255, 255, .14);
}

.stat:first-child {
  border-left: 0;
}

.stat strong {
  color: #c6a6ff;
  font-size: 2.35rem;
}

.stat span {
  color: #aaa2b5;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.trust {
  justify-content: flex-start;
  gap: 24px;
  margin-top: 28px;
  color: #9d95a7;
}

.trust b {
  color: #fff;
}

.gallery {
  position: relative;
  z-index: 2;
  padding: 120px 0;
  border-radius: 34px 34px 0 0;
  background: var(--paper);
  color: #131117;
}

.section-head {
  align-items: end;
  margin-bottom: 42px;
}

.section-head h2 {
  font-size: clamp(3.2rem, 6vw, 6rem);
  line-height: .94;
  letter-spacing: -.065em;
}

.section-head p {
  color: #6c6870;
  font-size: 1rem;
}

.showcase-label {
  color: var(--violet-dark);
  letter-spacing: .17em;
}

.category-nav {
  gap: 10px;
  padding: 0 0 42px;
}

.category-nav a {
  border-color: #cbc6ce;
  background: transparent;
  color: #28242e;
  padding: 11px 17px;
}

.category-nav a:first-child,
.category-nav a:hover {
  border-color: #161219;
  background: #161219;
  color: #c8a7ff;
}

.grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 42px 18px;
  align-items: start;
}

.template {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.template:hover {
  box-shadow: none;
  transform: translateY(-5px);
}

.portfolio-thumb,
.portfolio-slider {
  border-radius: 16px;
  background: #e5e1e8;
}

.portfolio-thumb {
  transition: transform .4s ease;
}

.template:hover .portfolio-thumb {
  transform: scale(1.012);
}

.portfolio-thumb.portrait {
  background: #15131a;
}

/* Keep every tuition post in one consistent 1:1 frame without cropping it. */
#templateGrid .template {
  display: flex;
  flex-direction: column;
}

#templateGrid .template > .portfolio-thumb,
#templateGrid .portfolio-slider {
  width: 100%;
  aspect-ratio: 1 / 1;
  flex: 0 0 auto;
}

#templateGrid .template > .portfolio-thumb {
  height: auto;
  object-fit: contain;
  background: #15131a;
}

/* New portfolio uploads keep their original 4:5 or 1:1 artwork ratio. */
#templateGrid .template.natural-ratio > .portfolio-thumb.natural-artwork {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  background: transparent;
}

#templateGrid .template.natural-ratio .template-info {
  margin-top: 0;
}

#templateGrid .portfolio-slider .portfolio-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
  background: #15131a;
  opacity: 0;
  transition: opacity .45s ease, transform .4s ease;
}

#templateGrid .portfolio-slider .portfolio-thumb:first-child {
  opacity: 1;
}

#templateGrid .portfolio-slider:hover .portfolio-thumb:first-child {
  opacity: 0;
}

#templateGrid .portfolio-slider:hover .portfolio-thumb:last-child {
  opacity: 1;
}

#templateGrid .template-info {
  margin-top: auto;
  min-height: 64px;
}

.template-info {
  padding: 15px 4px 0;
  border-top: 0;
}

.template-info h4 {
  font-size: 1rem;
  color: #17131c;
}

.template-info small {
  color: #77717b;
}

.view {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #17131c;
  color: #c8a7ff;
  font-size: 0;
}

.view::after {
  content: "View";
  font-size: .67rem;
}

.showcase {
  padding: 120px 0;
  background: var(--paper);
  color: #151219;
}

.showcase.alt {
  background: #08070d;
  color: #fff;
}

.showcase.alt .section-head p {
  color: #aaa2b5;
}

.showcase.alt .showcase-label {
  color: #b997ff;
}

.showcase-track {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.showcase-card,
.showcase-card:first-child {
  min-height: 360px;
  border-radius: 18px;
  border-color: #d2cdd5;
  background: #e8e3ec;
}

.showcase-card::before {
  border-color: rgba(123, 79, 218, .14);
}

.showcase-card::after {
  border-color: rgba(123, 79, 218, .24);
}

.showcase.alt .showcase-card {
  border-color: #332d3e;
  background: #131019;
}

.showcase.alt .showcase-card::before {
  border-color: rgba(185, 151, 255, .11);
}

.portfolio-image-card {
  min-height: 0 !important;
  padding: 0 !important;
  border: 0;
  background: transparent !important;
}

.portfolio-image-card img {
  min-height: 0;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  object-fit: cover;
}

.banner-track {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.banner-card {
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.banner-card img {
  height: 650px;
  border-radius: 18px;
  background: #111016;
}

.banner-card.wide img {
  border-radius: 18px;
}

.process {
  padding: 125px 0;
  background:
    radial-gradient(circle at 85% 15%, rgba(155, 113, 243, .22), transparent 30%),
    #0a080f;
}

.process .section-head p {
  color: #aaa2b5;
}

.steps {
  gap: 0;
  margin-top: 52px;
}

.step {
  padding: 30px 28px 32px 0;
  border: 0;
  border-top: 1px solid #393241;
  border-radius: 0;
  background: transparent;
}

.step + .step {
  padding-left: 28px;
}

.step strong {
  width: auto;
  height: auto;
  justify-content: start;
  background: transparent;
  color: #b997ff;
  font-size: .78rem;
  letter-spacing: .14em;
}

.step h3 {
  margin-top: 36px;
  font-size: 1.55rem;
}

.step p {
  color: #aaa2b5;
}

.details {
  padding: 120px 0;
  background: var(--paper);
  color: #151219;
}

.package-grid {
  gap: 20px;
}

.package {
  padding: 30px;
  border-color: #d3ced7;
  border-radius: 18px;
  background: #fff;
}

.package.featured {
  border: 2px solid var(--violet);
  box-shadow: 0 22px 65px rgba(66, 39, 102, .12);
}

.package-badge {
  background: #eee5ff;
  color: #7447cd;
}

.package p,
.info-card small {
  color: #756f79;
}

.package li {
  border-color: #e5e0e7;
}

.quote {
  border-radius: 999px;
  background: #17131c;
  color: #fff;
}

.info-grid {
  margin-top: 65px;
}

.info-card {
  border-color: #d3ced7;
  border-radius: 18px;
  background: #fff;
}

.check {
  background: #eee8f7;
  color: #3e334f;
}

.delivery-row {
  border-color: #e3dee6;
}

.delivery-icon {
  border-radius: 50%;
  background: #c8a7ff;
}

.reviews {
  padding: 120px 0;
  background: #0a080f;
  color: #fff;
}

.reviews .section-head p {
  color: #aaa2b5;
}

.review-grid {
  gap: 20px;
}

.review {
  border-color: #37313f;
  border-radius: 18px;
  background: #16131b;
  box-shadow: none;
}

.review-invite {
  background: linear-gradient(145deg, #8f61e6, #55328f);
}

.review-invite a {
  border-radius: 999px;
}

.cta {
  padding: 0;
  background: var(--paper);
  color: #151219;
}

.cta-box {
  min-height: 560px;
  padding: 110px 0;
  border-top: 1px solid #cdc7d1;
  border-radius: 0;
  background: transparent;
  color: #151219;
}

.cta-box::after {
  display: none;
}

.cta h2 {
  max-width: 850px;
  font-size: clamp(3.5rem, 7vw, 7rem);
  line-height: .92;
  letter-spacing: -.07em;
}

.cta p {
  color: #6c6670;
  font-size: 1rem;
}

.cta .secondary {
  border: 0;
  background: #17131c;
  color: #fff;
  padding: 16px 22px;
}

footer {
  padding: 48px 0;
  border-color: #2f2937;
  background: #07070a;
  color: #aaa2b5;
}

.footer-row {
  gap: 42px;
}

.contact-list {
  gap: 18px 26px;
}

.contact-list a:hover {
  color: #c8a7ff;
}

.copyright {
  border-color: #2f2937;
}

.dialog {
  border: 1px solid #d9d3de;
  border-radius: 20px;
  color: #19151e;
}

.request {
  border-color: #ddd2ef;
  background: #f3ecff;
}

.dialog .secondary {
  border-color: #d4ced9;
  background: #fff;
  color: #19151e;
}

.toast {
  background: #17131c;
}

@media (max-width: 1000px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero {
    background-position: center, center, 110% 58%, center;
  }
}

@media (max-width: 900px) {
  header {
    inset-inline: 20px;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .showcase-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .showcase-card:first-child {
    grid-column: auto;
    min-height: 360px;
  }

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

  .step + .step {
    padding-left: 0;
  }

  .hero {
    min-height: 950px;
    background-size: cover, cover, auto 62%, auto;
    background-position: center, center, 120% 60%, center;
  }

  .hero h1 {
    max-width: 690px;
  }
}

@media (max-width: 580px) {
  .shell,
  .hero-grid {
    width: min(100% - 28px, 1220px);
  }

  .topbar {
    display: block;
    height: 44px;
    padding: 4px 6px 0;
  }

  header {
    inset: 50px 12px auto;
    top: 50px;
    height: 60px;
  }

  header .nav {
    padding: 0 14px;
  }

  .mark {
    width: 34px;
    height: 34px;
  }

  .brand .name {
    font-size: .82rem;
  }

  .nav-cta {
    padding: 9px 13px;
    font-size: .72rem;
  }

  .hero {
    min-height: 900px;
    padding: 125px 0 85px;
    background:
      radial-gradient(circle at 82% 26%, rgba(155, 113, 243, .22), transparent 30%),
      linear-gradient(90deg, #07070a, #0b0811),
      #07070a;
  }

  .hero h1 {
    margin-top: 24px;
    font-size: clamp(4rem, 18vw, 5.5rem);
  }

  .hero h1 span {
    font-family: Georgia, serif;
  }

  .hero p {
    max-width: 330px;
    font-size: .95rem;
  }

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

  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 46px;
  }

  .stat {
    display: block;
    padding: 20px 8px 0;
    border-bottom: 0;
  }

  .stat strong {
    font-size: 1.8rem;
  }

  .stat span {
    margin-top: 8px;
    text-align: left;
    font-size: .61rem;
  }

  .trust {
    justify-content: flex-start;
    font-size: .75rem;
  }

  .gallery,
  .showcase,
  .process,
  .details,
  .reviews {
    padding: 84px 0;
  }

  .section-head h2 {
    font-size: 3.35rem;
  }

  .grid,
  .showcase-track,
  .banner-track {
    grid-template-columns: 1fr;
  }

  .showcase-card,
  .showcase-card:first-child {
    min-height: 330px;
  }

  .portfolio-image-card img {
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .banner-card img {
    height: auto;
  }

  .package-grid,
  .review-grid {
    grid-template-columns: 1fr;
  }

  .cta-box {
    min-height: 520px;
    padding: 85px 0;
  }

  .cta h2 {
    font-size: 3.9rem;
  }

  footer {
    padding-bottom: 40px;
  }
}

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

/* Fill the square frame behind portrait artwork with a soft copy of the same design. */
#templateGrid .portrait-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 16px;
  background: #24202a;
  isolation: isolate;
}

#templateGrid .template > .portrait-frame {
  flex: 0 0 auto;
}

#templateGrid .portrait-frame .portrait-blur-bg {
  position: absolute;
  inset: -10%;
  z-index: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  filter: blur(20px) brightness(.72) saturate(1.12);
  transform: scale(1.12);
}

#templateGrid .portrait-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(10, 8, 15, .12);
  pointer-events: none;
}

#templateGrid .portrait-frame > .portfolio-thumb {
  position: absolute !important;
  inset: 0 !important;
  z-index: 2;
  display: block;
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  background: transparent !important;
  border-radius: 0;
  opacity: 1 !important;
}

#templateGrid .portfolio-slider > .portrait-frame {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .45s ease;
}

#templateGrid .portfolio-slider > .portrait-frame:first-child {
  opacity: 1;
}

#templateGrid .portfolio-slider:hover > .portrait-frame:first-child {
  opacity: 0;
}

#templateGrid .portfolio-slider:hover > .portrait-frame:last-child {
  opacity: 1;
}
