/* =========================================================
GLOBAL
========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;

    font-family:
    Georgia,
    "Times New Roman",
    serif;

    color: #30251d;

    background:
    linear-gradient(
    180deg,
    #fffaf2 0%,
    #f8efe2 100%
    );

    min-height: 100vh;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}


/* =========================================================
HEADER
========================================================= */

.site-header {
    padding: 28px 24px 36px;

    background:
    linear-gradient(
    135deg,
    #2b1b12,
    #5a2917
    );

    color: white;

    border-bottom: 4px solid #d78642;
}

.header-inner {
    width: min(1100px, 100%);
    margin: 0 auto;
}


/* HOME LINK */

.home-link {
    display: inline-block;

    margin-bottom: 28px;

    color: #f2c495;

    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;

    text-decoration: none;
}

.home-link:hover {
    color: white;
}


/* IMAGE + TITLE */

.header-hero {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 28px;

    max-width: 850px;
    margin: 0 auto;
}


/* SWAMIJI IMAGE */

.header-swami {
    width: 100px;
    height: 120px;

    min-width: 100px;
    max-width: 100px;

    min-height: 120px;
    max-height: 120px;

    object-fit: cover;
    object-position: top center;

    flex: 0 0 100px;

    border-radius: 10px;
    border: 2px solid rgba(239, 180, 125, 0.65);

    box-shadow:
    0 8px 25px
    rgba(0, 0, 0, 0.22);
}

/* TITLE */

.header-title {
    text-align: left;
}

.header-kicker {
    display: block;

    margin-bottom: 10px;

    color: #efb47d;

    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;

    letter-spacing: 2.5px;
    text-transform: uppercase;
}

.header-title h1 {
    margin: 0;

    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.1;
}

.header-title h1 span {
    color: #efb47d;
}


/* MOBILE */

@media (max-width: 600px) {

    .site-header {
        padding: 20px 16px 28px;
    }

    .home-link {
        margin-bottom: 20px;
    }

    .header-hero {
        gap: 16px;
    }

    .header-swami {
        width: 70px;
        height: 90px;

        min-width: 70px;
        max-width: 70px;

        min-height: 90px;
        max-height: 90px;

        flex-basis: 70px;
    }
    .header-title h1 {
        font-size: 28px;
    }

    .header-kicker {
        font-size: 10px;
        letter-spacing: 1.5px;
    }
}

/* =========================================================
PAGE SHELL
========================================================= */

.page-shell {
    width: min(1100px, calc(100% - 32px));

    margin: 45px auto;
}

.main-content {
    padding: 36px;

    background: rgba(255, 255, 255, 0.94);

    border: 1px solid #ead9c7;
    border-radius: 24px;

    box-shadow:
    0 18px 55px
    rgba(73, 45, 26, 0.09);
}


/* =========================================================
JOURNEY PROGRESS
========================================================= */

.journey-progress {
    max-width: 700px;

    display: flex;
    align-items: center;

    margin: 0 auto 55px;
}

.journey-step {
    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 8px;

    min-width: 80px;

    color: #9a887a;

    font-family: Arial, sans-serif;
    font-size: 13px;
    font-weight: 700;
}

.journey-number {
    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 2px solid #d8c7b7;
    border-radius: 50%;

    background: white;
}

.journey-step.active {
    color: #b84e1e;
}

.journey-step.active .journey-number {
    border-color: #c65a28;
    background: #c65a28;
    color: white;
}

.journey-line {
    flex: 1;

    height: 2px;

    margin-bottom: 22px;

    background: #e3d5c8;
}


/* =========================================================
SECTION HEADINGS
========================================================= */

.section-heading {
    max-width: 760px;

    margin: 0 auto 35px;

    text-align: center;
}

.step-badge {
    display: inline-block;

    margin-bottom: 14px;
    padding: 7px 14px;

    border-radius: 999px;

    background: #f7e7d8;
    color: #ad481d;

    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: 800;

    letter-spacing: 1px;
    text-transform: uppercase;
}

