/* iisugi.com -- Editorial Tone Calibration Tool */
/* Palette: Paper #F0E8D8, Ruled #D0C8B8, Red #C05040, Ink #2A2018,
   Muted #7A6A5A, Green #4A7A4A, Float #D4A060, Vintage #8A7A60 */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Serif 4', Georgia, serif;
    color: #2A2018;
    background: #F0E8D8;
    line-height: 1.85;
    font-size: clamp(15px, 1.1vw, 17px);
    font-weight: 400;
    overflow-x: hidden;
}

/* ========================
   HERO SECTION
   ======================== */

#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    background: #F0E8D8;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
}

.hero-vintage-overlay {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(138, 122, 96, 0.02) 2px,
        rgba(138, 122, 96, 0.02) 4px
    );
    pointer-events: none;
    z-index: 1;
}

.hero-diagonal-stripe {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 140%;
    height: 50%;
    background: rgba(192, 80, 64, 0.08);
    transform: rotate(-12deg);
    transform-origin: top right;
    z-index: 2;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.hero-diagonal-stripe.visible {
    opacity: 1;
}

.hero-content {
    position: relative;
    z-index: 3;
    padding-left: 10vw;
    max-width: 700px;
}

.logotype {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 700;
    font-size: clamp(28px, 4.5vw, 56px);
    color: #2A2018;
    letter-spacing: -0.02em;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.logotype.visible {
    opacity: 1;
}

.japanese-display {
    font-family: 'Noto Serif JP', serif;
    font-weight: 700;
    font-size: clamp(36px, 6vw, 80px);
    color: #2A2018;
    margin-top: 0.15em;
    letter-spacing: 0.05em;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 1s ease, transform 1s ease;
}

.japanese-display.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-tagline {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(16px, 1.4vw, 20px);
    color: #7A6A5A;
    margin-top: 1.2em;
    opacity: 0;
    transition: opacity 0.6s ease 0.3s;
}

.hero-tagline.visible {
    opacity: 1;
}

/* ========================
   DIAGONAL DIVIDERS
   ======================== */

.diagonal-divider {
    position: relative;
    width: 100%;
    height: 80px;
    overflow: hidden;
}

.diagonal-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -5%;
    width: 115%;
    height: 3px;
    background: #C05040;
    transform: rotate(-3deg);
    transform-origin: center;
}

.diagonal-divider-1::before {
    transform: rotate(-2.5deg);
}

.diagonal-divider-2::before {
    transform: rotate(2.5deg);
}

.diagonal-divider-3::before {
    transform: rotate(-2deg);
}

/* ========================
   TOOL SECTION
   ======================== */

#tool {
    padding: 80px 5vw;
    background: #F0E8D8;
    position: relative;
}

.tool-container {
    display: flex;
    gap: 5%;
    max-width: 1200px;
    margin: 0 auto;
    align-items: flex-start;
}

.tool-input-area {
    flex: 0 0 58%;
}

.tool-results-area {
    flex: 0 0 37%;
}

.section-heading {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 600;
    font-size: clamp(22px, 2.5vw, 32px);
    color: #2A2018;
    margin-bottom: 0.4em;
}

.section-heading-center {
    text-align: center;
}

.section-subtext {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: clamp(14px, 1vw, 16px);
    color: #7A6A5A;
    margin-bottom: 1.5em;
    max-width: 520px;
}

.section-subtext-center {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.input-wrapper {
    position: relative;
    margin-bottom: 1.5em;
}

#text-input {
    width: 100%;
    min-height: 280px;
    padding: 20px 24px;
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: clamp(15px, 1.1vw, 17px);
    font-weight: 400;
    line-height: 28px;
    color: #2A2018;
    background: transparent;
    border: 2px solid #D0C8B8;
    border-radius: 4px;
    resize: vertical;
    position: relative;
    z-index: 2;
    outline: none;
    transition: border-color 0.3s ease;
}

#text-input:focus {
    border-color: #C05040;
}

#text-input::placeholder {
    color: #7A6A5A;
    font-style: italic;
}

.ruled-lines-bg {
    position: absolute;
    inset: 2px;
    border-radius: 2px;
    background: repeating-linear-gradient(
        to bottom,
        transparent,
        transparent 27px,
        rgba(208, 200, 184, 0.2) 27px,
        rgba(208, 200, 184, 0.2) 28px
    );
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.ruled-lines-bg.visible {
    opacity: 1;
}

#analyze-btn {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 600;
    font-size: 15px;
    color: #F0E8D8;
    background: #C05040;
    border: none;
    padding: 12px 32px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.15s ease;
    letter-spacing: 0.03em;
}

#analyze-btn:hover {
    background: #a8422e;
    transform: translateY(-1px);
}

#analyze-btn:active {
    transform: translateY(0);
}

/* Results Panel */

#results-panel {
    background: #fff;
    border: 1px solid #D0C8B8;
    border-radius: 4px;
    padding: 28px 24px;
    min-height: 280px;
    position: relative;
}

#results-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    gap: 16px;
}

#results-placeholder p {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #7A6A5A;
    text-align: center;
}

.placeholder-icon {
    opacity: 0.5;
}

.hidden {
    display: none;
}

#tone-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #D0C8B8;
}

.score-label {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    font-size: 12px;
    color: #7A6A5A;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 6px;
}

.score-value {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 700;
    font-size: 42px;
    line-height: 1;
    color: #2A2018;
    transition: color 0.4s ease;
}

.score-value.score-good {
    color: #4A7A4A;
}

.score-value.score-warn {
    color: #D4A060;
}

.score-value.score-bad {
    color: #C05040;
}

