@import url('https://fonts.googleapis.com/css2?family=Anton&family=Baskervville:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Finger+Paint&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Spectral:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,200;1,300;1,400;1,500;1,600;1,700;1,800&family=Syne:wght@400..800&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  gap: 16px;
  padding: 20px;
  background: #F5F2ED;
  font-family: sans-serif;
  min-height: 100vh;
  margin-left: 20px;
}

.index-page{
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: left;
  justify-content: center;
  align-content: center;
}

body.main-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

h1 {
  font-size: 200px;
  font-family: "Anton", sans-serif;
  font-weight: 400;
  font-style: normal;
  color: #593001;
  animation: bounce 0.6s ease-out;
}

a{
  color: #593001;
  text-decoration: underline;
}

/* --- MATCH PAGE ---*/

.allcontent{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.match-btn {
  padding: 10px 30px;
  font-size: 16px;
  cursor: pointer;
  font-family: sans-serif;
  color: #593001;
  background-color: transparent;
  outline: #593001 solid 1px;
  border-radius: 3%;
}

.match-btn:hover {
  color: #F5F2ED;
  background-color: #593001;
  outline: #593001 solid 1px;
  border-radius: 3%;
}

#results {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

#results .match img {
  display: block;
  width: 200px;
  object-fit: contain;
  border: 2px solid #593001;
}

#results .match p {
  text-align: center;
  font-size: 12px;
  margin-top: 4px;
  color: #aaa;
}

.layout {
  display: flex;
  flex-direction: row;
  gap: 32px;
  align-items: center;
  justify-content: center;
}

#canvas-container {
  border-radius: 20px;
  overflow: hidden;
  display: inline-block; /* shrinks to fit the canvas size */
}

#dog-result-box {
  width: 640px;
  /* height: 480px; */
  height: fit-content;
  max-height: 480px;
  border-radius: 20px;
  background: #F5F2ED;
  object-fit: contain;
  overflow: hidden;
  justify-content: center;
}

#controls {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
  color: #2C1C15;
}


/* --- INDEX PAGE ---*/
.hero-container {
  width: 100%;
  max-width: 1000px;
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* was: center — makes text block left-aligned */
  justify-content: center;
  text-align: left; /* ensures text is left-aligned */
}

.phonetics{
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  opacity: 0.8;
  font-size: 24px;
  margin-bottom: 30px;
  letter-spacing: 2px;
  text-align: left;
}

.divider {
  border: 0;
  border-top: 1px solid #593001;
  margin-bottom: 30px;
  margin-top: 20px;
}

.heading {
  display: flex;
  flex-direction: row;
}

/* Content Grid */
.content-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  align-items: flex-start;
  text-align: left;
  align-items: center;
  justify-content: center;
}

.definition-box p {
  font-size: 30px;
  line-height: 1.4;
  font-weight: 300;
  max-width: 800px;
  text-align: left;
  color: #593001;
}

.definition-box strong {
  font-weight: 400;
}

/* The Boop Button */
.boop-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.nose-shape {
  width: 140px;
  height: 120px;
  background-color: #593001;
  border-radius: 60% 60% 80% 80% / 100% 100% 60% 60%;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nose-shape:hover {
  transform: scale(1.1) rotate(2deg);
  cursor: pointer;
}

.boop-text {
  font-style: normal;
  font-weight: 300;
  opacity: 0.8;
  font-size: 8px;
}

/* Bottom Nav */
.bottom-nav {
  position: absolute;
  margin-top: 20px;
  display: flex;
  gap: 15px;
  font-size: 18px;
}

.bottom-nav a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 300;
  transition: opacity 0.2s;
}

.bottom-nav a:hover {
  opacity: 0.6;
}

.separator {
  opacity: 0.4;
  color: #593001;
}

/* Mobile Adaptation */
@media (max-width: 768px) {
  .content-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .definition-box p {
    margin: 0 auto;
  }
  
  .hero-container {
    padding-top: 40px;
  }
}

@keyframes bounce {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes shake {
  0%, 100% {
    transform: translate(0, 0) rotate(0);
  }
  20%, 60% {
    transform: translate(-10px, 0) rotate(-2deg);
  }
  40%, 80% {
    transform: translate(10px, 0) rotate(2deg);
  }
}

body.shake {
  animation: shake 0.4s;
}

.boop-button:hover .nose-shape {
  transform: scale(0.95) translateZ(-10px);
}

.boop-button:active .nose-shape {
  transform: scale(0.8) translateZ(-20px);
}

#bg-gallery {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.hero-container,
.bottom-nav {
  position: relative;
  z-index: 1;
}


/* ----
THE HOW PAGE STYLE
---*/

.aboutcontainer{
 padding-top: 5px;
}

.aboutcontainer p{
  font-style: sans-serif;
  line-height: 1.4;
  font-weight: 300;
  max-width: 1000px;
  text-align: left;
  color: #593001;
  font-size: 25px;
  animation: bounce 0.6s ease-out;
  margin-bottom: 40px;
}


/* ----
THE WHY PAGE STYLE
---*/

.whycontainer{
  padding-top: 5px;
}

.whycontainer p{
  font-style: sans-serif;
  line-height: 1.4;
  font-weight: 300;
  max-width: 1000px;
  text-align: left;
  color: #593001;
  font-size: 25px;
}


/* ----
NAVIGATION STYLE
---*/

.nav {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  padding: 12px 20px;
  background-color: #F5F2ED;
  z-index: 1000;
  font-size: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  box-sizing: border-box;
}

.nav-left {
  display: flex;
  align-items: center;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  min-width: fit-content;  /* prevents container from shrinking */
  width: max-content;   
  justify-content: flex-end;
}

.nav .nav-title {
  font-family: "Anton", sans-serif;
  font-weight: 400;
  font-style: normal;
  color: #593001;
  margin-left: 0;
  margin-bottom: 4px;
  font-size: 20px;
}

.nav a {
  color: #593001;
  text-decoration: none;
  font-weight: 300;
  margin-left: 0;
  transition: opacity 0.2s;
}

.nav-right a {
  white-space: nowrap;   
}

.nav a:hover {
  opacity: 0.6;
}

.dot {
  color: #593001;
  line-height: 1;
  display: flex;
  align-items: center;
}


@media (max-width: 768px) {
  body,
  .index-page,
  .whycontainer,
  .aboutcontainer,
  .main-page {
    margin-left: 10px;
    margin-right: 10px;
  }

  h1 {
    font-size: 60px;
  }

 .layout {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  width: 100%;
  gap: 32px;
  align-items: center;
  justify-content: center;
}

  #canvas-container canvas {
    width: 90vw !important;
    height: auto !important;
  }

  #canvas-container {
    width: 90vw !important;
  }

  #dog-result-box {
    width: 90vw !important;
  }

  #dog-result-box svg {
    width: 100% !important;
    height: auto !important;
  }

  .aboutcontainer p,
  .phonetics,
  .definition-box p,
  .whycontainer p {
    font-size: 18px;
  }

  .whycontainer,
  .aboutcontainer{
   padding-top: 60px;
   }


  .nav {
    font-size: 10px;
    padding-right: 12px;
  }

  .nav-right {
  gap: 5px;
  font-size: 13px;
}

  .nav .nav-title {
  font-family: "Anton", sans-serif;
  font-weight: 400;
  font-style: normal;
  color: #593001;
  margin-left: 0;
  margin-bottom: 4px;
  font-size: 15px;
}


  body {
    margin-left: 0;
    padding: 12px;
  }
}