@import url('https://fonts.googleapis.com/css2?family=Playball&display=swap'); /* elegant fallback script */


/* ——— Brand Colors ——— */
:root {
  --black: #000000;
  --white: #ffffff;
  --red: #ff003b;
  --gold: #e3ae55;
}


/* —— basic reset —— */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.branding.vertical {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}


.loreal-logo {
  height: 48px;
  object-fit: contain;
  filter: grayscale(100%) contrast(150%);
}


/* —— body + fonts —— */
body {
  font-family: 'Poppins', "Montserrat", Arial, Helvetica, sans-serif;
  color: var(--black);
  background-color: var(--white);
  display: flex;
  justify-content: center;
  animation: fadeIn 1s ease-in;
}

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

.page-wrapper {
  width: 90%;
  max-width: 900px;
}

/* header */
.site-header {
  text-align: center;
  padding-top: 40px;
  color: var(--black);
  border-bottom: 1px solid var(--gold);
}

.site-title {
  font-size: 26px;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--black);
}

/* chat window */
.chatbox {
  margin: 40px 0;
}


.chat-window {
  height: 360px;
  border: 2px solid var(--gold);
  padding: 20px;
  font-size: 18px;
  background: var(--white);
  overflow-y: auto;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  white-space: pre-line;
}

/* messages */
.msg {
  margin-bottom: 14px;
  line-height: 1.5;
}

.msg.user {
  color: var(--black);
  font-weight: 500;
}

.msg.ai {
  color: #666;
  background: #f6f6f6;
  padding: 10px;
  border-radius: 6px;
  font-family: 'Oxygen', sans-serif;
}

/* input row */
.chat-form {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  font-family: 'Montserrat', sans-serif;

}

.chat-form input {
  flex: 1;
  border: 1px solid var(--gold);
  font-size: 18px;
  font-family: 'Poppins', sans-serif;
  padding: 10px;
  border-radius: 4px;
}

.chat-form input:focus {
  outline: 2px solid #000;
  outline-offset: 2px;
}

.chat-form button {
  font-size: 18px;
  font-family: 'Poppins', sans-serif;
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: 4px;
  padding: 0; /* Remove extra padding */
  min-width: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s;
}

.material-icons {
  font-size: 24px;
}

.chat-form button .material-icons {
  font-size: 24px;
}

.chat-form button:hover {
  background: var(--red);

}

.chat-form button:focus {
  outline: 2px solid #000;
  outline-offset: 2px;
}

/* visually hidden */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* footer */
.site-footer {
  margin: 60px 0 40px;
  text-align: center;
  font-size: 14px;
  font-family: 'Montserrat', sans-serif;
  color: #888;
  border-top: 1px solid var(--gold);
  padding-top: 20px;
}

.site-footer nav {
  margin-top: 12px;
}

.site-footer a {
  margin: 0 8px;
  color: #000;
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;

}

.site-footer a:hover {
  color: #666666;
}


/* ——— Loading Screen Styling ——— */
#loadingScreen {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  transition: opacity 1.5s ease;
  background-color: black;
}

/* ——— L'Oréal Intro Animation ——— */
#introOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  display: block;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 9999;
  opacity: 1;
  pointer-events: all;
  transition: opacity 1s ease;
  animation: ease-out /* remove abrupt fadeOutIntro */}

.circle-art {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 125vmin;
  height: 125vmin;
}

.circle-art circle {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.5;
  opacity: 0;
  animation: ringGrow 0.8s ease forwards;
}

.circle-art circle:nth-child(1) { animation-delay: 0s; }
.circle-art circle:nth-child(2) { animation-delay: 0.3s; }
.circle-art circle:nth-child(3) { animation-delay: 0.6s; }
.circle-art circle:nth-child(4) { animation-delay: 0.9s; }
.circle-art circle:nth-child(5) { animation-delay: 1.2s; }


@keyframes ringGrow {
  from { r: 0; opacity: 0; }
  to   { opacity: 1; }
}

/* Add fade out for circles */
.circle-art circle.fade-out {
  animation: ringFadeOut 1s ease forwards;
}

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


