@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=Manrope:wght@500;600;700&display=swap');

:root {
    --ink: #111111;
    --paper: #f4f4f0;
    --white: #ffffff;
    --muted: #727272;
    --line: rgba(17, 17, 17, 0.14);
    --soft: rgba(17, 17, 17, 0.055);
    --shadow: 0 18px 60px rgba(0, 0, 0, 0.07);
    --radius: 28px;
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: light;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 90% 0%, rgba(255,255,255,.9), transparent 28%),
        var(--paper);
    color: var(--ink);
    font-family: "DM Sans", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

.site-shell {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    min-height: 104px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}

.brand {
    display: inline-flex;
    width: 190px;
    text-decoration: none;
}

.brand img {
    width: 100%;
    height: auto;
    display: block;
}

.topnav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 14px;
}

.nav-link {
    text-decoration: none;
    position: relative;
    padding: 6px 0;
    font-weight: 600;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: 0;
    height: 1px;
    background: currentColor;
    transition: right 180ms ease;
}

.nav-link:hover::after {
    right: 0;
}

.signed-in {
    color: var(--muted);
    font-size: 13px;
}

main {
    flex: 1;
}

.hero {
    min-height: 490px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 80px;
    align-items: center;
    padding: 62px 0 54px;
}

.eyebrow,
.section-kicker {
    margin: 0 0 16px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .2em;
}

.hero h1 {
    margin: 0;
    max-width: 820px;
    font-family: "Manrope", Arial, sans-serif;
    font-size: clamp(48px, 6.4vw, 92px);
    line-height: .98;
    letter-spacing: -.055em;
    font-weight: 600;
}

.hero-text {
    max-width: 590px;
    margin: 30px 0 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.7;
}

.hero-mark {
    justify-self: end;
    width: 285px;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 1px solid var(--ink);
    display: grid;
    place-items: center;
    position: relative;
}

.hero-mark::before,
.hero-mark::after {
    content: "";
    position: absolute;
    background: var(--ink);
}

.hero-mark::before {
    width: 1px;
    height: calc(100% + 64px);
}

.hero-mark::after {
    width: calc(100% + 64px);
    height: 1px;
}

.hero-mark span {
    width: 72px;
    height: 72px;
    background: var(--ink);
    color: var(--white);
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-family: "Manrope", sans-serif;
    font-size: 32px;
    font-weight: 600;
    position: relative;
    z-index: 2;
}

.private-panel {
    background: var(--ink);
    color: var(--white);
    border-radius: var(--radius);
    padding: 28px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 54px;
}

.private-panel h2,
.section-heading h2 {
    margin: 0;
    font-family: "Manrope", sans-serif;
    font-size: 34px;
    letter-spacing: -.035em;
}

.private-panel p:not(.section-kicker) {
    margin: 8px 0 0;
    color: rgba(255,255,255,.62);
}

.button {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    padding: 0 22px;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 160ms ease, opacity 160ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-dark {
    background: var(--ink);
    color: var(--white);
}

.private-panel .button-dark {
    background: var(--white);
    color: var(--ink);
}

.button-full {
    width: 100%;
}

.weather-section {
    padding: 8px 0 68px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 24px;
    margin-bottom: 24px;
}

.section-heading .section-kicker {
    margin-bottom: 8px;
}

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

.weather-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.weather-card {
    min-height: 292px;
    background: rgba(255,255,255,.74);
    border: 1px solid rgba(17,17,17,.085);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    display: flex;
    flex-direction: column;
    transition: transform 200ms ease, box-shadow 200ms ease;
}

.weather-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 68px rgba(0, 0, 0, 0.09);
}

.weather-card-top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.weather-place {
    margin: 0;
    font-weight: 700;
    font-size: 17px;
}

