/* Site 3 — Swiss Modern */
/* Grønborg Group — Clean Swiss/International Design */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,600;1,8..60,400&family=Space+Grotesk:wght@500;700&display=swap');

/* ── Reset ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: #000000;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #FFFFFF;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol {
  list-style: none;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: 'Bebas Neue', 'Arial Narrow', sans-serif;
  font-weight: 400;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

hr {
  border: none;
  height: 1px;
  background-color: #000000;
}

/* ── Layout ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ── Navigation ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: #FFFFFF;
  border-bottom: 1px solid #000000;
  height: 64px;
  display: flex;
  align-items: center;
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-brand {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-menu a {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: color 0.2s ease;
  position: relative;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #F2B5D7;
  transition: width 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: #006B54;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 100%;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #000000;
  transition: all 0.3s ease;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Sections ── */
section {
  padding: 96px 0;
}

.nav-anchor {
  scroll-margin-top: 88px;
}

.section-rule {
  margin-bottom: 48px;
}

.section-heading {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 48px;
}

.section-subheading {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #666666;
  margin-bottom: 32px;
}

/* ── Hero ── */
#hero {
  padding-top: 160px;
  padding-bottom: 96px;
}

.hero-accent {
  width: 60px;
  height: 3px;
  background-color: #F2B5D7;
  margin-bottom: 32px;
}

.hero-subtitle {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #666666;
  margin-bottom: 16px;
}

.hero-name {
  font-family: 'Bebas Neue', 'Arial Narrow', sans-serif;
  font-weight: 400;
  font-size: clamp(48px, 8vw, 96px);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 0.95;
  margin-bottom: 48px;
}

.hero-services {
  max-width: 640px;
}

.hero-services p {
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 8px;
  color: #333333;
}

/* ── Portfolio Grid ── */
.portfolio-grid, .video-grid {
  display: grid;
  gap: 24px;
  margin-bottom: 64px;
}

.cols-1 { grid-template-columns: 1fr; max-width: 500px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }

.portfolio-card {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.portfolio-card:hover {
  transform: translateY(-2px);
}

.portfolio-card .card-image {
  overflow: hidden;
}

/* DI-annoncer er hvide — tynd 50% grå ramme så de ikke flyder ud i hvid baggrund */
#grid-di-ads .card-image {
  border: 1px solid #808080;
}

.portfolio-card .card-image img {
  width: 100%;
  height: auto;
  transition: transform 0.3s ease;
}

.portfolio-card:hover .card-image img {
  transform: scale(1.02);
}

.portfolio-card .card-info {
  padding: 16px 0;
}

.portfolio-card .card-client {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #999999;
  margin-bottom: 4px;
}

.portfolio-card .card-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-transform: none;
}

/* ── Video Card ── */
.video-card {
  cursor: pointer;
}

.video-thumb {
  position: relative;
  aspect-ratio: 5 / 3;
  overflow: hidden;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 107, 84, 0.7);
  color: rgb(240, 197, 221);
  opacity: 0;
  transition: opacity 0.25s ease;
}

@media (hover: hover) {
  .video-card:hover .play-overlay {
    opacity: 1;
  }
}

@media (hover: none) {
  .play-overlay {
    transition: none;
  }
}

.video-info {
  padding: 12px 0 16px;
}

.video-client {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #999999;
  margin-bottom: 2px;
}

.video-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-transform: none;
  letter-spacing: 0;
}

/* ── About Section ── */
.about-grid {
  display: grid;
  grid-template-columns: 65fr 30fr;
  gap: 5%;
  align-items: start;
}

.about-text p {
  font-size: 17px;
  line-height: 1.8;
  margin-bottom: 24px;
  color: #222222;
}

.about-portrait {
  width: 100%;
}

.about-portrait img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.about-group {
  margin-top: 64px;
}

.about-group-heading {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #666666;
  margin-bottom: 24px;
  font-family: 'Source Serif 4', Georgia, serif;
}

.about-group p {
  font-size: 17px;
  line-height: 1.8;
  color: #222222;
  max-width: 720px;
}

/* ── Pricing Section ── */
.price-list {
  max-width: 560px;
}

.price-item {
  padding: 32px 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}

.price-item + .price-item {
  border-top: 1px solid #000000;
}