.section-heading h2 {
    margin: 0 0 12px;

    font-size: clamp(29px, 4vw, 40px);
}

.section-heading p {
    margin: 0;

    color: #75665a;

    font-size: 17px;
    line-height: 1.7;
}


/* =========================================================
SPEECH CONTROLS
========================================================= */

.speech-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;

    gap: 10px;

    margin-bottom: 35px;
}

.control-btn,
.primary-btn,
.secondary-btn,
.nav-btn,
.selfie-btn {
    border: 0;
    border-radius: 10px;

    padding: 11px 18px;

    font-family: Arial, sans-serif;
    font-weight: 700;

    transition:
    transform 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.control-btn {
    border: 1px solid #ddcdbc;

    background: #fffaf5;
    color: #514338;
}

.control-btn:hover:not(:disabled) {
    background: #f7eadf;
    transform: translateY(-1px);
}

.control-primary {
    border-color: #bc4c1c;

    background: #bc4c1c;
    color: white;
}

.control-primary:hover:not(:disabled) {
    background: #963b16;
}

.follow-btn {
    border-color: #a57245;
    color: #8b5228;
}


/* =========================================================
SPEECH DOCUMENT
========================================================= */

#speech_container {
    padding: 45px clamp(22px, 6vw, 70px);

    border: 1px solid #e4d4c3;
    border-radius: 18px;

    background:
    linear-gradient(
    rgba(255, 253, 248, 0.96),
    rgba(255, 250, 241, 0.96)
    );

    box-shadow:
    inset 0 0 60px
    rgba(119, 77, 40, 0.035);
}

.speech-portrait {
    display: flex;
    justify-content: center;

    margin-bottom: 28px;
}

.portrait-frame {
    padding: 8px;

    border: 1px solid #d3aa7e;
    border-radius: 8px;

    background: #fff;

    box-shadow:
    0 12px 30px
    rgba(64, 39, 22, 0.13);
}

.portrait-frame img {
    display: block;

    width: 165px;
    height: auto;

    border-radius: 4px;
}

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

.speech-decoration {
    color: #c45a28;

    font-size: 22px;
}

.speech-heading h2 {
    margin: 8px 0 12px;

    color: #b84e1e;

    font-size: clamp(28px, 4vw, 40px);

    text-transform: uppercase;
    letter-spacing: 1px;
}

.speech-heading p {
    margin: 0 0 6px;

    color: #6f6258;

    font-size: 18px;
}

.speech-heading strong {
    color: #9a7254;

    font-family: Arial, sans-serif;
    font-size: 13px;

    letter-spacing: 1px;
    text-transform: uppercase;
}

.speech-divider {
    display: flex;
    align-items: center;

    gap: 14px;

    max-width: 550px;

    margin: 30px auto;
}

.speech-divider > span:not(.divider-symbol) {
    flex: 1;
    height: 1px;

    background: #ddc8b5;
}

.divider-symbol {
    color: #b85a2b;

    font-size: 20px;
}


/* =========================================================
SPEECH TEXT
========================================================= */

#speech_main_text {
    height: auto;

    overflow: visible;

    color: #40352c;

    font-size: 19px;
    line-height: 1.85;

    transition: height 0.3s ease;
}

#speech_main_text p {
    margin: 0 0 25px;
}

#speech_main_text.follow-speech {
    height: 500px;

    overflow-y: hidden;

    padding: 15px 20px;

    border-radius: 12px;

    background: #fff;
}

.word {
    border-radius: 4px;

    transition:
    background 0.12s ease,
    color 0.12s ease;
}

.word-active {
    padding: 2px 3px;

    background: #f6c66c;
    color: #42260d;
}


/* =========================================================
QUIZ
========================================================= */

#quiz_content,
#selfie_content {
    display: none;
}

