/* ==========================================================================
   Reset & base
   ========================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

:root {
    --bg:           #ffffff;
    --bg-alt:       #f5f5f5;
    --text:         #1a1a1a;
    --text-soft:    #444444;
    --text-muted:   #777777;
    --line:         #e6e6e6;
    --accent:       #38b6ff;
    --accent-dark:  #1f9fe6;

    --radius:       14px;
    --radius-sm:    8px;

    --container:    1140px;
    --section-pad:  clamp(64px, 10vw, 140px);

    --font: 'Red Hat Display', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-weight: 400;
    font-size: 17px;
    line-height: 1.65;
    color: var(--text-soft);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a { color: var(--text); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--accent); }

h1, h2, h3, h4 {
    color: var(--text);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 0 0 .5em;
}

p { margin: 0 0 1em; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.center { text-align: center; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .85);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
}

.logo {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.01em;
    color: var(--text);
    display: inline-flex;
    align-items: center;
}

.logo-img img {
    height: 36px;
    width: auto;
    display: block;
}

.nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav a {
    font-size: 15px;
    color: var(--text-soft);
    font-weight: 500;
}

.nav a:hover { color: var(--accent); }

.nav-toggle {
    display: none;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 8px;
}
.nav-toggle span {
    display: block;
    width: 24px; height: 2px;
    background: var(--text);
    margin: 5px 0;
    transition: transform .25s, opacity .25s;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 26px;
    border-radius: 999px;
    font-weight: 500;
    font-size: 15px;
    line-height: 1;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all .2s ease;
    white-space: nowrap;
}

.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn-lg { padding: 18px 34px; font-size: 16px; }

.btn-accent {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.btn-accent:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #fff;
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--line);
}
.btn-ghost:hover {
    border-color: var(--text);
    color: var(--text);
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section {
    padding: var(--section-pad) 0;
}

.section-alt {
    background: var(--bg-alt);
}

.section-cta {
    padding: var(--section-pad) 0;
    background: var(--bg-alt);
}

.section-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    margin: 0 0 14px;
}

.section-title {
    font-size: clamp(28px, 4vw, 44px);
    margin-bottom: 0;
}

.section-head {
    margin-bottom: 64px;
    max-width: 720px;
}
.section-head.center {
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
    padding: clamp(80px, 14vw, 180px) 0 clamp(64px, 10vw, 140px);
    background:
        radial-gradient(1200px 600px at 80% -10%, rgba(56, 182, 255, 0.08), transparent 60%),
        var(--bg);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: clamp(40px, 6vw, 96px);
    align-items: center;
}

.hero-grid--single {
    grid-template-columns: 1fr;
    max-width: 880px;
}

.hero-text {
    max-width: 620px;
}

/* Foto + decoração accent */
.hero-photo {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin-left: auto;
    aspect-ratio: 4 / 5;
}

.hero-photo img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.18);
}

.hero-photo-deco {
    position: absolute;
    z-index: 1;
    right: -24px;
    bottom: -24px;
    width: 60%;
    height: 60%;
    background: var(--accent);
    border-radius: 16px;
    opacity: 0.14;
}

@media (max-width: 860px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 56px;
    }
    .hero-photo {
        order: -1;
        max-width: 300px;
        margin: 0 auto;
        aspect-ratio: 1 / 1;
    }
    .hero-photo-deco { right: -16px; bottom: -16px; }
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin: 0 0 18px;
}

.hero-title {
    font-size: clamp(44px, 7vw, 88px);
    font-weight: 700;
    letter-spacing: -0.025em;
    margin: 0 0 24px;
    color: var(--text);
}

.hero-tagline {
    font-size: clamp(18px, 2.2vw, 24px);
    line-height: 1.5;
    color: var(--text-soft);
    margin: 0 0 40px;
    max-width: 680px;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

/* ==========================================================================
   Sobre — grid 2 col
   ========================================================================== */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: clamp(40px, 6vw, 96px);
    align-items: start;
}

.about-body p {
    font-size: 18px;
    line-height: 1.75;
    color: var(--text-soft);
}

@media (max-width: 800px) {
    .grid-2 { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Serviços
   ========================================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 36px 32px;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.08);
    border-color: var(--accent);
}

.service-icon {
    width: 48px; height: 48px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(56, 182, 255, 0.1);
    border-radius: 12px;
}
.service-icon img { width: 28px; height: 28px; }

.service-title {
    font-size: 19px;
    font-weight: 600;
    margin: 0 0 10px;
}

.service-desc {
    font-size: 15px;
    color: var(--text-soft);
    margin: 0;
    line-height: 1.6;
}

@media (max-width: 900px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .services-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Parcerias
   ========================================================================== */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 32px;
    align-items: center;
}

.partner-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    filter: grayscale(100%);
    opacity: .7;
    transition: filter .25s, opacity .25s;
}
.partner-logo:hover { filter: none; opacity: 1; }
.partner-logo img { max-height: 60px; width: auto; }