.price-amount {
  font-family: 'Bebas Neue', 'Arial Narrow', sans-serif;
  font-weight: 400;
  font-size: 40px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.price-unit {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 14px;
  font-weight: 400;
  color: #666666;
  white-space: nowrap;
}

.price-note {
  font-size: 15px;
  color: #666666;
  margin-top: 32px;
}

.price-vat {
  font-size: 13px;
  color: #F2B5D7;
  margin-top: 8px;
  font-weight: 500;
}

/* ── Contact Section ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  max-width: 720px;
}

.contact-block h3 {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #666666;
  margin-bottom: 16px;
  font-family: 'Source Serif 4', Georgia, serif;
}

.contact-block p,
.contact-block a {
  font-size: 16px;
  line-height: 1.8;
  display: block;
}

.contact-block a {
  transition: color 0.2s ease;
}

.contact-block a:hover {
  color: #F2B5D7;
}

/* ── Kontakt — enough space so scroll lands same as other sections ── */
#kontakt {
  padding-bottom: 100vh;
}

#nav-feed {
  scroll-margin-top: 146px;
}

#nav-kontakt {
  scroll-margin-top: 98px;
}

/* ── Footer ── */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  border-top: 1px solid #000000;
  padding: 24px 0;
  background: #FFFFFF;
  z-index: -1;
  opacity: 0;
  transition: opacity 1s ease;
}

.footer.visible {
  opacity: 1;
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.footer .version {
  font-size: 11px;
  color: #999999;
  font-family: 'Source Serif 4', Georgia, serif;
}

/* ── Lightbox ── */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox-content {
  position: relative;
  max-width: 1000px;
  max-height: 90vh;
  width: 100%;
}

.lightbox-content img {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  font-size: 28px;
  color: #FFFFFF;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.lightbox-close:hover {
  color: #F2B5D7;
}

.lightbox-download {
  position: absolute;
  top: -40px;
  right: 50px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s;
}

.lightbox-download:hover {
  color: #F2B5D7;
}

.lightbox-caption {
  color: #FFFFFF;
  font-size: 14px;
  margin-top: 16px;
  font-family: 'Source Serif 4', Georgia, serif;
}

.lightbox-video {
  max-width: 630px;
}

.gg-player-host {
  --accent: #F2B5D7;
  --surface: rgba(0, 0, 0, 0.5);
  --border: rgba(255, 255, 255, 0.15);
  --text: #FFFFFF;
  --text-dim: rgba(255, 255, 255, 0.65);
  width: 100%;
}

.gg-player-host .ma-player-viewport {
  max-height: 50vh;
}

.lightbox-caption .lightbox-client {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #F2B5D7;
  margin-bottom: 4px;
}

.lightbox-caption .lightbox-title {
  display: block;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 15px;
  color: #FFFFFF;
}

.lightbox-video video {
  width: 100%;
  max-height: 75vh;
  background: #000000;
}

/* ── Body locks ── */
body.nav-open {
  overflow: hidden;
}

body.lightbox-open {
  overflow: hidden;
}

/* ── Responsive — Tablet (1024px) ── */
@media (max-width: 1024px) {
  .container {
    padding: 0 32px;
  }

  .cols-3 { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .cols-2 { gap: 20px; }

  .about-grid {
    gap: 4%;
  }

  .price-amount {
    font-size: 30px;
  }
}

/* ── Responsive — Mobile (768px) ── */
@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }

  .nav-anchor {
    scroll-margin-top: 76px;
  }

  /* Mobile: tuck feed/kontakt separation lines under the 64px nav */
  #nav-feed {
    scroll-margin-top: 140px;
  }

  #nav-kontakt {
    scroll-margin-top: 94px;
  }

  /* Nav */
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background-color: #FFFFFF;
    border-bottom: 1px solid #000000;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    z-index: 999;
  }

  .nav-menu.open {
    max-height: 300px;
  }

  .nav-menu a {
    display: block;
    width: 100%;
    padding: 16px 20px;
    border-top: 1px solid #E0E0E0;
    font-size: 13px;
  }

  .nav-menu a::after {
    display: none;
  }

  /* Sections */
  section {
    padding: 56px 0;
  }

  .section-rule {
    margin-bottom: 32px;
  }

  .section-heading {
    margin-bottom: 32px;
  }

  .section-subheading {
    margin-bottom: 24px;
  }

  /* Hero */
  #hero {
    padding-top: 112px;
    padding-bottom: 56px;
  }

  .hero-accent {
    margin-bottom: 24px;
  }

  .hero-name {
    font-size: clamp(36px, 10vw, 64px);
    margin-bottom: 28px;
  }

  .hero-subtitle {
    font-size: 12px;
    margin-bottom: 12px;
  }

  .hero-services p {
    font-size: 15px;
    line-height: 1.6;
  }

  /* Portfolio */
  .cols-3 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cols-2 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .portfolio-grid, .video-grid { margin-bottom: 48px; }

  .portfolio-card .card-info {
    padding: 12px;
  }

  .portfolio-card .card-client {
    font-size: 10px;
  }

  .portfolio-card .card-title {
    font-size: 13px;
  }

  .video-title {
    font-size: 13px;
    margin-top: 8px;
  }

  /* About */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about-portrait {
    order: -1;
    max-width: 300px;
  }

  .about-text p {
    font-size: 15px;
  }

  .about-group {
    margin-top: 40px;
  }

  .about-group p {
    font-size: 15px;
  }

  /* Pricing */
  .price-list {
    max-width: 100%;
  }

  .price-item {
    padding: 24px 0;
  }

  .price-amount {
    font-size: 26px;
  }

  .price-unit {
    font-size: 13px;
  }

  .price-note {
    font-size: 14px;
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 100%;
  }

  .contact-block p,
  .contact-block a {
    font-size: 15px;
  }

  /* Lightbox */
  .lightbox-overlay {
    padding: 16px;
  }

  .lightbox-close {
    top: -36px;
    font-size: 32px;
    width: 44px;
    height: 44px;
  }

  .lightbox-content img {
    max-height: 70vh;
  }

  .lightbox-caption {
    font-size: 13px;
  }

  /* Footer */
  .footer {
    padding: 20px 0;
  }

  .footer .container {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .footer-brand {
    font-size: 12px;
  }
}

