/* =========================================================
   kJ TO CALCULATOR
   Main Stylesheet
   ========================================================= */


/* =========================================================
   RESET
   ========================================================= */

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


html {
    scroll-behavior: smooth;
}


body {
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    background: #ffffff;
    color: #18231f;
    line-height: 1.6;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}


img {
    max-width: 100%;
    height: auto;
}


button,
input {
    font: inherit;
}


button {
    cursor: pointer;
}


a {
    color: inherit;
    text-decoration: none;
}


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

.container {
    width: min(1120px, calc(100% - 40px));
    margin-left: auto;
    margin-right: auto;
}


.narrow {
    width: min(820px, calc(100% - 40px));
    margin-left: auto;
    margin-right: auto;
}


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

.site-header {
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #e8eeeb;

    position: sticky;
    top: 0;
    z-index: 1000;
}


.header-inner {
    min-height: 72px;

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

    gap: 30px;
}


.logo {
    display: inline-flex;
    align-items: center;

    font-size: 22px;
    font-weight: 800;

    color: #176b4d;

    white-space: nowrap;
}


.main-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 28px;
}


.main-nav a {
    color: #43524b;

    font-size: 14px;
    font-weight: 600;

    transition:
        color 0.2s ease,
        opacity 0.2s ease;
}


.main-nav a:hover {
    color: #176b4d;
}


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

.hero {
    background:
        linear-gradient(
            180deg,
            #f2faf6 0%,
            #ffffff 100%
        );

    padding: 92px 0 85px;

    text-align: center;
}


.hero-content {
    max-width: 800px;
}


.eyebrow,
.section-kicker {
    color: #176b4d;

    font-size: 12px;
    font-weight: 800;

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


.eyebrow {
    margin-bottom: 16px;
}


.hero h1 {
    color: #12221b;

    font-size: clamp(42px, 7vw, 68px);
    line-height: 1.08;

    letter-spacing: -2.5px;

    font-weight: 800;

    margin-bottom: 22px;
}


.hero-description {
    max-width: 680px;

    margin: 0 auto 30px;

    color: #52625b;

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


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

    min-height: 50px;

    padding: 0 25px;

    border-radius: 10px;

    background: #176b4d;
    color: #ffffff;

    font-size: 15px;
    font-weight: 700;

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


.hero-button:hover {
    background: #12583f;

    transform: translateY(-2px);

    box-shadow:
        0 10px 24px rgba(23, 107, 77, 0.18);
}


/* =========================================================
   CALCULATOR SECTION
   ========================================================= */

.calculator-section {
    padding: 75px 0;
}


.calculator-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    gap: 30px;

    align-items: stretch;
}


/* =========================================================
   CALCULATOR CARD
   ========================================================= */

.calculator-card {
    background: #ffffff;

    border: 1px solid #e1e9e5;

    border-radius: 18px;

    padding: 34px;

    box-shadow:
        0 12px 40px rgba(20, 50, 38, 0.07);
}


.card-header {
    display: flex;
    align-items: center;

    gap: 17px;

    margin-bottom: 30px;
}


.icon-box {
    width: 58px;
    height: 58px;

    flex: 0 0 58px;

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

    border-radius: 14px;

    background: #e8f5ef;
    color: #176b4d;

    font-size: 17px;
    font-weight: 800;
}


.card-header h2 {
    color: #17251f;

    font-size: 22px;
    line-height: 1.3;

    margin-bottom: 5px;
}


.card-header p {
    color: #68766f;

    font-size: 14px;
}


/* =========================================================
   FORM
   ========================================================= */

.form-group {
    margin-bottom: 20px;
}


.form-group label {
    display: block;

    margin-bottom: 9px;

    color: #27362f;

    font-size: 14px;
    font-weight: 700;
}


.input-wrapper {
    position: relative;
}


.input-wrapper input {
    width: 100%;

    height: 58px;

    padding:
        0 70px 0 16px;

    border:
        1px solid #d7e1dc;

    border-radius: 10px;

    background: #ffffff;

    color: #17251f;

    font-size: 18px;
    font-weight: 600;

    outline: none;

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


.input-wrapper input:focus {
    border-color: #176b4d;

    box-shadow:
        0 0 0 4px rgba(23, 107, 77, 0.10);
}


.input-wrapper span {
    position: absolute;

    top: 50%;
    right: 17px;

    transform: translateY(-50%);

    color: #68766f;

    font-size: 14px;
    font-weight: 700;

    pointer-events: none;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.primary-button,
.secondary-button {
    width: 100%;

    min-height: 52px;

    border-radius: 10px;

    font-size: 15px;
    font-weight: 700;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}


.primary-button {
    border: 1px solid #176b4d;

    background: #176b4d;
    color: #ffffff;

    margin-bottom: 11px;
}


.primary-button:hover {
    background: #12583f;

    transform: translateY(-1px);
}


.secondary-button {
    border: 1px solid #d7e1dc;

    background: #ffffff;
    color: #34443c;
}


.secondary-button:hover {
    background: #f4f8f6;

    border-color: #b9cbc2;
}


.privacy-note {
    margin-top: 19px;

    color: #7a8781;

    font-size: 12px;
    line-height: 1.6;

    text-align: center;
}


/* =========================================================
   RESULT CARD
   ========================================================= */

.result-card {
    position: relative;

    overflow: hidden;

    background: #176b4d;
    color: #ffffff;

    border-radius: 18px;

    padding: 38px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    box-shadow:
        0 15px 45px rgba(23, 107, 77, 0.17);
}


.result-card::before {
    content: "";

    position: absolute;

    width: 230px;
    height: 230px;

    right: -100px;
    top: -110px;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.07);
}


.result-card::after {
    content: "";

    position: absolute;

    width: 180px;
    height: 180px;

    left: -100px;
    bottom: -100px;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.05);
}


.result-label {
    position: relative;
    z-index: 1;

    margin-bottom: 10px;

    color: rgba(255, 255, 255, 0.72);

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 1.7px;
}


.result-value {
    position: relative;
    z-index: 1;

    display: flex;
    flex-direction: column;

    gap: 4px;
}


#calResult {
    color: #ffffff;

    font-size: clamp(42px, 6vw, 62px);
    line-height: 1.05;

    font-weight: 800;

    letter-spacing: -1.5px;

    word-break: break-word;
}