.weather-region {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.weather-icon {
    min-width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 22px;
}

.weather-temp {
    margin-top: 34px;
    font-family: "Manrope", sans-serif;
    font-size: 72px;
    line-height: .95;
    letter-spacing: -.07em;
    font-weight: 600;
}

.weather-condition {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.weather-meta {
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 12px;
}

.weather-meta strong {
    color: var(--ink);
    font-weight: 600;
}

.skeleton .weather-temp,
.skeleton .weather-condition,
.skeleton .weather-meta {
    opacity: .46;
}

.footer {
    padding: 0 0 28px;
}

.footer-line {
    height: 1px;
    background: var(--line);
    margin-bottom: 22px;
}

.footer p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: .04em;
}

.footer p span {
    margin-left: 6px;
}

/* Login */
.auth-page {
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-shell {
    width: min(460px, 100%);
}

.auth-brand {
    margin: 0 auto 34px;
    display: flex;
}

.login-card {
    background: rgba(255,255,255,.82);
    border: 1px solid rgba(17,17,17,.08);
    box-shadow: var(--shadow);
    border-radius: 32px;
    padding: 38px;
    backdrop-filter: blur(18px);
}

.login-card h1 {
    margin: 0;
    font-family: "Manrope", sans-serif;
    font-size: 42px;
    letter-spacing: -.05em;
}

.login-intro {
    margin: 10px 0 30px;
    color: var(--muted);
    line-height: 1.6;
}

.login-form {
    display: grid;
    gap: 18px;
}

.login-form label {
    display: grid;
    gap: 8px;
}

.login-form label span {
    font-size: 12px;
    font-weight: 700;
}

.login-form input {
    width: 100%;
    height: 52px;
    border: 1px solid rgba(17,17,17,.16);
    border-radius: 14px;
    background: var(--white);
    padding: 0 14px;
    font: inherit;
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.login-form input:focus {
    border-color: var(--ink);
    box-shadow: 0 0 0 3px rgba(17,17,17,.07);
}

.form-error {
    margin-bottom: 20px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f4e9e7;
    color: #7b2820;
    font-size: 13px;
}

.back-link {
    display: inline-block;
    margin-top: 22px;
    color: var(--muted);
    font-size: 12px;
    text-decoration: none;
}

/* Contratos */
.subpage .topbar {
    margin-bottom: 54px;
}

.placeholder-main {
    display: grid;
    place-items: center;
    padding: 30px 0 90px;
}

.placeholder-card {
    width: min(760px, 100%);
    padding: 54px;
    background: var(--white);
    border: 1px solid rgba(17,17,17,.08);
    border-radius: 32px;
    box-shadow: var(--shadow);
}

.placeholder-card h1 {
    margin: 0;
    font-family: "Manrope", sans-serif;
    font-size: clamp(48px, 7vw, 84px);
    letter-spacing: -.06em;
}

.placeholder-card > p:not(.section-kicker) {
    color: var(--muted);
    line-height: 1.7;
}

.placeholder-rule {
    height: 1px;
    background: var(--line);
    margin: 34px 0;
}

.muted {
    color: var(--muted);
}

@media (max-width: 880px) {
    .site-shell {
        width: min(100% - 28px, 1280px);
    }

    .topbar {
        min-height: 84px;
    }

    .brand {
        width: 158px;
    }

    .signed-in {
        display: none;
    }

    .hero {
        min-height: unset;
        grid-template-columns: 1fr;
        gap: 58px;
        padding: 56px 0 72px;
    }

    .hero h1 {
        font-size: clamp(48px, 13vw, 74px);
    }

    .hero-mark {
        justify-self: center;
        width: min(72vw, 280px);
    }

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

    .weather-card {
        min-height: 252px;
    }

    .private-panel,
    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .weather-updated {
        margin-top: -10px;
    }
}

@media (max-width: 520px) {
    .hero {
        padding-top: 44px;
    }

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

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

    .private-panel {
        padding: 24px;
    }

    .private-panel .button {
        width: 100%;
    }

    .login-card {
        padding: 28px 22px;
    }

    .placeholder-card {
        padding: 34px 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}


/* Landing page without hero */
main > .private-panel:first-child,
main > .weather-section:first-child {
    margin-top: 64px;
}

@media (max-width: 880px) {
    main > .private-panel:first-child,
    main > .weather-section:first-child {
        margin-top: 42px;
    }
}

/* Weather detail dialog */
.weather-card[role="button"] {
    cursor: pointer;
}

.weather-card[role="button"]:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 4px;
}

.weather-dialog {
    width: min(1180px, calc(100% - 32px));
    max-height: min(92vh, 880px);
    padding: 0;
    border: 0;
    border-radius: 30px;
    background: var(--paper);
    color: var(--ink);
    box-shadow: 0 30px 100px rgba(0,0,0,.22);
}

.weather-dialog::backdrop {
    background: rgba(12,12,12,.56);
    backdrop-filter: blur(6px);
}

.weather-dialog-shell {
    padding: 30px;
}

.weather-dialog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
}

.weather-dialog-header .section-kicker {
    margin-bottom: 7px;
}

.weather-dialog-header h2 {
    margin: 0;
    font-family: "Manrope", Arial, sans-serif;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1;
    letter-spacing: -.055em;
}

.weather-dialog-region {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.weather-dialog-close {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.weather-dialog-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
    padding: 28px 0;
}

.weather-summary-main {
    display: flex;
    align-items: center;
    gap: 18px;
}

.weather-summary-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    font-size: 29px;
}

.weather-summary-main > strong {
    font-family: "Manrope", Arial, sans-serif;
    font-size: 64px;
    line-height: .9;
    letter-spacing: -.07em;
}

.weather-summary-main div {
    display: grid;
    gap: 4px;
}

.weather-summary-main div span {
    font-weight: 700;
}

.weather-summary-main small,
.weather-summary-meta span {
    color: var(--muted);
}

.weather-summary-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(100px, 1fr));
    gap: 10px;
}

