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

html {
    background: #ffffff;
}

body {
    min-height: 100vh;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 3vh;
    font-family: 'Montserrat', sans-serif;
    padding-bottom: 40px;
    touch-action: pan-y pinch-zoom;
    -webkit-tap-highlight-color: transparent;
    overflow-y: scroll;
    animation: fadeIn 0.2s ease-in;
}

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

.container {
    max-width: 800px;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Logo and Branding */
.logo-container {
    text-align: center;
    max-width: none;
    width: 100%;
    padding: 0;
}

.logo-container img {
    max-width: 180px;
    width: 60%;
    height: auto;
    margin-bottom: 1rem;
}

.company-name {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}

.mind {
    color: #000000;
}

.jig {
    color: #00A3FF;
    text-shadow: 0 0 20px rgba(0, 163, 255, 0.5);
}

/* Typography */
h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 2rem;
    text-align: center;
}

h1 .mind {
    color: #000000;
}

h1 .jig {
    color: #00A3FF;
    text-shadow: 0 0 20px rgba(0, 163, 255, 0.5);
}

h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #00A3FF;
    margin: 2rem 0 1rem;
}

h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    margin: 1.5rem 0 0.5rem;
}

p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 1.5rem;
}

ul {
    margin: 1rem 0 1.5rem 2rem;
    line-height: 1.8;
    color: #333;
}

ul li {
    margin-bottom: 0.5rem;
}

a {
    color: #00A3FF;
    text-decoration: none;
    font-weight: 700;
}

a:hover {
    text-decoration: underline;
}

/* Navigation */
.hamburger {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    padding: 6px 0;
    transition: all 0.3s ease;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background: #00A3FF;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: right 0.3s ease;
    padding: 80px 30px 30px;
}

.nav-menu.active {
    right: 0;
}

.nav-menu a {
    display: block;
    padding: 1rem 0;
    color: #333;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2rem;
    border-bottom: 1px solid #eee;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: #00A3FF;
}

.nav-menu a:last-child {
    border-bottom: none;
}

.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
        rgba(255, 0, 128, 0.3) 0%,
        rgba(128, 0, 255, 0.3) 25%,
        rgba(0, 128, 255, 0.3) 50%,
        rgba(255, 0, 255, 0.3) 75%,
        rgba(255, 128, 0, 0.3) 100%);
    backdrop-filter: blur(2px);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-overlay.active {
    display: block;
    opacity: 1;
}

/* Page-specific Styles */
.contact-info {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.contact-info a {
    color: #00A3FF;
    text-decoration: none;
    font-weight: 700;
}

.contact-info a:hover {
    text-decoration: underline;
}

.last-updated {
    text-align: center;
    font-style: italic;
    color: #666;
    margin-bottom: 2rem;
}

/* Breathwork App Styles (index.html) */
#logo {
    transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out;
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

#waveform {
    margin-top: 1rem;
    will-change: contents;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#waveform.ready {
    opacity: 1;
}

.controls {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.control-group label {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    font-weight: 400;
}

.control-group label.active {
    color: #00A3FF;
    font-weight: 800;
    transform: scale(1.1);
}

.control-group input {
    width: 70px;
    padding: 0.5rem 0.25rem;
    border: 2px solid #00A3FF;
    border-radius: 4px;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #000;
}

.control-group input::-webkit-inner-spin-button,
.control-group input::-webkit-outer-spin-button {
    opacity: 1;
}

.control-group input:focus {
    outline: none;
    box-shadow: 0 0 8px rgba(0, 163, 255, 0.5);
}

.sound-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    transition: all 0.3s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    z-index: 1000;
}

.sound-toggle svg {
    width: 100%;
    height: 100%;
    fill: #00A3FF;
    transition: fill 0.3s ease;
}

.sound-toggle:hover {
    transform: scale(1.1);
}

.sound-toggle:active {
    transform: scale(0.95);
}

.sound-toggle.muted svg {
    fill: #ccc;
}

.control-buttons {
    display: none;
}

.pattern-picker {
    margin-top: 1.5rem;
    perspective: 1000px;
    height: 140px;
    position: relative;
    overflow: hidden;
}

.info-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translate(140px, -12px);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #00A3FF;
    color: #00A3FF;
    background: white;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    z-index: 20;
    transition: all 0.3s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.info-icon.visible {
    display: flex;
}

.info-icon:hover {
    background: #00A3FF;
    color: white;
    transform: translate(-50%, -50%) translate(140px, -12px) scale(1.15);
}

.info-icon:active {
    transform: translate(-50%, -50%) translate(140px, -12px) scale(0.95);
}

.info-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.info-modal.active {
    display: flex;
}

.info-modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.info-modal-header {
    font-size: 1.5rem;
    font-weight: 800;
    color: #00A3FF;
    margin-bottom: 1rem;
}

.info-modal-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    white-space: pre-line;
}

.info-modal-close {
    width: 100%;
    padding: 0.75rem;
    background: #00A3FF;
    color: white;
    border: none;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.info-modal-close:hover {
    background: #0088CC;
}

.info-modal-close:active {
    transform: scale(0.98);
}

.cylinder-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 100%;
}

.pattern-item {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #666;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

.pattern-item.selected {
    color: #00A3FF;
    font-size: 1.4rem;
    text-shadow: 0 0 10px rgba(0, 163, 255, 0.3);
}

.picker-fade {
    position: absolute;
    width: 100%;
    height: 50px;
    pointer-events: none;
    z-index: 10;
}

.picker-fade.top {
    top: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
}

.picker-fade.bottom {
    bottom: 0;
    background: linear-gradient(to top, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
}

.picker-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    height: 55px;
    border: 2px solid #00A3FF;
    border-radius: 8px;
    pointer-events: none;
    z-index: 5;
    background: rgba(0, 163, 255, 0.05);
}

/* Responsive Design */
@media (min-width: 769px) {
    .control-group input {
        cursor: text;
    }
}

@media (max-width: 768px) {
    .company-name {
        font-size: 2rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .control-group {
        position: relative;
    }

    .control-group input {
        pointer-events: none;
        -webkit-user-select: none;
        user-select: none;
        cursor: default;
    }

    .control-buttons {
        display: flex;
        gap: 0.25rem;
        margin-top: 0.25rem;
    }

    .control-btn {
        width: 30px;
        height: 30px;
        border: 2px solid #00A3FF;
        border-radius: 4px;
        background: white;
        color: #00A3FF;
        font-size: 1.2rem;
        font-weight: 700;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    .control-btn:active {
        background: #00A3FF;
        color: white;
    }

    #logo {
        max-width: 200px;
    }

    #waveform {
        width: 100% !important;
        max-width: 400px;
    }
}