.result-unit {
    color: rgba(255, 255, 255, 0.82);

    font-size: 14px;
    font-weight: 600;
}


.result-divider {
    position: relative;
    z-index: 1;

    width: 100%;
    height: 1px;

    margin: 27px 0 20px;

    background: rgba(255, 255, 255, 0.18);
}


#resultSummary {
    position: relative;
    z-index: 1;

    color: rgba(255, 255, 255, 0.92);

    font-size: 16px;
    font-weight: 600;
}


.quick-results {
    position: relative;
    z-index: 1;

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 12px;

    margin-top: 28px;
}


.quick-result {
    padding: 15px;

    border:
        1px solid rgba(255, 255, 255, 0.14);

    border-radius: 10px;

    background:
        rgba(255, 255, 255, 0.07);
}


.quick-result span {
    display: block;

    margin-bottom: 4px;

    color: rgba(255, 255, 255, 0.67);

    font-size: 12px;
}


.quick-result strong {
    display: block;

    color: #ffffff;

    font-size: 14px;
}


/* =========================================================
   CONTENT SECTIONS
   ========================================================= */

.content-section,
.table-section,
.faq-section {
    padding: 80px 0;
}


.content-section {
    background: #ffffff;
}


.content-section.alternate {
    background: #f7faf8;
}


.section-kicker {
    margin-bottom: 11px;
}


.content-section h2,
.table-section h2,
.faq-section h2 {
    color: #17251f;

    font-size: clamp(30px, 4vw, 42px);

    line-height: 1.2;

    letter-spacing: -1px;

    margin-bottom: 20px;
}


