/* Global Styles */
:root {
  /* Design Tokens - Withly Monochrome */
  --primary-color: #000000;
  --secondary-color: #9E9E9E;
  /* Light Grey from theme.dart */
  --background-color: #FFFFFF;
  --section-bg-alt: #FAFAFA;
  /* Slightly off-white for alternating sections */
  --text-main: #111111;
  --text-sub: #555555;
  --white: #FFFFFF;
  --border-radius: 8px;
  /* Sharper corners for modern/pixel vibe */
  --font-main: 'NanumSquareRound', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  --font-pixel: 'GalmuriSilver', monospace;
  --max-width: 1080px;
  /* Consistently tight container */
}

@font-face {
  font-family: 'GalmuriSilver';
  src: url('assets/fonts/GalmuriSilver.ttf') format('truetype');
}

/* 
   REMOVED Regular (400) weight as per user request. 
   Only Bold (700) and Extra Bold (800) are used.
*/

@font-face {
  font-family: 'NanumSquareRound';
  font-weight: 700;
  src: url('assets/fonts/NanumSquareRoundB.ttf') format('truetype');
}

@font-face {
  font-family: 'NanumSquareRound';
  font-weight: 800;
  src: url('assets/fonts/NanumSquareRoundEB.ttf') format('truetype');
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--background-color);
  color: var(--text-main);
  line-height: 1.7;
  font-weight: 700;
  /* Default to Bold as requested (No Regular) */
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* Prevent horizontal scroll */
}

a {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}

ul {
  list-style: none;
}

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

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