.score-desc {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #7A6A5A;
    margin-top: 6px;
}

#flagged-list {
    margin-bottom: 20px;
}

.flagged-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.flagged-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.flag-indicator {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #D4A060;
    margin-top: 6px;
    position: relative;
}

.flag-indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    width: 12px;
    height: 1px;
    background: #D4A060;
    opacity: 0.5;
}

.flag-text {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 14px;
    color: #2A2018;
    line-height: 1.5;
}

.flag-phrase {
    font-family: 'Source Serif 4', Georgia, serif;
    font-style: italic;
    color: #C05040;
    font-size: 13px;
}

.flag-suggestion {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 13px;
    color: #4A7A4A;
    display: block;
    margin-top: 2px;
}

#suggestions-area {
    padding-top: 16px;
    border-top: 1px solid #D0C8B8;
}

.suggestion-summary {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 14px;
    color: #7A6A5A;
    line-height: 1.6;
}

/* ========================
   BEFORE/AFTER EXAMPLES
   ======================== */

#examples {
    padding: 80px 5vw;
    background: #F0E8D8;
}

.comparison-pair {
    display: flex;
    align-items: stretch;
    max-width: 1000px;
    margin: 0 auto 48px auto;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.comparison-pair.visible {
    opacity: 1;
    transform: translateY(0);
}

.comparison-before,
.comparison-after {
    flex: 1;
    padding: 28px 32px;
    position: relative;
}

.comparison-before {
    background: rgba(192, 80, 64, 0.03);
    border-radius: 4px 0 0 4px;
}

.comparison-after {
    background: rgba(74, 122, 74, 0.03);
    border-radius: 0 4px 4px 0;
}

.comparison-label {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    display: inline-block;
    margin-bottom: 12px;
}

.comparison-label-before {
    color: #C05040;
}

.comparison-label-after {
    color: #4A7A4A;
}

.comparison-text {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(14px, 1vw, 16px);
    color: #2A2018;
    line-height: 1.85;
}

.flagged-phrase {
    text-decoration: underline;
    text-decoration-color: #C05040;
    text-underline-offset: 3px;
    text-decoration-thickness: 2px;
}

.measured-phrase {
    text-decoration: underline;
    text-decoration-color: #4A7A4A;
    text-underline-offset: 3px;
    text-decoration-thickness: 2px;
}

.comparison-divider-vertical {
    width: 1px;
    background: #C05040;
    flex-shrink: 0;
    position: relative;
    opacity: 0;
    transition: opacity 0.4s ease 0.3s;
}

.comparison-pair.visible .comparison-divider-vertical {
    opacity: 1;
}

/* ========================
   TESTIMONIALS
   ======================== */

#testimonials {
    padding: 80px 5vw;
    background: #2A2018;
    position: relative;
    overflow: hidden;
}

#testimonials::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(138, 122, 96, 0.04) 2px,
        rgba(138, 122, 96, 0.04) 4px
    );
    pointer-events: none;
}

#testimonials .section-heading {
    color: #F0E8D8;
    position: relative;
    z-index: 1;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 1100px;
    margin: 40px auto 0;
    position: relative;
    z-index: 1;
}

.testimonial-card {
    background: rgba(240, 232, 216, 0.06);
    border: 1px solid rgba(208, 200, 184, 0.15);
    border-radius: 4px;
    padding: 32px 28px;
    position: relative;
}

.testimonial-quote {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(14px, 1vw, 16px);
    color: #D0C8B8;
    line-height: 1.85;
    margin-bottom: 20px;
}

.testimonial-author {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    font-size: 13px;
    color: #7A6A5A;
    display: block;
}

.editorial-annotation {
    position: absolute;
    top: -10px;
    right: -8px;
    font-family: 'Source Serif 4', Georgia, serif;
    font-style: italic;
    font-weight: 400;
    font-size: 12px;
    color: #C05040;
    transform: rotate(-6deg);
    opacity: 0.7;
    pointer-events: none;
    white-space: nowrap;
}

/* ========================
   FOOTER
   ======================== */

#footer {
    background: #F0E8D8;
    padding: 48px 5vw 40px;
}

.footer-rule {
    width: 100%;
    height: 1px;
    background: #D0C8B8;
    margin-bottom: 40px;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1100px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-brand {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.footer-logo {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 700;
    font-size: 18px;
    color: #2A2018;
}

.footer-jp {
    font-family: 'Noto Serif JP', serif;
    font-weight: 700;
    font-size: 16px;
    color: #7A6A5A;
}

.footer-nav {
    display: flex;
    gap: 28px;
}

.footer-nav a {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #7A6A5A;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: #C05040;
}

.footer-copy {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-style: italic;
    font-size: 13px;
    color: #7A6A5A;
}

/* ========================
   RESPONSIVE
   ======================== */

@media (max-width: 900px) {
    .tool-container {
        flex-direction: column;
    }

    .tool-input-area,
    .tool-results-area {
        flex: 1 1 100%;
    }

    .tool-results-area {
        margin-top: 40px;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
    }

    .comparison-pair {
        flex-direction: column;
    }

    .comparison-divider-vertical {
        width: 100%;
        height: 1px;
    }

    .comparison-before {
        border-radius: 4px 4px 0 0;
    }

    .comparison-after {
        border-radius: 0 0 4px 4px;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .hero-content {
        padding-left: 6vw;
        padding-right: 6vw;
    }

    #tool {
        padding: 50px 4vw;
    }

    #examples {
        padding: 50px 4vw;
    }

    #testimonials {
        padding: 50px 4vw;
    }

    .comparison-before,
    .comparison-after {
        padding: 20px 18px;
    }
}