/* ── Responsive — Small Mobile (480px) ── */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  section {
    padding: 40px 0;
  }

  #hero {
    padding-top: 96px;
    padding-bottom: 40px;
  }

  .hero-name {
    font-size: 32px;
    margin-bottom: 20px;
  }

  .hero-services p {
    font-size: 14px;
  }

  .cols-3, .cols-2 {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .about-portrait {
    max-width: 260px;
  }

  .price-item {
    flex-direction: column;
    gap: 4px;
    padding: 20px 0;
  }

  .price-amount {
    font-size: 22px;
  }

  .lightbox-overlay {
    padding: 8px;
  }

  .lightbox-close {
    top: -32px;
  }
}

/* ── Touch devices ── */
@media (hover: none) {
  .play-overlay {
    opacity: 0.7;
  }

  .portfolio-card:hover {
    transform: none;
  }

  .portfolio-card:hover .card-image img {
    transform: none;
  }
}

/* ── Feed Animation ── */
@font-face {
  font-family: 'AT Surt';
  src: url('assets/fonts/ATSurt-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
}

.feed-wrapper {
  position: relative;
}

.feed-post-shell {
  /* Width shrinks on short viewports so body+caption+controls fit; vh line is fallback for dvh. */
  width: max(300px, min(540px, 90vw, calc((100vh - 360px) * 1.333)));
  width: max(300px, min(540px, 90vw, calc((100dvh - 360px) * 1.333)));
  margin: -63px auto 0;
}

.feed-stage {
  position: relative;
  width: 100%;
  /* Taller than body by ~140px so 5-line captions fit without clipping; vh line is fallback for dvh. */
  min-height: max(349px, min(552px, calc(100vh - 220px)));
  min-height: max(349px, min(552px, calc(100dvh - 220px)));
  overflow: hidden;
}

.feed-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  opacity: 0;
}

.feed-label {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #666666;
  text-align: center;
  margin-bottom: 16px;
}

.feed-caption {
  width: 520px;
  max-width: 90%;
  margin: 4px auto 0;
  min-height: 108px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.8s ease 0.3s;
}

.feed-caption-inner {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1rem;
  font-weight: 400;
  color: #666;
  text-align: center;
  line-height: 1.7;
  width: 100%;
}

.feed-card-header {
  width: 100%;
  display: block;
  background: #FFFFFF;
  border: 1px solid rgba(0, 107, 84, 0.5);
}
.feed-card-header img {
  width: 100%;
  height: auto;
  display: block;
}

.feed-card-body {
  background: #2d5a3d;
  width: 100%;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px 44px 56px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.feed-ad-text {
  font-family: 'AT Surt', Georgia, serif;
  font-size: clamp(24px, 4vw, 42px);
  color: #F2B5D7;
  text-align: center;
  line-height: 1.2;
}

.feed-ad-text .word {
  white-space: nowrap;
  display: inline;
}

.feed-ad-text .char {
  opacity: 0;
  display: inline-block;
}

.feed-slide.enter .feed-caption {
  opacity: 1;
  transform: translateY(0);
}

.feed-slide.enter .feed-card-body {
  opacity: 1;
  transform: translateY(0);
}


.feed-slide.exit-left .feed-card-body {
  transition: all 0.6s cubic-bezier(0.7, 0, 0.84, 0);
  opacity: 0;
  transform: translateX(-100%);
}

.feed-slide.exit-left .feed-caption {
  transition: all 0.6s cubic-bezier(0.7, 0, 0.84, 0) 0.2s;
  opacity: 0;
  transform: translateX(-100%);
}

.feed-slide.exit-right .feed-card-body {
  transition: all 0.6s cubic-bezier(0.7, 0, 0.84, 0);
  opacity: 0;
  transform: translateX(100%);
}

.feed-slide.exit-right .feed-caption {
  transition: all 0.6s cubic-bezier(0.7, 0, 0.84, 0) 0.2s;
  opacity: 0;
  transform: translateX(100%);
}

.feed-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
}

