:root {
    --cream: #fff8ec;
    --white: #fffdf7;
    --green: #123f3a;
    --text: #18312e;
    --coral: #e76f51;
    --gold: #e4a11b;
    --border: #dfc89f;
    --muted: #6c746c;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--cream);
    color: var(--text);
    font-family: "Manrope", sans-serif;
}

body.planning {
    overflow: hidden;
}

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

button,
input,
select {
    font: inherit;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    padding: 0 6%;
    background: rgba(255, 248, 236, 0.95);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--green);
    font-family: "Cormorant Garamond", serif;
    font-size: 30px;
    font-weight: 700;
}

.logo-icon {
    color: var(--gold);
}

nav {
    display: flex;
    gap: 42px;
}

nav a {
    font-size: 14px;
    font-weight: 600;
}

.nav-button {
    padding: 10px 18px;
    border: 1px solid var(--green);
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
}

.hero {
    display: grid;
    grid-template-columns: 1fr 1.08fr;
    gap: 55px;
    max-width: 1380px;
    min-height: 720px;
    margin: auto;
    padding: 70px 6%;
}

.hero-content {
    padding-top: 35px;
}

.small-title {
    margin: 0 0 12px;
    color: var(--coral);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
}

h1,
h2,
h3 {
    font-family: "Cormorant Garamond", serif;
    color: var(--green);
}

h1 {
    margin: 0;
    font-size: clamp(58px, 6vw, 82px);
    line-height: 0.92;
}

.hero-text {
    max-width: 500px;
    margin: 25px 0 30px;
    font-size: 18px;
    line-height: 1.7;
}

.hero-image {
    height: 275px;
    max-width: 580px;
    background:
        linear-gradient(transparent 55%, rgba(18, 63, 58, 0.65)),
        url("kochi-hero.png") center / cover;
    border-radius: 160px 25px 100px 25px;
    position: relative;
    overflow: hidden;
}

.image-label {
    position: absolute;
    left: 28px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    color: white;
}

.image-label small {
    font-size: 10px;
    letter-spacing: 2px;
}

.image-label strong {
    font-family: "Cormorant Garamond", serif;
    font-size: 28px;
}

.planner-card {
    align-self: center;
    padding: 40px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 28px;
    box-shadow: 0 24px 65px rgba(64, 48, 22, 0.12);
}

.planner-card h2 {
    margin: 0 0 28px;
    font-size: 45px;
    line-height: 1;
}

label,
legend {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 700;
}

input,
select {
    width: 100%;
    height: 54px;
    margin-bottom: 20px;
    padding: 0 14px;
    color: var(--text);
    background: white;
    border: 1px solid var(--border);
    border-radius: 11px;
    outline: none;
}

input:focus,
select:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(18, 63, 58, 0.1);
}

.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

fieldset {
    margin: 0 0 20px;
    padding: 0;
    border: 0;
}

.budget-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.budget-option {
    min-height: 48px;
    color: var(--muted);
    background: white;
    border: 1px solid var(--border);
    cursor: pointer;
}

.budget-option:first-child {
    border-radius: 10px 0 0 10px;
}

.budget-option:last-child {
    border-radius: 0 10px 10px 0;
}

.budget-option.active {
    color: white;
    background: var(--gold);
}

.interest-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.interest-option {
    padding: 9px 13px;
    color: var(--muted);
    background: white;
    border: 1px solid var(--border);
    border-radius: 25px;
    cursor: pointer;
}

.interest-option.active {
    color: white;
    background: var(--green);
    border-color: var(--green);
}

.error-message {
    display: none;
    padding: 10px;
    color: #a83e29;
    background: #fff0eb;
    border-radius: 8px;
    font-size: 13px;
}

.error-message.show {
    display: block;
}

.generate-button {
    width: 100%;
    min-height: 58px;
    color: white;
    background: var(--coral);
    border: 0;
    border-radius: 11px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
}

.generate-button:hover {
    background: #d95d3f;
}

.generate-button:disabled {
    cursor: wait;
    opacity: 0.7;
}

.generate-button.is-loading {
    position: relative;
    padding-left: 48px;
    opacity: 1;
}

.generate-button.is-loading::before {
    position: absolute;
    top: 50%;
    left: 22px;
    width: 17px;
    height: 17px;
    content: "";
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: white;
    border-radius: 50%;
    transform: translateY(-50%);
    animation: button-spin 0.8s linear infinite;
}