.logo-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Montserrat', sans-serif;
  font-size: 3rem;
  letter-spacing: 0.1rem;
  color: #fff;
  z-index: 15;
  opacity: 0;
  animation: fadeInLogo 1s ease 2s forwards, fadeOutLogo 1s ease 4s forwards;
  animation: fadeInLogo 1s ease 2s forwards, fadeOutLogo 1s ease 4s forwards, scaleUp 1.5s ease 2s forwards;
}

.optical-o {
  display: inline-block;
  transform: scale(1.2); /* Tweak until it feels right */
  transform-origin: center;
}


@keyframes scaleUp {
  from { transform: translate(-50%, -50%) scale(0.8); }
  to { transform: translate(-50%, -50%) scale(1); }
}

.tagline {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  color: white;
  display: flex;
  justify-content: center;
  opacity: 0;
  transition: opacity 1s ease;
  flex-wrap: nowrap;       /* Keep all spans in one row */
  white-space: nowrap;     /* Prevent line breaks */
  gap: 0.2em;              /* Optional spacing between letters */
  font-family: 'Work Sans', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  animation: fadeInTagline 1.5s ease 5.5s forwards;
}

.circle-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  pointer-events: none;
}

.circle-container.fade-out {
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
  display: none;  /* ← Add this */
}

.tagline span {
  opacity: 0;
  transform: translateY(10px); /* <-- start slightly below */
  transition: all 0.5s ease;
} 

.tagline span.fade-in {
  opacity: 1;
  transform: translateY(0);     /* <-- slide into place */
  animation: letterFadeIn 0.5s ease forwards;

}
.fade-in {
  animation: letterFadeIn 0.5s ease forwards;
}

.typewriter {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Poppins', sans-serif;
  font-size: 1.75rem;
  letter-spacing: 0.25em;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  width: 0;
  opacity: 0;
  z-index: 15;
  border-right: none; /* ← removes the blinker */
  animation:
    fadeInTagline 0s ease 6s forwards,
    typing 4s steps(44, end) 6s forwards;
}

@keyframes fadeInTagline {
  to { opacity: 1; }
}

@keyframes typing {
  to { width: 46ch; } /* Stops it from stretching across screen */
}
@keyframes letterFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLogo {
  to { opacity: 1; }
}

@keyframes fadeOutLogo {
  to { opacity: 0; }
}

@keyframes showTagline {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes glow {
  0%, 100% { text-shadow: none; }
  50% { text-shadow: 0 0 10px gold; }
}

.msg.ai {
  background-color: #FFF9F3; /* soft neutral gold tone */
  border-left: 4px solid #E2BA35;
  color: #000000;
  padding: 1rem;
  border-radius: 8px;
  font-family: 'Oxygen', sans-serif;
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* Style any links in the AI message */
.msg.ai a {
  color: #FF003B;
  text-decoration: none;
  font-weight: 600;
}

.msg.ai a:hover {
  text-decoration: underline;
}


.msg.ai.thinking {
  display: flex;
  gap: 6px;
  padding: 10px;
  background: #f6f6f6;
  border-radius: 6px;
  font-size: 24px;
  color: var(--black);
  font-weight: bold;
}

.msg.ai.thinking .dot {
  width: 8px;
  height: 8px;
  background-color: var(--gold);
  border-radius: 50%;
  animation: blink 1.2s infinite ease-in-out;
}

.msg.ai.thinking .dot:nth-child(2) {
  animation-delay: 0.2s;
}

.msg.ai.thinking .dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes blink {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.4;
  }
  40% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* Mobile Settings */

@media (max-width: 480px) {
  .site-title {
    font-size: 20px;
  }

  .loreal-logo {
    height: 40px;
  }

  .chat-form input {
    font-size: 16px;
  }
  .circle-art {
    width: 90vmin;
    height: 90vmin;
  }

  .logo-text {
    font-size: 2rem;
    letter-spacing: 0.08rem;
  }

  .tagline {
    font-size: 1rem;
    letter-spacing: 0.1em;
  }

  .typewriter {
    font-size: 1rem;
    width: 80vw;
  }
}
