/* Complete CSS Reset */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}

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

.container {
    width: 100%;
    max-width: 375px;
    margin: 0 auto;
    background-color: white;
    padding-bottom: 16px;
    overflow-x: hidden;
    box-sizing: border-box;
}

@media (max-width: 375px) {
    .container {
        width: 100%;
        max-width: 100%;
    }
}

/* Header */
.header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    background: #fff;
}

/* Logo container */
.logo {
    display: flex;
    align-items: center;
}

/* Chonote logo */
.note-logo {
    width: 120.41px;
    height: 44.35px;
    object-fit: contain;
}

/* Separator */
.brand-separator {
    color: #828A9B;
    font-size: 20px;
    font-weight: 350;
    font-family: 'SF Compact', sans-serif;
    margin: 0 12px;
    display: flex;
    align-items: center;
}

/* Inner Garden logo */
.inner-garden-logo {
    width: 120px;
    height: 24px;
    object-fit: contain;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .header {
        padding: 8px 16px;
    }
    
    .note-logo {
        width: 120.41px;
        height: 44.35px;
    }
    
    .inner-garden-logo {
        width: 120px;
        height: 24px;
    }
    
    .brand-separator {
        font-size: 20px;
        margin: 0 12px;
        letter-spacing: 0.16em;
    }
}

/* Inner Garden logo */
.inner-garden-logo {
    width: 120px;
    height: 24px;
    object-fit: contain;
}

/* Title Section */
.title-section {
    background: #FCF4ED;
    padding: 8px 0;
    text-align: center;
    width: 100%;
}

.title-section h1 {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #FF8718;
    line-height: 1.2em;
    width: 100%;
    max-width: 375px;
    margin: 0 auto;
}

@media (max-width: 375px) {
    .title-section h1 {
        width: 100%;
        padding: 0 10px;
        box-sizing: border-box;
    }
}