.weather-summary-meta > div {
    min-width: 112px;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: rgba(255,255,255,.55);
    display: grid;
    gap: 5px;
}

.weather-summary-meta span {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.weather-summary-meta strong {
    font-size: 13px;
}

.weather-forecast-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
}

.forecast-day {
    min-width: 0;
    padding: 17px 14px;
    border: 1px solid rgba(17,17,17,.09);
    border-radius: 20px;
    background: rgba(255,255,255,.73);
}

.forecast-day-date {
    display: flex;
    justify-content: space-between;
    gap: 7px;
    align-items: baseline;
}

.forecast-day-date strong {
    text-transform: capitalize;
    font-size: 13px;
}

.forecast-day-date span {
    color: var(--muted);
    font-size: 10px;
}

.forecast-day-icon {
    height: 54px;
    display: grid;
    place-items: center;
    margin-top: 12px;
    font-size: 31px;
}

.forecast-day-condition {
    min-height: 36px;
    margin: 7px 0 12px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
    text-align: center;
}

.forecast-day-temp {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    margin-bottom: 14px;
}

.forecast-day-temp strong {
    font-family: "Manrope", Arial, sans-serif;
    font-size: 27px;
    letter-spacing: -.05em;
}

.forecast-day-temp span {
    color: var(--muted);
    font-size: 16px;
}

.forecast-day-details {
    margin: 0;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    display: grid;
    gap: 7px;
}

.forecast-day-details div {
    display: flex;
    justify-content: space-between;
    gap: 6px;
}

.forecast-day-details dt,
.forecast-day-details dd {
    margin: 0;
    font-size: 9.5px;
}

.forecast-day-details dt {
    color: var(--muted);
}

.forecast-day-details dd {
    text-align: right;
    font-weight: 700;
}

.weather-dialog-nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    padding-top: 24px;
}

.weather-dialog-nav > span {
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}