.planner-loading {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 22px;
    visibility: hidden;
    opacity: 0;
    background: rgba(8, 39, 35, 0.76);
    backdrop-filter: blur(9px);
    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}

.planner-loading.show {
    visibility: visible;
    opacity: 1;
}

.loading-card {
    position: relative;
    width: min(470px, 100%);
    padding: 38px 38px 32px;
    overflow: hidden;
    text-align: center;
    background:
        radial-gradient(circle at 90% 0, rgba(228, 161, 27, 0.17), transparent 30%),
        var(--white);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 27px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.3);
    transform: translateY(18px) scale(0.97);
    transition: transform 0.3s ease;
}

.planner-loading.show .loading-card {
    transform: translateY(0) scale(1);
}

.loading-visual {
    position: relative;
    width: 92px;
    height: 92px;
    margin: 0 auto 22px;
}

.loading-orbit {
    position: absolute;
    inset: 6px;
    border: 2px dashed rgba(18, 63, 58, 0.26);
    border-radius: 50%;
    animation: orbit-spin 5s linear infinite;
}

.loading-centre {
    position: absolute;
    inset: 22px;
    display: grid;
    place-items: center;
    color: white;
    background: var(--green);
    border-radius: 50%;
    font-size: 24px;
    box-shadow: 0 8px 24px rgba(18, 63, 58, 0.25);
}

.loading-plane {
    position: absolute;
    top: 3px;
    left: 36px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    color: white;
    background: var(--coral);
    border-radius: 50%;
    font-size: 12px;
    box-shadow: 0 5px 12px rgba(231, 111, 81, 0.35);
    transform-origin: 10px 43px;
    animation: plane-orbit 2.6s linear infinite;
}

.loading-kicker {
    margin: 0 0 9px;
    color: var(--coral);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.18em;
}

.loading-card h2 {
    margin: 0;
    font-size: 37px;
    line-height: 1.05;
}

.loading-card h2 span {
    color: var(--coral);
}

.loading-status {
    min-height: 24px;
    margin: 16px 0 21px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    transition:
        opacity 0.18s ease,
        transform 0.18s ease;
}

.loading-status.changing {
    opacity: 0;
    transform: translateY(4px);
}

.loading-progress {
    height: 7px;
    overflow: hidden;
    background: #eadfcb;
    border-radius: 99px;
}

.loading-progress span {
    display: block;
    width: 42%;
    height: 100%;
    background: linear-gradient(90deg, var(--coral), var(--gold));
    border-radius: inherit;
    animation: loading-progress 1.7s ease-in-out infinite;
}

.loading-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 17px 0 14px;
}

.loading-steps span {
    position: relative;
    padding-top: 13px;
    color: #a4aaa4;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: color 0.25s ease;
}

.loading-steps span::before {
    position: absolute;
    top: 0;
    left: calc(50% - 4px);
    width: 8px;
    height: 8px;
    content: "";
    background: #d8d8d1;
    border-radius: 50%;
    transition:
        background 0.25s ease,
        transform 0.25s ease;
}

.loading-steps span.active {
    color: var(--coral);
}

.loading-steps span.active::before {
    background: var(--coral);
    box-shadow: 0 0 0 5px rgba(231, 111, 81, 0.13);
    transform: scale(1.15);
}

.loading-steps span.complete {
    color: var(--green);
}

.loading-steps span.complete::before {
    background: var(--green);
}

.loading-card small {
    color: #7b837d;
    font-size: 11px;
}