/* ==========================================================================
   Testemunhos
   ========================================================================== */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.testimonial {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 36px 32px;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.testimonial blockquote {
    margin: 0 0 24px;
    flex: 1;
}
.testimonial blockquote p {
    font-size: 17px;
    line-height: 1.6;
    color: var(--text);
    margin: 0;
    font-style: italic;
}

.testimonial figcaption {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.testimonial-photo {
    width: 44px; height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial figcaption strong {
    display: block;
    color: var(--text);
    font-weight: 600;
    font-size: 15px;
}
.testimonial figcaption span {
    display: block;
    color: var(--text-muted);
    font-size: 13px;
}

@media (max-width: 900px) {
    .testimonials-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   CTA contacto
   ========================================================================== */
.section-cta .section-title {
    margin-bottom: 16px;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.cta-text {
    font-size: 18px;
    color: var(--text-soft);
    margin: 0 auto 36px;
    max-width: 600px;
}

/* ==========================================================================
   Formulário de contacto
   ========================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: clamp(40px, 6vw, 80px);
    align-items: start;
    max-width: 1040px;
    margin: 0 auto;
}

.contact-intro .section-title {
    margin-bottom: 16px;
}

.contact-intro .cta-text {
    margin: 0 0 24px;
    max-width: none;
}

.contact-alt {
    margin: 28px 0 0;
    font-size: 15px;
    color: var(--text-muted);
}
.contact-alt a {
    color: var(--text);
    border-bottom: 1px solid var(--text);
    padding-bottom: 1px;
    margin-left: 4px;
    transition: color .2s, border-color .2s;
}
.contact-alt a:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.contact-form-wrap {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: clamp(28px, 4vw, 40px);
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.08);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.contact-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.contact-form .optional {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-muted);
    font-size: 12px;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 13px 16px;
    font-family: inherit;
    font-size: 15px;
    color: var(--text);
    background: var(--bg);
    border: 1px solid #d6d6d6;
    border-radius: 10px;
    transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none;
    appearance: none;
}

.contact-form select {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='none' stroke='%23444' stroke-width='2' d='M1 1l5 5 5-5'/></svg>");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(56, 182, 255, 0.15);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

.contact-form button[type="submit"] {
    align-self: flex-start;
    margin-top: 8px;
}

/* Honeypot — invisível para humanos, mas presente no DOM para bots */
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    height: 0 !important;
    width: 0 !important;
}

.form-alert {
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 18px;
    border: 1px solid transparent;
    line-height: 1.5;
}
.form-alert--success {
    background: #e7f6ec;
    color: #1f6f33;
    border-color: #c4e8d1;
}
.form-alert--error {
    background: #fdecec;
    color: #91272a;
    border-color: #f4c2c2;
}

@media (max-width: 820px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* ==========================================================================
   Portfólio — layout editorial alternado
   ========================================================================== */
.portfolio-list {
    display: flex;
    flex-direction: column;
    gap: clamp(80px, 12vw, 160px);
}

.portfolio-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(40px, 6vw, 96px);
    align-items: center;
}

.portfolio-item:nth-child(even) .portfolio-cover {
    order: 2;
}

.portfolio-cover {
    aspect-ratio: 4 / 3;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-alt);
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.12);
}

.portfolio-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.portfolio-cover--empty {
    background:
        linear-gradient(135deg, rgba(56, 182, 255, 0.06), rgba(56, 182, 255, 0.02));
    border: 1px dashed var(--line);
    box-shadow: none;
}

.portfolio-subtitle {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    margin: 0 0 14px;
}

.portfolio-title {
    font-size: clamp(26px, 3.5vw, 36px);
    margin: 0 0 20px;
    letter-spacing: -0.015em;
}

.portfolio-desc {
    font-size: 17px;
    line-height: 1.7;
    color: var(--text-soft);
    margin: 0 0 28px;
}

.portfolio-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-weight: 500;
    border-bottom: 1px solid var(--text);
    padding-bottom: 2px;
    transition: color .2s, border-color .2s, gap .2s;
}
.portfolio-link:hover {
    color: var(--accent);
    border-color: var(--accent);
    gap: 12px;
}

@media (max-width: 760px) {
    .portfolio-item { grid-template-columns: 1fr; gap: 32px; }
    .portfolio-item:nth-child(even) .portfolio-cover { order: 0; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    padding: 40px 0;
    border-top: 1px solid var(--line);
    background: var(--bg);
}

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

.footer-left {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-inner p {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted);
}

.social-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.social-links a {
    color: var(--text-soft);
    line-height: 0;
    padding: 12px;
    border-radius: 999px;
    transition: color .2s ease, background .2s ease, transform .2s ease;
}

.social-links a:hover {
    color: var(--accent);
    background: rgba(56, 182, 255, 0.1);
    transform: translateY(-2px);
}

.social-links svg {
    width: 28px;
    height: 28px;
    display: block;
}

@media (max-width: 540px) {
    .footer-inner { justify-content: center; text-align: center; }
    .footer-left  { justify-content: center; }
}

/* ==========================================================================
   Mobile nav
   ========================================================================== */
@media (max-width: 760px) {
    .nav-toggle { display: block; }
    .nav {
        position: absolute;
        top: 72px; left: 0; right: 0;
        background: #fff;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 16px 24px 24px;
        border-bottom: 1px solid var(--line);
        transform: translateY(-10px);
        opacity: 0;
        pointer-events: none;
        transition: transform .25s, opacity .25s;
    }
    .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
    .nav a:last-child { border: 0; margin-top: 8px; }
    .nav.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
}