.weather-nav-button {
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.weather-nav-button:last-child {
    justify-self: end;
}

.weather-nav-button:disabled {
    opacity: .35;
    cursor: default;
}

@media (max-width: 980px) {
    .weather-dialog {
        overflow-y: auto;
    }
    .weather-dialog-summary {
        align-items: flex-start;
        flex-direction: column;
    }
    .weather-forecast-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .weather-dialog {
        width: calc(100% - 18px);
        max-height: 94vh;
        border-radius: 22px;
    }
    .weather-dialog-shell {
        padding: 20px;
    }
    .weather-summary-main > strong {
        font-size: 52px;
    }
    .weather-summary-meta {
        width: 100%;
        grid-template-columns: repeat(3, 1fr);
    }
    .weather-summary-meta > div {
        min-width: 0;
        padding: 10px;
    }
    .weather-forecast-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .weather-dialog-nav {
        grid-template-columns: 1fr 1fr;
    }
    .weather-dialog-nav > span {
        grid-column: 1 / -1;
        grid-row: 1;
    }
    .weather-nav-button:last-child {
        justify-self: stretch;
    }
    .weather-nav-button {
        width: 100%;
    }
}

@media (max-width: 1120px) and (min-width: 881px) {
    .weather-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* ---------------------------------------------------------
   Terras entrance logo
   --------------------------------------------------------- */
body.has-intro:not(.intro-complete) {
    overflow: hidden;
}

.intro-site-shell {
    opacity: 0;
    transition: opacity 430ms ease;
}

body.intro-running .intro-site-shell,
body.intro-complete .intro-site-shell {
    opacity: 1;
}

body.has-intro:not(.intro-complete) .intro-site-shell .topbar .brand {
    opacity: 0;
}

body.intro-complete .intro-site-shell .topbar .brand {
    opacity: 1;
    transition: opacity 120ms ease;
}

.intro-splash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    background: var(--paper);
    transition: background 260ms ease, opacity 220ms ease;
}

.intro-splash.is-leaving {
    pointer-events: none;
    background: transparent;
}

.intro-logo-button {
    --intro-x: 0px;
    --intro-y: 0px;
    --intro-scale: 1;
    appearance: none;
    border: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    width: min(76vw, 880px);
    cursor: pointer;
    transform-origin: center center;
    position: relative;
    z-index: 2;
    transition:
        transform 720ms cubic-bezier(.2, .82, .2, 1),
        filter 220ms ease;
}

.intro-logo-button img {
    display: block;
    width: 100%;
    height: auto;
}

.intro-logo-button:hover {
    filter: opacity(.78);
}

.intro-splash.is-leaving .intro-logo-button {
    transform:
        translate(var(--intro-x), var(--intro-y))
        scale(var(--intro-scale));
}

.intro-hint {
    position: absolute;
    bottom: max(34px, 5vh);
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: .13em;
    text-transform: uppercase;
    opacity: .68;
    transition: opacity 180ms ease;
}

.intro-splash.is-leaving .intro-hint {
    opacity: 0;
}

body.intro-complete .intro-splash {
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 880px) {
    .intro-logo-button {
        width: min(88vw, 680px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .intro-site-shell,
    .intro-splash,
    .intro-logo-button,
    .intro-hint,
    .topbar .brand {
        transition: none !important;
    }
}

/* ---------------------------------------------------------
   Public context + contact
   --------------------------------------------------------- */
.site-context {
    margin: 4px 0 64px;
    padding: 26px 0 4px;
    border-top: 1px solid var(--line);
}

.site-context p {
    max-width: 900px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.8;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 11px;
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
    transition: color 160ms ease;
}

.footer-links a:hover {
    color: var(--ink);
}

.contact-main {
    width: min(760px, 100%);
    margin: 0 auto;
    padding: 66px 0 82px;
}

.contact-heading {
    margin-bottom: 32px;
}

.contact-heading h1 {
    margin: 0;
    font-family: "Manrope", sans-serif;
    font-size: clamp(48px, 8vw, 76px);
    line-height: 1;
    letter-spacing: -.055em;
}

.contact-heading p:not(.section-kicker) {
    max-width: 600px;
    margin: 18px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.contact-card {
    padding: 34px;
    background: rgba(255,255,255,.78);
    border: 1px solid rgba(17,17,17,.085);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.contact-form {
    display: grid;
    gap: 20px;
}

.contact-form label {
    display: grid;
    gap: 8px;
}

.contact-form label > span {
    font-size: 12px;
    font-weight: 700;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    border: 1px solid rgba(17,17,17,.16);
    border-radius: 14px;
    background: var(--white);
    padding: 14px;
    color: var(--ink);
    font: inherit;
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.contact-form input {
    height: 52px;
}

.contact-form textarea {
    min-height: 190px;
    resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--ink);
    box-shadow: 0 0 0 3px rgba(17,17,17,.07);
}

.contact-notice {
    padding: 13px 15px;
    border-radius: 13px;
    font-size: 13px;
    line-height: 1.5;
}

.contact-notice.success {
    background: #e7f0e8;
    color: #24562c;
}

.contact-notice.error {
    background: #f4e9e7;
    color: #7b2820;
}

.contact-captcha {
    min-height: 65px;
}

.contact-config-note {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.hp-field {
    position: absolute !important;
    left: -99999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

@media (max-width: 650px) {
    .footer-content {
        align-items: flex-start;
        flex-direction: column;
    }

    .contact-main {
        padding-top: 44px;
    }

    .contact-card {
        padding: 24px;
    }
}