@keyframes button-spin {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

@keyframes orbit-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes plane-orbit {
    to {
        transform: rotate(360deg);
    }
}

@keyframes loading-progress {
    0% {
        transform: translateX(-115%);
    }

    55% {
        transform: translateX(95%);
    }

    100% {
        transform: translateX(250%);
    }
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
    max-width: 1250px;
    margin: auto;
    padding: 35px 6%;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.features article {
    display: flex;
    align-items: center;
    gap: 15px;
}

.features article > span {
    display: grid;
    place-items: center;
    min-width: 52px;
    height: 52px;
    color: var(--green);
    background: #dce5da;
    border-radius: 50%;
    font-size: 22px;
}

.features h3 {
    margin: 0;
    font-size: 23px;
}

.features p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.result-section {
    max-width: 1220px;
    min-height: 400px;
    margin: auto;
    padding: 80px 6%;
}

.empty-result {
    text-align: center;
    color: var(--muted);
}

.empty-result > span {
    color: var(--gold);
    font-size: 32px;
}

.empty-result h2 {
    margin: 5px 0;
    font-size: 40px;
}

.result-card {
    overflow: hidden;
    background: white;
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: 0 28px 70px rgba(24, 58, 50, 0.13);
}

.result-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    padding: 30px;
    color: white;
    background: var(--green);
}

.result-header h2 {
    margin: 0;
    color: white;
    font-size: 40px;
}

.result-header button {
    padding: 10px 15px;
    color: white;
    background: transparent;
    border: 1px solid white;
    border-radius: 25px;
    cursor: pointer;
}

.pdf-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pdf-area span {
    color: #cfe6df;
    font-size: 12px;
    font-weight: 700;
}

.screen-itinerary {
    color: #253c37;
    background: #f7f1e6;
}

.screen-itinerary-cover {
    position: relative;
    display: flex;
    align-items: end;
    min-height: 330px;
    padding: 44px;
    overflow: hidden;
    isolation: isolate;
    color: white;
    background:
        linear-gradient(90deg, rgba(8, 48, 44, 0.94) 0%, rgba(8, 48, 44, 0.72) 48%, rgba(8, 48, 44, 0.12) 100%),
        url("pdf-travel-cover.jpg") center 44% / cover no-repeat;
}

.screen-itinerary-cover::after {
    position: absolute;
    inset: auto 0 0;
    z-index: -1;
    height: 8px;
    content: "";
    background: linear-gradient(90deg, var(--coral), var(--gold), #7bb5a8);
}

.screen-cover-copy {
    max-width: 650px;
}

.screen-cover-kicker {
    display: inline-block;
    margin-bottom: 12px;
    padding: 7px 12px;
    color: #123e38;
    background: var(--gold);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.screen-itinerary-cover h3 {
    margin: 0;
    color: white;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(52px, 8vw, 88px);
    line-height: 0.88;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.screen-itinerary-cover p {
    margin: 18px 0 0;
    color: #edf6f2;
    font-size: 17px;
    font-weight: 600;
}

.screen-trip-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 22px 34px;
    background: #0f4a43;
}

.screen-summary-card {
    min-width: 0;
    padding: 15px 17px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 13px;
}

.screen-summary-card span {
    display: block;
    margin-bottom: 5px;
    color: #afcec6;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.screen-summary-card strong {
    display: block;
    overflow-wrap: anywhere;
    color: white;
    font-size: 15px;
    line-height: 1.35;
}

.screen-itinerary-body {
    display: grid;
    gap: 28px;
    padding: 42px;
}

.screen-section,
.screen-day {
    overflow: hidden;
    background: white;
    border: 1px solid #dfd9cb;
    border-radius: 19px;
    box-shadow: 0 10px 28px rgba(40, 58, 52, 0.07);
}

.screen-section {
    --theme: #eb6f4e;
    --theme-soft: #fff0e9;
}

.screen-section.theme-stay {
    --theme: #70508c;
    --theme-soft: #f3ecf8;
}

.screen-section.theme-food {
    --theme: #d8792e;
    --theme-soft: #fff1df;
}

.screen-section.theme-transport {
    --theme: #397ba1;
    --theme-soft: #eaf4f9;
}

.screen-section.theme-packing {
    --theme: #357a68;
    --theme-soft: #e9f5f0;
}

.screen-section.theme-budget {
    --theme: #b37b08;
    --theme-soft: #fff5d9;
}

.screen-section.theme-tips {
    --theme: #c54f42;
    --theme-soft: #ffebe7;
}

.screen-section-heading {
    position: relative;
    margin: 0;
    padding: 21px 26px 19px 43px;
    color: #193f38;
    background: var(--theme-soft);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 30px;
    line-height: 1;
}

.screen-section-heading::before {
    position: absolute;
    top: 17px;
    bottom: 17px;
    left: 24px;
    width: 6px;
    content: "";
    background: var(--theme);
    border-radius: 10px;
}

.screen-section-content,
.screen-time-content {
    display: grid;
    gap: 12px;
}

.screen-section-content {
    padding: 22px 25px 25px;
}

.screen-day-heading {
    display: flex;
    align-items: center;
    gap: 17px;
    padding: 23px 28px;
    color: white;
    background:
        radial-gradient(circle at 90% 0, rgba(237, 170, 24, 0.24), transparent 31%),
        #124a43;
}

.screen-day-number {
    flex: 0 0 auto;
    padding: 9px 12px;
    color: #153e38;
    background: var(--gold);
    border-radius: 9px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.screen-day-heading h3 {
    margin: 0;
    color: white;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 31px;
    line-height: 1.05;
}

.screen-day-body {
    display: grid;
    gap: 0;
    padding: 8px 27px 25px;
}

.screen-time-block {
    position: relative;
    padding: 24px 0 4px 28px;
    border-left: 2px solid #eadfc9;
}

.screen-time-block::before {
    position: absolute;
    top: 30px;
    left: -6px;
    width: 10px;
    height: 10px;
    content: "";
    background: var(--coral);
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 0 0 1px var(--coral);
}

.screen-time-heading {
    display: inline-flex;
    margin: 0 0 13px;
    padding: 6px 12px;
    color: #a6402a;
    background: #ffebe4;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.screen-activity-card,
.screen-tip-card {
    display: flex;
    gap: 13px;
    padding: 15px 17px;
    background: #fffdf8;
    border: 1px solid #ebe4d8;
    border-left: 4px solid var(--theme, #e9b128);
    border-radius: 11px;
}

.screen-card-copy {
    min-width: 0;
}

.screen-activity-title {
    display: block;
    margin-bottom: 5px;
    color: #153f38;
    font-size: 17px;
    line-height: 1.35;
}

.screen-card-copy p {
    margin: 0;
    color: #52645f;
    font-family: "Inter", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.65;
}

.screen-tip-number {
    display: grid;
    place-items: center;
    flex: 0 0 28px;
    height: 28px;
    color: white;
    background: var(--theme, var(--coral));
    border-radius: 50%;
    font-size: 12px;
    font-weight: 900;
}

.hidden {
    display: none;
}

footer {
    display: flex;
    justify-content: space-between;
    padding: 30px 6%;
    background: #f1dfc2;
}

footer strong {
    color: var(--green);
    font-family: "Cormorant Garamond", serif;
    font-size: 25px;
}

footer p {
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 900px) {
    nav {
        display: none;
    }

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

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

    .screen-trip-summary {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .navbar {
        padding: 0 20px;
    }

    .nav-button {
        display: none;
    }

    .hero {
        padding: 45px 20px;
    }

    .hero-content {
        padding-top: 0;
    }

    .hero-image {
        height: 220px;
    }

    .planner-card {
        padding: 25px 18px;
    }

    .two-columns {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .result-header,
    footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
    }

    .result-section {
        padding: 50px 14px;
    }

    .result-header {
        padding: 23px 20px;
    }

    .result-header h2 {
        font-size: 32px;
    }

    .pdf-area {
        align-items: flex-start;
        flex-direction: column;
    }

    .screen-itinerary-cover {
        min-height: 275px;
        padding: 30px 22px;
        background-position: 58% center;
    }

    .screen-itinerary-cover h3 {
        font-size: 52px;
    }

    .screen-trip-summary {
        grid-template-columns: 1fr;
        padding: 17px;
    }

    .screen-itinerary-body {
        gap: 20px;
        padding: 20px 14px;
    }

    .screen-section-heading {
        padding: 19px 20px 17px 38px;
        font-size: 26px;
    }

    .screen-section-heading::before {
        left: 20px;
    }

    .screen-section-content {
        padding: 17px;
    }

    .screen-day-heading {
        align-items: flex-start;
        flex-direction: column;
        padding: 21px;
    }

    .screen-day-body {
        padding: 5px 16px 20px;
    }

    .screen-time-block {
        padding-left: 20px;
    }

    .loading-card {
        padding: 31px 22px 27px;
    }

    .loading-card h2 {
        font-size: 32px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .loading-orbit,
    .loading-plane,
    .loading-progress span,
    .generate-button.is-loading::before {
        animation-duration: 3s;
    }
}

@media print {
    .navbar,
    .hero,
    .features,
    .empty-result,
    footer,
    .pdf-area {
        display: none;
    }

    .result-section {
        max-width: none;
        padding: 0;
    }

    .result-card {
        border: 0;
    }
}