/* Headings */
h1,
h2,
h3 {
  font-weight: 800;
  /* Extra Bold */
  letter-spacing: -0.02em;
  /* Tighter letter spacing for bold fonts */
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 16px 0;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

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

.logo {
  font-family: var(--font-pixel);
  font-size: 20px;
  color: var(--text-main);
  font-weight: 700;
  display: flex;
  align-items: center;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-links a {
  font-size: 15px;
  color: var(--text-sub);
  font-weight: 700;
  /* Bold navigation */
}

.nav-links a:hover {
  color: var(--primary-color);
}

.btn-header-download {
  background-color: var(--primary-color);
  color: var(--white) !important;
  /* Force white text */
  padding: 6px 12px;
  border-radius: var(--border-radius);
  transition: opacity 0.2s;
}

.btn-header-download:hover {
  opacity: 0.8;
  color: var(--white);
}

/* Hero Section */
.hero {
  padding-top: 180px;
  padding-bottom: 80px;
  text-align: center;
  background-color: var(--white);
}

.hero h1 {
  font-size: 3.8rem;
  font-weight: 800;
  margin-bottom: 24px;
  line-height: 1.2;
  color: var(--text-main);
  letter-spacing: -0.03em;
  word-break: keep-all;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-sub);
  margin-bottom: 48px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  word-break: keep-all;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 80px;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  padding: 14px 28px;
  background-color: var(--primary-color);
  color: var(--white);
  border-radius: var(--border-radius);
  font-weight: 800;
  font-size: 1rem;
  transition: transform 0.2s, background-color 0.2s;
}

.btn-download:hover {
  transform: translateY(-2px);
  background-color: #333;
}

.btn-download i {
  margin-right: 10px;
  font-size: 1.3rem;
}

/* Hero Phone Mockup */
.hero-mockup-wrapper {
  display: flex;
  justify-content: center;
  perspective: 1000px;
  padding-bottom: 40px;
}

.hero-phone {
  width: 250px;
  /* Reduced from 300px */
  height: 500px;
  /* Reduced from 600px */
  border: 8px solid #FFFFFF;
  /* White border */
  border-radius: 36px;
  background-color: #FAFAFA;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  /* Increased shadow for contrast against light bg */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-phone::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  /* Scaled down */
  height: 20px;
  /* Scaled down */
  background-color: #111;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  z-index: 10;
}

.hero-phone span {
  font-family: var(--font-pixel);
  color: #CCC;
  font-size: 13px;
}

/* Top Banner Composition Styles */
.banner-composition {
  width: 100%;
  height: 400px;
  /* Fixed height for desktop initially */
  background-color: #F3F1ED;
  /* Adjusted to match top.png sky/grey tone */
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
}

.banner-content-wrapper {
  width: 100%;
  max-width: var(--max-width);
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  /* Vertically center content if needed */
}

/* Text Positioning */
.banner-text {
  position: absolute;
  top: 50%;
  left: 0;
  /* Align with container start */
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.banner-label {
  display: block;
  font-size: 1.2rem;
  color: #555;
  margin-bottom: 12px;
  font-weight: 700;
}

.banner-logo {
  width: 240px;
  /* Adjust based on 942x304 ratio */
  height: auto;
  display: block;
}

/* Scene Positioning */
.banner-scene {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  /* Let clicks pass to text/buttons if any */
}

.banner-grass {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 90px;
  background-image: url('assets/images/grass.png');
  background-repeat: repeat-x;
  background-position: bottom left;
  background-size: auto 100%;
  image-rendering: pixelated;
  z-index: 1;
}

/* Unified Art Group */
.banner-art-group {
  /* Define scale factor here for easy adjustment */
  --banner-scale: 0.32;

  position: absolute;
  bottom: 80px;
  /* Sit higher on grass (straddling boundary) */
  right: 10%;
  /* Desktop position */
  width: 400px;
  /* Base container width */
  height: 250px;
  /* Base container height */
  /* Border for debug: border: 1px solid red; */
  transform-origin: bottom center;
  /* Scale from bottom */
  z-index: 5;
}

.character {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: calc(481px * var(--banner-scale));
  /* Intrinsic: 481px */
  height: auto;
}

.bubble {
  position: absolute;
  height: auto;
  /* No animation as requested */
}

/* Bubble Positions (recreating relative to GROUP) */
.bubble-1 {
  width: calc(294px * var(--banner-scale));
  /* Intrinsic: 294px */
  top: 0;
  right: 0;
  /* Relative to group */
}

.bubble-2 {
  width: calc(395px * var(--banner-scale));
  /* Intrinsic: 395px */
  top: 40px;
  left: -20px;
  /* Shift slightly left to accommodate new size */
}

.bubble-3 {
  width: calc(301px * var(--banner-scale));
  /* Intrinsic: 301px */
  bottom: 60px;
  /* Near character head */
  right: 40px;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* Full-width Feature Sections */
.features-container {
  display: flex;
  flex-direction: column;
}

.feature-section {
  padding: 120px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.feature-section:nth-child(even) {
  background-color: var(--section-bg-alt);
}

.feature-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 80px;
}

.feature-section:nth-child(even) .feature-content {
  flex-direction: row-reverse;
}

.feature-text {
  flex: 1;
  max-width: 480px;
}

.feature-label {
  margin-bottom: 16px;
  display: block;
  /* Icon container */
}

.feature-label img {
  height: 32px;
  width: auto;
  image-rendering: pixelated;
}

.feature-text h2 {
  font-size: 2.5rem;
  line-height: 1.3;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.feature-text p {
  color: var(--text-sub);
  font-size: 1.1rem;
  line-height: 1.7;
  word-break: keep-all;
}

.feature-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.feature-image-placeholder {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 4/3;
  background-color: #EEE;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-family: var(--font-pixel);
  font-size: 14px;
  position: relative;
  overflow: hidden;
}

/* Specific styling for vertical screenshots vs horizontal layout */
.feature-image-placeholder.vertical {
  aspect-ratio: 9/19;
  max-width: 250px;
  /* Reduced from 280px */
  border: 8px solid #FFFFFF;
  /* White border */
  border-radius: 32px;
  background-color: white;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  /* Consistent shadow */
}

.feature-mockup {
  width: 100%;
  max-width: 250px;
  /* Reduced size as requested */
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 4px solid #E3E3E3;
  /* White border */
  display: block;
}


/* Footer */
footer {
  padding: 80px 0;
  background-color: var(--white);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

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

.footer-logo {
  font-family: var(--font-pixel);
  font-size: 1.5rem;
  color: var(--text-main);
  letter-spacing: -1px;
}

.footer-links {
  display: flex;
  gap: 30px;
}

.footer-links a {
  color: var(--text-sub);
  font-size: 14px;
}

.footer-links a:hover {
  text-decoration: underline;
  color: var(--text-main);
}

.copyright {
  color: #999;
  font-size: 13px;
  margin-top: 16px;
}

/* Responsive */
@media (max-width: 900px) {

  /* Header Adjustments */
  header {
    padding: 12px 0;
  }

  .header-content {
    justify-content: space-between;
    position: relative;
  }

  .logo {
    font-size: 18px;
  }

  .nav-links {
    gap: 16px;
    /* Reset position for space-between flow */
    position: static;
    transform: none;
  }

  .nav-links a {
    font-size: 13px;
  }

  /* Hero Adjustments */
  .hero {
    padding-top: 100px;
    /* Reduced top padding */
    padding-bottom: 60px;
  }

  .hero h1 {
    font-size: 2.4rem;
    /* Smaller font on mobile */
    margin-bottom: 16px;
    padding: 0 16px;
    /* Ensure text doesn't touch edges */
  }

  .hero p {
    font-size: 1rem;
    padding: 0 20px;
    margin-bottom: 32px;
  }

  .hero-phone {
    width: 260px;
    height: 520px;
    border-width: 8px;
    margin: 0 auto;
  }

  .btn-download {
    padding: 12px 20px;
    /* Reduced padding for mobile */
    font-size: 0.9rem;
  }

  .btn-download i {
    font-size: 1.1rem;
    margin-right: 8px;
  }

  /* Responsive Banner - Mobile */
  .banner-composition {
    height: 250px;
  }

  .banner-content-wrapper {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    height: 100%;
    gap: 5%;
  }

  .banner-text {
    position: relative;
    top: -20px;
    left: auto;
    transform: none;
    text-align: center;
    margin: 0;
    width: 45%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .banner-label {
    margin-bottom: 0;
    font-size: 0.65rem;
    color: #222;
    font-family: 'GalmuriSilver', monospace;
  }

  .banner-logo {
    width: 180px;
    margin: 0;
  }

  .banner-scene {
    position: relative;
    width: 45%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .banner-grass {
    height: 70px;
  }

  /* Unified Scaling for Mobile Art */
  .banner-art-group {
    --banner-scale: 0.25;

    position: relative;
    width: 100%;
    height: 220px;
    bottom: 40px;
    left: auto;
    right: auto;
    transform: none;

    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 3px;
  }

  /* Bubble Positioning: Flex Column Stack */
  .bubble-2 {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    transform: none;
    margin: 0;
    align-self: flex-start;
    margin-left: 10px;
    z-index: 9;
  }

  .bubble-3 {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    transform: none;
    margin: 0;
    align-self: flex-end;
    margin-right: 10px;
    margin-bottom: 4px;
    z-index: 8;
  }

  .character {
    position: relative;
    top: auto;
    bottom: auto;
    left: auto;
    right: auto;
    transform: none;
    margin: 0;
    align-self: center;
    z-index: 7;
  }

  /* Feature Section Stacking */
  .feature-section {
    padding: 60px 0;
    /* Tighter padding */
  }

  .feature-content,
  .feature-section:nth-child(even) .feature-content {
    flex-direction: column;
    /* Always stack vertically */
    text-align: center;
    gap: 40px;
  }

  .feature-text {
    max-width: 100%;
    padding: 0 16px;
  }

  .feature-label {
    display: inline-block;
    /* Ensure it centers with text-align */
    margin-bottom: 16px;
  }

  .feature-text h2 {
    font-size: 1.6rem;
    /* Smaller headings */
  }

  .feature-text p {
    font-size: 1rem;
  }

  .feature-visual {
    width: 100%;
    padding: 0 16px;
  }

  .feature-visual img {
    max-width: 200px !important;
    /* Limit image width on mobile (reduced as requested) */
  }

  .feature-image-placeholder {
    max-width: 100%;
  }

  /* Footer Adjustments */
  footer {
    padding: 60px 0;
  }

  .footer-links {
    flex-wrap: wrap;
    /* Allow wrapping if needed */
    justify-content: center;
    gap: 20px;
  }
}

@media (max-width: 380px) {

  /* Extra adjustments for very small screens (iPhone SE etc) */
  .hero h1 {
    font-size: 2rem;
  }

  .nav-links {
    display: none;
    /* Consider hiding nav links on very small screens or use hamburger */
  }
}


/* Terms of Service Page Styles */
.terms-body {
  background-color: #fff;
  color: #292929;
  font-family: 'NanumSquareRound', sans-serif;
  line-height: 1.6;
  margin: 0;
}

.terms-container {
  max-width: 720px;
  /* Wider for PC as requested */
  margin: 0 auto;
  padding: 0 24px;
}

.terms-content {
  padding: 100px 0 80px;
}

.terms-content h1 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 12px;
  color: #292929;
}

.terms-date {
  color: #888;
  font-size: 13px;
  margin-bottom: 40px;
}

.terms-content h2 {
  font-size: 18px;
  font-weight: 800;
  margin-top: 32px;
  margin-bottom: 12px;
  color: #292929;
}

.terms-content p {
  font-size: 15px;
  /* Slightly larger for readability */
  color: #444;
  margin-bottom: 12px;
  word-break: keep-all;
  line-height: 1.7;
}

.terms-content ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 12px;
}

.terms-content li {
  font-size: 15px;
  color: #444;
  margin-bottom: 6px;
  padding-left: 14px;
  position: relative;
  line-height: 1.7;
}

.terms-content li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #888;
}

.terms-content strong {
  font-weight: 800;
  color: #292929;
}

@media (max-width: 500px) {
  .terms-content h1 {
    font-size: 20px;
  }

  .terms-content h2 {
    font-size: 16px;
  }

  .terms-content p,
  .terms-content li {
    font-size: 14px;
  }
}