/* Apply box-sizing globally */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Prevent horizontal scrolling on all elements */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

/* Base mobile responsiveness for 320px–480px */
@media (max-width: 480px) {
  body {
    font-size: 16px;
    padding: 8px;
    margin: 0;
    overflow-x: hidden;
  }
  h1, h2, h3, h4, h5, h6 {
    font-size: 1.2em;
    margin: 0.5em 0;
  }
  .container, .content, main, header, footer, section, article {
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box;
    padding-left: 0.5em;
    padding-right: 0.5em;
  }
  button, .btn {
    min-width: 44px;
    min-height: 44px;
    font-size: 1em;
    padding: 0.75em 1.2em;
    margin: 0.5em 0;
  }
  nav, .navbar {
    flex-direction: column;
    align-items: stretch;
  }
  img, svg {
    max-width: 100%;
    height: auto;
  }
  /* Prevent horizontal scrolling */
  html, body {
    max-width: 100vw;
    overflow-x: hidden;
  }
  /* Prevent wide tables and pre/code blocks from causing overflow */
  table, pre, code {
    max-width: 100vw;
    overflow-x: auto;
    display: block;
    word-break: break-word;
  }
  /* Prevent images and videos from overflowing */
  img, svg, video {
    max-width: 100vw;
    height: auto;
    display: block;
  }
  /* Prevent long words/URLs from breaking layout */
  .container, .content, main, header, footer, section, article, div, span, p, a {
    word-break: break-word;
    overflow-wrap: break-word;
  }
}