.feed-controls button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #ddd;
  background: #fff;
  color: #000;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.feed-controls button:hover {
  background: #F2B5D7;
  color: #fff;
  border-color: #F2B5D7;
}

.feed-dots {
  display: flex;
  gap: 6px;
}

.feed-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ccc;
  transition: all 0.4s;
}

.feed-dots .dot.active {
  background: #F2B5D7;
  transform: scale(1.3);
}

.feed-counter {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 13px;
  color: #999;
  letter-spacing: 0.05em;
  min-width: 48px;
  text-align: center;
}

@media (max-width: 768px) {
  #feed {
    margin-top: -15px;
    padding: 64px 0;
  }

  .feed-post-shell {
    margin-top: 0;
  }

  .feed-stage {
    min-height: 549px;
  }

  .feed-caption {
    min-height: 156px;
    margin-bottom: 20px;
  }

  .feed-caption-inner {
    font-size: 0.9rem;
  }

  .feed-card-body {
    aspect-ratio: auto;
    height: calc(67.5vw + 56px);
    padding: 32px 32px 44px;
  }

  .feed-ad-text {
    font-size: clamp(20px, 5vw, 32px);
  }
}

@media (max-width: 480px) {
  .feed-stage {
    min-height: 489px;
  }

  .feed-card-body {
    padding: 24px 24px 36px;
  }
}

/* ── AI Easter Egg Overlay ── */
.ai-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  animation: fadeIn 0.3s ease;
}

.ai-overlay-card {
  position: relative;
  background: #fff;
  width: 700px;
  height: 640px;
  max-width: 95vw;
  max-height: 90vh;
  padding: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
}

#aiIntro, #aiResult {
  transition: opacity 0.5s ease;
}

#aiIntro.fade-out, #aiResult.fade-out {
  opacity: 0;
}

#aiIntro {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 52px;
}

#aiResult {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.ai-result-top {
  padding: 28px 52px 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ai-result-middle {
  flex-shrink: 0;
  padding: 12px 52px 16px;
}

.ai-result-bottom {
  padding: 12px 52px 28px;
  border-top: 1px solid #eee;
  flex-shrink: 0;
}

.ai-overlay-close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 1.5rem;
  color: #999;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
}

.ai-overlay-close:hover {
  color: #000;
}

.ai-overlay h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.15;
  color: #000;
  margin-bottom: 20px;
}

.ai-overlay p {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1rem;
  line-height: 1.7;
  color: #444;
  margin-bottom: 24px;
}

.ai-overlay-btn {
  display: inline-block;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: #2d5a3d;
  border: none;
  padding: 14px 32px;
  cursor: pointer;
  transition: background 0.2s;
}

.ai-overlay-btn:hover {
  background: #1e3d2a;
}

.ai-overlay-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* AI result card */

.ai-result-card {
  background: #2d5a3d;
  padding: 28px 36px;
  margin-bottom: 12px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-result-card .ai-headline {
  font-family: 'AT Surt', Georgia, serif;
  font-size: clamp(22px, 3.5vw, 36px);
  color: #F2B5D7;
  text-align: center;
  line-height: 1.2;
}

.ai-result-body {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 0.95rem;
  color: #444;
  line-height: 1.7;
  text-align: center;
}

.ai-input-label {
  display: block;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 13px;
  color: #666;
  margin-top: 20px;
  margin-bottom: 8px;
}

.ai-input {
  width: 100%;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 15px;
  padding: 12px 16px;
  border: 1px solid #ddd;
  outline: none;
  transition: border-color 0.2s;
}

.ai-input:focus {
  border-color: #2d5a3d;
}

.ai-input::placeholder {
  color: #bbb;
}

.ai-result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
}

.ai-result-actions button {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 0;
  width: 160px;
  cursor: pointer;
  transition: all 0.2s;
}

.ai-btn-again {
  background: #2d5a3d;
  color: #fff;
  border: none;
}

.ai-btn-again:hover {
  background: #1e3d2a;
}

.ai-btn-close {
  background: none;
  color: #999;
  border: 1px solid #ddd;
}

.ai-btn-close:hover {
  color: #000;
  border-color: #000;
}

@media (max-width: 768px) {
  .ai-overlay-card {
    padding: 32px 24px;
    height: auto;
    min-height: 400px;
  }

  .ai-overlay h3 {
    font-size: 1.4rem;
  }

  .ai-result-card {
    padding: 28px 20px;
  }
}