/* Hero Section */
.hero-section {
    position: relative;
    text-align: center;
    height: 268px;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.hero-image {
    width: 100%;
    height: 268px;
    overflow: hidden;
}

.hero-image img {
    width: 100%;
    height: 268px;
    object-fit: cover;
    display: block;
}

.hero-overlay {
    position: absolute;
    top: 118px;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 327px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 0 auto;
}

.hero-title {
    font-family: 'Noto Sans CJK JP', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #2F2F2F;
    line-height: 1.2em;
    width: 100%;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
    stroke: 1px solid #D2DFE5;
}

.hero-title .highlight {
    color: #FF8718;
    font-weight: 700;
}

.hero-subtitle {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #2F2F2F;
    line-height: 1.2em;
    text-align: center;
    width: 100%;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
    stroke: 1px solid #D2DFE5;
}

.cta-button {
    background: #FF8A00;
    color: white;
    padding: 12px 16px;
    border: none;
    border-radius: 4px;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.2s;
    line-height: 1em;
    margin-top: 32px;
}

.cta-button:hover {
    background: #E67A00;
}

/* Description Section */
.description-section {
    width: 100%;
    height: 270px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    text-align: center;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.description-image {
    width: 100%;
    height: 270px;
    overflow: hidden;
}

.description-image img {
    width: 100%;
    height: 270px;
    object-fit: cover;
    display: block;
}

.trial-text {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #2F2F2F;
    line-height: 1.2em;
    position: absolute;
    top: 229px;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 239px;
    margin: 0 auto;
    text-align: center;
}

.description-text {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #2F2F2F;
    line-height: 1.4em;
    text-align: center;
    position: absolute;
    top: 24px;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 295px;
    margin: 0 auto;
}

.description-text.orange {
    color: #FF8A00;
    font-weight: 500;
}

/* Steps Section */
.steps-section {
    padding: 24px 16px 32px 16px;
    background: #FF8A00;
}

.steps-title {
    text-align: center;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: white;
    line-height: 1.2em;
    margin-bottom: 16px;
}

.steps-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.step-item {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 12px 10px;
    background: white;
    border-radius: 4px;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}

.step-arrow {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 10px;
    width: 100%;
}

.step-arrow img {
    width: 12px;
    height: 10px;
}

.step-number {
    width: 24px;
    height: 24px;
    min-width: 24px;
    background: #FF8A00;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'DIN 2014', sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 4px;
}

.step-content {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: flex-start;
    margin-right: 5px;
    padding-top: 4px;
}

.step-text {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #2F2F2F;
    line-height: 1.4em;
    width: 100%;
    text-align: left;
}

.step-text a {
    color: #FF6B35;
    text-decoration: underline;
}

.step-image {
    width: 120px;
    min-width: 80px;
    height: 100px;
    overflow: hidden;
    border-radius: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
}

.step-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Media query for smaller screens */
@media (max-width: 400px) {
    .step-item {
        padding: 10px 6px;
        gap: 6px;
    }
    
    .step-number {
        width: 22px;
        height: 22px;
        min-width: 22px;
        font-size: 14px;
        margin-top: 2px;
    }
    
    .step-text {
        font-size: 13px;
    }
    
    .step-image {
        width: 90px;
        min-width: 70px;
        height: 85px;
    }
}

/* Media query for very small screens */
@media (max-width: 350px) {
    .steps-section {
        padding: 24px 10px 32px 10px;
    }
    
    .step-item {
        padding: 8px 5px;
        gap: 5px;
    }
    
    .step-number {
        width: 20px;
        height: 20px;
        min-width: 20px;
        font-size: 12px;
        margin-top: 2px;
    }
    
    .step-content {
        margin-right: 3px;
    }
    
    .step-text {
        font-size: 12px;
        line-height: 1.3;
    }
    
    .step-image {
        width: 80px;
        min-width: 60px;
        height: 70px;
    }
}

/* Media query for extreme small screens */
@media (max-width: 330px) {
    .steps-section {
        padding: 24px 5px 32px 5px;
    }
    
    .step-item {
        padding: 6px 4px;
        gap: 4px;
    }
    
    .step-number {
        width: 18px;
        height: 18px;
        min-width: 18px;
        font-size: 11px;
        margin-top: 1px;
    }
    
    .step-content {
        margin-right: 2px;
        padding-top: 2px;
    }
    
    .step-text {
        font-size: 11px;
        line-height: 1.2;
    }
    
    .step-image {
        width: 65px;
        min-width: 50px;
        height: 60px;
    }
}

.step-note {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 9px;
    font-weight: 500;
    color: #2F2F2F;
    line-height: 1.4em;
    margin-top: 6px;
    max-width: 309px;
    margin-left: 18px;
    margin-right: 18px;
}

/* Coupon Section */
.coupon-section {
    padding: 24px 16px;
    background: #FCF4ED;
    text-align: center;
    color: #333;
}

.coupon-title {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #FF8A00;
    line-height: 1.2em;
    margin-bottom: 16px;
}

.coupon-image {
    display: block;
    margin: 0 auto 24px auto;
    max-width: 245px;
    height: auto;
}

.coupon-instructions {
    text-align: left;
}

.coupon-instructions h3 {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #FF8A00;
    line-height: 1.2em;
    text-align: center;
    margin-bottom: 24px;
}

.coupon-step-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.coupon-step {
    display: flex;
    align-items: flex-start;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #2F2F2F;
    line-height: 1.4;
    padding: 0 8px;
}

.coupon-code-box {
    background: white;
    border-radius: 8px;
    padding: 8px 0;
    text-align: center;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: black;
    line-height: 1.4em;
    margin: 0 0 26px 0;
}

.app-screenshot {
    margin: 16px 0 0 0;
    text-align: center;
}

.app-screenshot img {
    width: 176px;
    height: 159px;
    object-fit: cover;
    display: block;
    margin: 0 auto;
}

.contact-info {
    background: #fff;
    margin-top: 18px;
    padding-left: 16px;
    padding-right: 16px;
}

.contact-info p {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 10px;
    font-weight: 500;
    color: #64646C;
    line-height: 1.4em;
}

/* Primary contact-button (bottom CTA) */
.contact-button {
    display: block;
    max-width: 158px;
    margin: 16px auto 8px auto;
    padding: 12px 14px;
    background: #FF8A00;
    color: white;
    border: none;
    border-radius: 4px;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s;
    line-height: 1em;
}
.contact-button:hover {
    background: #E67A00;
    box-shadow: 0 6px 12px rgba(255, 138, 0, 0.3);
}

@media (max-width: 480px) {
    .container {
        max-width: 100%;
    }

    .hero-title {
        font-size: 18px;
    }
}

/* Hidden elements for other layouts */
.fc-simple-coupon {
    display: none;
}

/* Cross-platform mobile fixes */
@media only screen and (max-width: 767px) {
    /* Apply to all mobile browsers */
    html, body {
        position: relative; /* Establish positioning context */
        min-height: 100vh; /* Standard 100vh */
        height: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: none; /* Prevent bounce on Android */
    }
    
    body {
        /* Hardware acceleration for all browsers */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        
        /* Smoother animations */
        backface-visibility: hidden;
    }
}

/* iOS-specific fixes */
@supports (-webkit-touch-callout: none) {
    html, body {
        min-height: 100vh;
        height: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Force hardware acceleration on iOS */
    body {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Focus styles for accessibility */
.focused {
    outline: none;
    outline-offset: 0;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}
.focused { outline: none; outline-offset: 0; }
.fc-simple-coupon { display: none; }
.coupon-code-box:focus { outline: none; outline-offset: 0; }
.cta-button:focus, .contact-button:focus { outline: none; outline-offset: 0; }

/* Step animations */
.step-item[data-animate],
.step-arrow[data-animate] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.step-item.animate-in,
.step-arrow.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .step-item[data-animate],
    .step-arrow[data-animate] {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Animation Base States */
[data-animate] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

/* Animation Active States */
.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Ensure elements are visible without JS */
.no-js [data-animate] {
    opacity: 1;
    transform: none;
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    [data-animate] {
        transition: none;
        opacity: 1;
        transform: none;
    }
}

/* Ensure elements are visible initially before JS loads */
body:not(.js-loaded) [data-animate] {
    opacity: 1;
    transform: none;
    transition: none;
}