.content-section p,
.table-section > .container > p,
.faq-section p {
    color: #58675f;

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


.content-section p + p {
    margin-top: 18px;
}


.content-section h3 {
    margin-top: 35px;
    margin-bottom: 17px;

    color: #203129;

    font-size: 23px;
}


/* =========================================================
   FORMULA BOX
   ========================================================= */

.formula-box {
    display: flex;
    flex-direction: column;

    gap: 8px;

    margin: 30px 0;

    padding: 25px;

    border-left: 4px solid #176b4d;

    border-radius: 0 12px 12px 0;

    background: #f1f8f4;
}


.formula-box strong {
    color: #145c42;

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


.formula-box span {
    color: #617168;

    font-size: 14px;
}


/* =========================================================
   INFO CARDS
   ========================================================= */

.info-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 16px;

    margin-top: 25px;
}


.info-card {
    padding: 22px;

    border:
        1px solid #e0e8e3;

    border-radius: 12px;

    background: #ffffff;
}


.info-card h3 {
    margin: 0 0 8px;

    color: #203129;

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


.info-card p {
    font-size: 14px;

    line-height: 1.65;
}


.source-note {
    margin-top: 28px;

    padding-top: 20px;

    border-top:
        1px solid #e6ece9;
}


/* =========================================================
   TABLE
   ========================================================= */

.table-section {
    background: #f7faf8;
}


.table-wrapper {
    width: 100%;

    overflow-x: auto;

    margin-top: 30px;

    border:
        1px solid #dfe8e3;

    border-radius: 13px;

    background: #ffffff;
}


table {
    width: 100%;

    border-collapse: collapse;

    min-width: 520px;
}


thead {
    background: #176b4d;
}


th {
    padding: 15px 18px;

    color: #ffffff;

    font-size: 14px;
    font-weight: 700;

    text-align: left;
}


td {
    padding: 14px 18px;

    color: #4e5e56;

    font-size: 14px;

    border-top:
        1px solid #e8eeeb;
}


tbody tr:hover {
    background: #f5f9f7;
}


/* =========================================================
   FAQ
   ========================================================= */

.faq-section {
    background: #ffffff;
}


.faq-list {
    display: flex;
    flex-direction: column;

    gap: 12px;

    margin-top: 30px;
}


.faq-list details {
    border:
        1px solid #dfe8e3;

    border-radius: 12px;

    background: #ffffff;

    overflow: hidden;
}


.faq-list summary {
    position: relative;

    list-style: none;

    padding: 20px 52px 20px 20px;

    color: #24342c;

    font-size: 16px;
    font-weight: 700;

    cursor: pointer;
}


.faq-list summary::-webkit-details-marker {
    display: none;
}


.faq-list summary::after {
    content: "+";

    position: absolute;

    top: 50%;
    right: 20px;

    transform: translateY(-50%);

    color: #176b4d;

    font-size: 24px;
    font-weight: 400;

    line-height: 1;
}


.faq-list details[open] summary::after {
    content: "−";
}


.faq-list details[open] {
    border-color: #c9d9d1;
}


.faq-list details p {
    padding:
        0 20px 20px;

    color: #5b6a62;

    font-size: 14px;
    line-height: 1.75;
}


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

.site-footer {
    background: #12221b;

    color: #ffffff;

    padding: 25px 0;
}


.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}


.footer-inner p {
    color: rgba(255, 255, 255, 0.65);

    font-size: 13px;
}


.footer-inner a {
    color: rgba(255, 255, 255, 0.82);

    font-size: 13px;
    font-weight: 600;

    transition: color 0.2s ease;
}


.footer-inner a:hover {
    color: #ffffff;
}


/* =========================================================
   TEXT SELECTION
   ========================================================= */

::selection {
    background: #176b4d;
    color: #ffffff;
}


/* =========================================================
   SCROLLBAR
   ========================================================= */

html {
    scrollbar-width: thin;
}


/* =========================================================
   RESPONSIVE - TABLET
   ========================================================= */

@media (max-width: 850px) {

    .main-nav {
        gap: 17px;
    }


    .main-nav a {
        font-size: 13px;
    }


    .calculator-grid {
        grid-template-columns: 1fr;
    }


    .result-card {
        min-height: 360px;
    }


    .info-grid {
        grid-template-columns: 1fr;
    }

}


/* =========================================================
   RESPONSIVE - MOBILE
   ========================================================= */

@media (max-width: 650px) {

    .container {
        width: min(100% - 28px, 1120px);
    }


    .narrow {
        width: min(100% - 28px, 820px);
    }


    /* Header */

    .header-inner {
        min-height: 65px;

        flex-direction: column;

        justify-content: center;

        gap: 7px;

        padding: 10px 0;
    }


    .logo {
        font-size: 20px;
    }


    .main-nav {
        width: 100%;

        justify-content: center;

        gap: 14px;
    }


    .main-nav a {
        font-size: 12px;
    }


    /* Hero */

    .hero {
        padding: 65px 0 60px;
    }


    .hero h1 {
        font-size: 42px;

        letter-spacing: -1.7px;
    }


    .hero-description {
        font-size: 16px;

        line-height: 1.65;
    }


    /* Calculator */

    .calculator-section {
        padding: 55px 0;
    }


    .calculator-card,
    .result-card {
        padding: 25px;
    }


    .card-header {
        align-items: flex-start;

        gap: 13px;
    }


    .icon-box {
        width: 50px;
        height: 50px;

        flex-basis: 50px;
    }


    .card-header h2 {
        font-size: 19px;
    }


    #calResult {
        font-size: 45px;
    }


    .quick-results {
        grid-template-columns: 1fr;
    }


    /* Content */

    .content-section,
    .table-section,
    .faq-section {
        padding: 60px 0;
    }


    .content-section h2,
    .table-section h2,
    .faq-section h2 {
        font-size: 30px;
    }


    .formula-box {
        padding: 20px;
    }


    .formula-box strong {
        font-size: 17px;
    }


    /* Table */

    .table-wrapper {
        border-radius: 10px;
    }


    th,
    td {
        padding: 13px 14px;
    }


    /* FAQ */

    .faq-list summary {
        padding: 17px 48px 17px 17px;

        font-size: 15px;
    }


    .faq-list details p {
        padding:
            0 17px 18px;
    }


    /* Footer */

    .footer-inner {
        flex-direction: column;

        text-align: center;
    }

}


/* =========================================================
   VERY SMALL SCREENS
   ========================================================= */

@media (max-width: 390px) {

    .main-nav {
        gap: 9px;
    }


    .main-nav a {
        font-size: 11px;
    }


    .hero h1 {
        font-size: 36px;
    }


    .hero-description {
        font-size: 15px;
    }


    .calculator-card,
    .result-card {
        padding: 21px;
    }


    .card-header {
        flex-direction: column;
    }


    #calResult {
        font-size: 39px;
    }

}