/* === Begin index.html styles migration === */
@font-face {
    font-family: 'Test Soehne Breit Fett';
    src: url('/static/fonts/test-soehne-breit-fett.woff2') format('woff2'),
         url('/static/fonts/test-soehne-breit-fett.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Test Soehne Breit Buch';
    src: url('/static/fonts/test-soehne-breit-buch.woff2') format('woff2'),
         url('/static/fonts/test-soehne-breit-buch.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Test Soehne Breit Leicht';
    src: url('/static/fonts/test-soehne-breit-leicht.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Helvetica Neue Light';
    src: url('/static/fonts/HelveticaNeueLight.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
html, body {
    height: 100%;
    scroll-behavior: smooth;
}
body {
    min-height: 100vh;
    height: 100%;
    margin: 0;
    padding: 0;
    background: #faf7ef;
    max-width: 100vw;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-padding-top: 2rem;
}
.navbar {
    width: 100vw;
    display: flex;
    justify-content: center;
    z-index: 10;
    margin-top: 2rem;
}
.nav-buttons {
    display: flex;
    gap: 0.5rem;
}
.nav-btn {
    font-family: 'Test Soehne Breit Buch', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 1rem;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    outline: none;
    border-radius: 2rem;
    padding: 0.7rem 2.2rem;
    cursor: pointer;
    background: #f3f1eb;
    color: #000;
    transition: background 0.2s, color 0.2s;
    box-shadow: none;
    text-decoration: none;
}
.nav-btn.active, .nav-btn:focus {
    background: #000;
    color: #fff;
}
.nav-btn:hover {
    background: #000;
    color: #fff;
    text-decoration: none;
}
.batch-link {
    margin-left: 4vw;
    margin: 0;
    display: inline-block;
    vertical-align: middle;
}
.batch-link:hover {
    color: #222;
    transform: scale(1.3);
    transition: transform 0.2s ease;
}
.centerpiece {
    width: auto;
    margin-left: 10rem;
    margin-top: 2rem;
    text-align: left;
    padding: 0;
    margin-bottom: 0;
    min-height: 100vh;
}
.centerpiece h1 {
    font-family: 'Test Soehne Breit Leicht', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 4.8rem;
    font-weight: light;
    margin: 0;
    color: #000;
    letter-spacing: 0.14em;
    line-height: 1;
}
.centerpiece h2 {
    font-family: 'Test Soehne Breit Fett', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 9.6rem;
    font-weight: bold;
    margin: 0;
    color: #000;
    letter-spacing: -0.03em;
    line-height: 1;
}
.centerpiece .subheadline {
    font-family: 'Test Soehne Breit Leicht', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 1.44rem;
    font-weight: 300;
    margin: 2rem 0 0 0;
    color: #000;
    letter-spacing: 0em;
    line-height: 1.2;
    opacity: 0.8;
    max-width: 50rem;
}
#cursor {
    animation: blink 1s infinite;
}
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}
/* Enhanced smooth scrolling for all elements */
* {
    scroll-behavior: smooth;
}
/* Optimize scroll performance */
.centerpiece, .body-content {
    will-change: transform;
    transform: translateZ(0);
}
.body-content {
    background: #000;
    will-change: transform;
    transform: translateZ(0);
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    margin: 0;
    min-height: 100vh;
    padding: 2rem 0 0 20rem;
    width: 100vw;
    text-align: left;
}   
.body-content * {
    color: #fff;
}
.text-section {
    flex: 1;
    max-width: 600px;
    text-align: left;
}
.body-content .circles-container {
    margin-top: 2rem;
}
.body-content .try-it-free-btn {
    font-family: 'Test Soehne Breit Buch', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 1.2rem;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 2px solid #fff;
    outline: none;
    border-radius: 2rem;
    padding: 1rem 3rem;
    cursor: pointer;
    background: transparent;
    color: #fff;
    transition: background 0.3s, color 0.3s;
    text-decoration: none;
    display: inline-block;
    margin: 2rem 0 0 0;
}
.try-it-free-btn:hover {
    background: #fff;
    color: #000;
    text-decoration: none;
}
.circles-container {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 20px;
    max-width: 600px;
    height: 500px;
    align-items: center;
    justify-items: center;
    margin-left: 60px;
}
.circle {
    width: 60px;
    height: 60px;
    background: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    opacity: 0;
    transform: scale(0);
    position: relative;
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}
.circle.animate {
    animation: appearCircle 0.8s ease-out forwards;
}
.circle.fast-animate {
    animation: fastAppearCircle 0.2s ease-out forwards;
}
/* Make circles imperfect by adding slight variations */
.circle:nth-child(1) { border-radius: 48% 52% 50% 50%; }
.circle:nth-child(2) { border-radius: 50% 50% 52% 48%; }
.circle:nth-child(3) { border-radius: 52% 48% 50% 50%; }
.circle:nth-child(4) { border-radius: 50% 50% 48% 52%; }
.circle:nth-child(5) { border-radius: 49% 51% 52% 48%; }
.circle:nth-child(6) { border-radius: 51% 49% 48% 52%; }
.circle:nth-child(7) { border-radius: 48% 52% 51% 49%; }
.circle:nth-child(8) { border-radius: 52% 48% 49% 51%; }
.circle:nth-child(9) { border-radius: 50% 50% 52% 48%; }
.circle:nth-child(10) { border-radius: 49% 51% 48% 52%; }
.circle:nth-child(11) { border-radius: 51% 49% 50% 50%; }
.circle:nth-child(12) { border-radius: 50% 50% 51% 49%; }
.circle:nth-child(13) { border-radius: 48% 52% 49% 51%; }
.circle:nth-child(14) { border-radius: 52% 48% 51% 49%; }
.circle:nth-child(15) { border-radius: 49% 51% 50% 50%; }
.circle:nth-child(16) { border-radius: 51% 49% 52% 48%; }
.circle:nth-child(17) { border-radius: 50% 50% 48% 52%; }
.circle:nth-child(18) { border-radius: 48% 52% 50% 50%; }
.circle:nth-child(19) { border-radius: 52% 48% 49% 51%; }
.circle:nth-child(20) { border-radius: 49% 51% 51% 49%; }
.circle:nth-child(21) { border-radius: 51% 49% 48% 52%; }
.circle:nth-child(22) { border-radius: 50% 50% 52% 48%; }
.circle:nth-child(23) { border-radius: 48% 52% 51% 49%; }
.circle:nth-child(24) { border-radius: 52% 48% 50% 50%; }
.circle:nth-child(25) { border-radius: 49% 51% 49% 51%; }
.circle:nth-child(26) { border-radius: 51% 49% 52% 48%; }
.circle:nth-child(27) { border-radius: 50% 50% 48% 52%; }
.circle:nth-child(28) { border-radius: 48% 52% 51% 49%; }
.circle:nth-child(29) { border-radius: 52% 48% 49% 51%; }
.circle:nth-child(30) { border-radius: 49% 51% 50% 50%; }
@keyframes appearCircle {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}
@keyframes fastAppearCircle {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}
.body-content p {
    font-family: 'Helvetica Neue Light', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 2rem;
    font-weight: 300;
    line-height: 1.4;
    color: #fff;
    margin-bottom: 1.5rem;
    max-width: 600px;
}
.body-content .highlight {
    font-family: 'Test Soehne Breit Fett', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-weight: bold;
    font-size: 2rem;
    display: block;
    margin: 2rem 0;
    text-align: left;
    color: #fff;
    max-width: 600px;
}
.try-it-free-section {
    display: none;
}
@media (max-width: 600px) {
    .centerpiece h1 {
        font-size: 8vw;
        margin: 0 0 0 1.5rem;
    }
    .centerpiece h2 {
        font-size: 16vw;
        margin: 0 0 0 1.5rem;
    }
    .centerpiece .subheadline {
        font-size: 3.2vw;
        max-width: 80vw;
        margin: 2rem 0 0 1.5rem;
    }
    .body-content {
        width: 100vw;
        background: #000;
        min-height: 100vh;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin: 3rem 0 0 0;
        padding: 3rem 1.5rem 0 1.5rem;
        display: flex;
    }
    .text-section, .circles-container {
        width: 100%;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
    .body-content p {
        font-size: 1.2rem;
    }
    .body-content .highlight {
        font-size: 1.3rem;
    }
    .circles-container {
        margin-left: 0;
        margin-top: 3rem;
        max-width: 100%;
        height: 300px;
        gap: 10px;
        padding-bottom: 2.5rem;
    }
    .circle {
        width: 40px;
        height: 40px;
    }
    .navbar {
        top: 1rem;
    }
    .nav-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.95rem;
    }
    .centerpiece {
        margin-top: 4.5rem;
    }
    .batch-link {
        font-size: 1.3rem;
        left: 1.5rem;
        top: 1rem;
    }
    .try-it-free-section {
        padding: 1rem 1.5rem 2rem 1.5rem;
        
    }
    .try-it-free-btn {
        font-size: 1rem;
        padding: 0.8rem 2rem;
    }
    .text-section {
        max-width: 100vw;
        padding: 0;
        margin: 0 auto;
    }
    .body-content .try-it-free-btn {
        margin: 2rem 0 0 0;
    }
    .body-content .circles-container {
        margin-top: 3rem;
    }
    .circles-container .circle:nth-child(31) {
        display: none !important;
    }
    .logo-full { display: none !important; }
    .logo-mobile { display: inline !important; font-size: 2rem !important; }
    #typewriter-text {
        font-size: 12vw;
    }
}
@media (min-width: 601px) {
    .logo-full { display: inline !important; }
    .logo-mobile { display: none !important; }
    
    /* Hide mobile hamburger menu on desktop */
    .hamburger-menu {
        display: none;
    }
    
    .mobile-dropdown {
        display: none;
    }
    
    /* Show desktop navbar */
    .navbar {
        display: flex;
    }
}
/* === End index.html styles migration === */

/* Header bar flex alignment */
.header-bar {
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0 0 0;
    box-sizing: border-box;
}
.header-spacer {
    flex-grow: 1;
}

.batch-link {
    font-family: 'Test Soehne Breit Fett', monospace, sans-serif;
    font-size: 2rem;
    color: #000;
    text-decoration: none;
    letter-spacing: 0.03em;
    z-index: 20;
    transition: color 0.2s;
    display: inline-block;
    vertical-align: middle;
    margin-left: 0;
    margin-right: 0;
}

.navbar {
    margin: 0;
}

.centerpiece {
    max-width: 1200px;
    margin: 15rem auto 0 auto;
    text-align: left;
    padding: 0;
}

body.dark-bg {
    background: #000 !important;
    color: #fff;
    transition: background 0.5s, color 0.5s;
}

.header-bar {
    padding: 2rem 0 0 0;
}
@media (max-width: 600px) {
  .header-bar {
    padding: 0.7rem 0.7rem 0 0.7rem;
    display: flex;
    align-items: center;
    justify-content: space-between !important;
    width: 100vw;
    max-width: 100vw;
    box-sizing: border-box;
    gap: 1.2rem;
    min-width: 0;
  }
  .batch-link {
    font-size: 1.7rem;
    margin: 0;
    padding: 0;
    position: static;
    left: unset;
    top: unset;
    line-height: 1;
    flex-shrink: 1;
    max-width: 60vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .header-spacer {
    flex: 1 1 auto;
    min-width: 0;
  }
  .hamburger-menu {
    margin-left: 0.5rem;
  }
  /* Mobile nav-buttons are hidden, using dropdown instead */
  
  /* Mobile hamburger menu styles */
  .hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 30;
    position: relative;
  }
  
  .hamburger-line {
    width: 100%;
    height: 3px;
    background-color: #000;
    border-radius: 2px;
    transition: all 0.3s ease;
  }
  
  .hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }
  
  .hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
  }
  
  .hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }
  
  /* Mobile dropdown menu */
  .mobile-dropdown {
    position: fixed;
    top: 0;
    right: -100%;
    width: 250px;
    height: 100vh;
    background: #faf7ef;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 25;
    padding-top: 80px;
  }
  
  /* Backdrop overlay when menu is open */
  .mobile-dropdown.active::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
  }
  
  .mobile-dropdown.active {
    right: 0;
  }
  
  .dropdown-content {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
  }
  
  .dropdown-item {
    font-family: 'Test Soehne Breit Buch', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 1rem;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    color: #000;
    padding: 1rem;
    border-radius: 0.5rem;
    transition: background 0.2s, color 0.2s;
    text-align: center;
  }
  
  .dropdown-item:hover,
  .dropdown-item.active {
    background: #000;
    color: #fff;
  }
  
  /* Hide desktop nav on mobile */
  .navbar {
    display: none;
  }
  
  /* Show full logo on mobile */
  .logo-full {
    display: inline !important;
  }
  
  .logo-mobile {
    display: none !important;
  }
  
  /* Mobile hamburger menu styles for all templates */
  .hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 30;
    position: relative;
  }
  
  .hamburger-line {
    width: 100%;
    height: 3px;
    background-color: #000;
    border-radius: 2px;
    transition: all 0.3s ease;
  }
  
  .hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }
  
  .hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
  }
  
  .hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }
  
  /* Mobile dropdown menu for all templates */
  .mobile-dropdown {
    position: fixed;
    top: 0;
    right: -100%;
    width: 250px;
    height: 100vh;
    background: #faf7ef;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 25;
    padding-top: 80px;
  }
  
  .mobile-dropdown.active {
    right: 0;
  }
  
  .dropdown-content {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
  }
  
  .dropdown-item {
    font-family: 'Test Soehne Breit Buch', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 1rem;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    color: #000;
    padding: 1rem;
    border-radius: 0.5rem;
    transition: background 0.2s, color 0.2s;
    text-align: center;
  }
  
  .dropdown-item:hover,
  .dropdown-item.active {
    background: #000;
    color: #fff;
  }
  
  /* Backdrop overlay when menu is open */
  .mobile-dropdown.active::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
  }
  
  /* Hide desktop nav on mobile for all templates */
  .navbar {
    display: none;
  }
  
  /* Show full logo on mobile for all templates */
  .logo-full {
    display: inline !important;
  }
  
  .logo-mobile {
    display: none !important;
  }
  
  /* Make hidden batch-link visible on mobile */
  .batch-link.hidden {
    display: inline !important;
  }
}