.quiz-panel {
    max-width: 820px;

    margin: 0 auto;

    padding: 30px;

    border: 1px solid #e3d4c5;
    border-radius: 18px;

    background: #fffdf9;
}

.quiz-panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    gap: 20px;

    margin-bottom: 30px;
}

.mini-label {
    color: #b64d1f;

    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: 800;

    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.quiz-panel-heading h3 {
    margin: 7px 0 0;

    font-size: 25px;
}

.question-count {
    flex-shrink: 0;

    padding: 7px 12px;

    border-radius: 999px;

    background: #f4e8dc;
    color: #80583a;

    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
}

.quiz-question {
    margin-bottom: 25px;
    padding: 22px;

    border: 1px solid #eadfd4;
    border-radius: 12px;

    background: white;
}

.quiz-question h3 {
    margin: 0 0 18px;

    font-size: 18px;
    line-height: 1.5;
}

.quiz-option {
    display: block;

    margin: 9px 0;
    padding: 12px 14px;

    border: 1px solid #e6ddd5;
    border-radius: 9px;

    font-family: Arial, sans-serif;
    font-size: 15px;

    cursor: pointer;

    transition:
    border 0.15s ease,
    background 0.15s ease;
}

.quiz-option:hover {
    border-color: #d7a37d;
    background: #fff8f1;
}

.quiz-option input {
    margin-right: 10px;
}

.quiz-option.correct {
    border-color: #76a978;
    background: #e8f5e8;
}

.quiz-option.wrong {
    border-color: #d77b73;
    background: #fae6e4;
}

.quiz-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;

    gap: 12px;

    margin-top: 25px;
}

.primary-btn {
    background: #bd4e1e;
    color: white;
}

.primary-btn:hover:not(:disabled) {
    background: #963b16;

    transform: translateY(-1px);
}

.secondary-btn {
    border: 1px solid #dac8b8;

    background: white;
    color: #604b3c;
}

.secondary-btn:hover {
    background: #f8eee5;
}

#quiz_result {
    margin-left: auto;

    color: #8d421f;

    font-family: Arial, sans-serif;
    font-size: 18px;
    font-weight: 800;
}


/* =========================================================
SELFIE / CERTIFICATE
========================================================= */

.selfie-taker {
    max-width: 900px;

    margin: 0 auto;
    padding: 35px;

    border: 1px solid #e1cfbd;
    border-radius: 18px;

    background:
    linear-gradient(
    135deg,
    #fffaf3,
    #f8eadb
    );

    text-align: center;
}

.certificate-intro {
    max-width: 570px;

    margin: 0 auto 30px;
}

.certificate-icon {
    width: 55px;
    height: 55px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 auto 15px;

    border-radius: 50%;

    background: #c15828;
    color: white;

    font-size: 22px;
}

.certificate-intro h3 {
    margin: 0 0 10px;

    font-size: 27px;
}

.certificate-intro p {
    margin: 0;

    color: #77675b;

    font-size: 16px;
    line-height: 1.6;
}

.name-field {
    max-width: 480px;

    margin: 0 auto 20px;

    text-align: left;
}

.name-field label {
    display: block;

    margin-bottom: 8px;

    font-family: Arial, sans-serif;
    font-size: 13px;
    font-weight: 800;

    color: #5d4939;
}

#user_name {
    width: 100%;

    padding: 14px 16px;

    border: 1px solid #d5c0ae;
    border-radius: 10px;

    outline: none;

    background: white;

    font-family: Arial, sans-serif;
    font-size: 16px;

    transition:
    border 0.2s ease,
    box-shadow 0.2s ease;
}

#user_name:focus {
    border-color: #c45b29;

    box-shadow:
    0 0 0 3px
    rgba(196, 91, 41, 0.12);
}

.selfie-btn {
    display: block;

    margin: 15px auto;
}


/* Camera */

#selfie_taker video {
    display: block;

    width: min(100%, 600px);
    height: auto;
    aspect-ratio: 2 / 3;

    margin: 25px auto;

    object-fit: contain;
    object-position: center;

    transform: scaleX(-1);

    background: #111;

    border: 6px solid white;
    border-radius: 20px;
}

/* Certificate preview */

#selfie_taker canvas {
    display: block;

    width: 100%;
    max-width: 800px;
    height: auto;

    margin: 30px auto;

    border-radius: 10px;

    box-shadow:
    0 15px 40px
    rgba(57, 36, 21, 0.16);
}

.capture-btn,
.download-btn,
.share-cert-btn{
    display: block;

    margin: 15px auto;
    padding: 11px 22px;

    border: 0;
    border-radius: 10px;

    background: #bd4e1e;
    color: white;

    font-family: Arial, sans-serif;
    font-weight: 700;
}


.participation-message {
    max-width: 650px;

    margin: 30px auto 10px;
    padding: 24px 28px;

    text-align: center;

    background: #fff8ef;

    border: 1px solid #ead4bd;
    border-radius: 16px;

    box-shadow:
    0 8px 25px rgba(80, 48, 25, 0.07);
}

.participation-icon {
    display: block;

    margin-bottom: 8px;

    color: #c35422;
    font-size: 22px;
}

.thank-you {
    margin: 0 0 10px;

    color: #a7431c;

    font-family: Georgia, serif;
    font-size: 22px;
    font-weight: bold;
}

.invitation {
    margin: 0;

    color: #5d4a3d;

    font-size: 16px;
    line-height: 1.7;
}

.invitation strong {
    color: #8f3c1c;
}

.invitation-closing {
    margin: 12px 0 0;

    color: #806653;

    font-size: 14px;
    font-style: italic;
}


/* =========================================================
BOTTOM NAVIGATION
========================================================= */

.flow-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-top: 45px;
    padding-top: 25px;

    border-top: 1px solid #eadfd4;
}

.nav-btn {
    min-width: 115px;

    border: 1px solid #d8c5b4;

    background: white;
    color: #4d3b2e;
}

.nav-btn:hover:not(:disabled) {
    background: #f7ece2;

    transform: translateY(-1px);
}

.nav-next {
    border-color: #b94b1c;

    background: #b94b1c;
    color: white;
}

.nav-next:hover:not(:disabled) {
    background: #923914;
}

.navigation-message {
    color: #9b7d66;

    font-size: 14px;
    font-style: italic;
}


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

.site-footer {
    padding: 35px 20px 45px;

    text-align: center;

    color: #826c5a;
}

.site-footer p {
    margin: 0 0 7px;
}

.site-footer span {
    font-family: Arial, sans-serif;
    font-size: 12px;

    letter-spacing: 1px;
    text-transform: uppercase;
}


/* =========================================================
MOBILE
========================================================= */

@media (max-width: 700px) {

    .page-shell {
        width: min(100% - 18px, 1100px);

        margin: 18px auto;
    }

    .main-content {
        padding: 24px 16px;

        border-radius: 16px;
    }

    .journey-step {
        min-width: 55px;

        font-size: 11px;
    }

    .journey-number {
        width: 34px;
        height: 34px;
    }

    #speech_container {
        padding: 30px 18px;
    }

    #speech_main_text {
        font-size: 17px;
        line-height: 1.75;
    }

    #speech_main_text.follow-speech {
        height: 420px;
        padding: 10px;
    }

    .speech-controls {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .control-btn {
        width: 100%;
    }

    .quiz-panel {
        padding: 18px;
    }

    .quiz-panel-heading {
        flex-direction: column;
    }

    .quiz-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .quiz-actions button {
        width: 100%;
    }

    #quiz_result {
        margin-left: 0;

        text-align: center;
    }

    .selfie-taker {
        padding: 25px 16px;
    }

    .flow-navigation {
        flex-wrap: wrap;
    }

    .navigation-message {
        display: none;
    }

    .nav-btn {
        flex: 1;
    }

}
