:root {
  --ink: #0f3f58;
  --deep: #0b3145;
  --teal: #048fad;
  --teal-text: #00768b;
  --mist: #bdeef3;
  --paper: #f7fafb;
  --muted: #536c79;
  --line: #cfdee3;
  --white: #fff;
  --heading: Manrope, "DM Sans", sans-serif;
  --body: "DM Sans", Arial, sans-serif;
  --ease: cubic-bezier(.22, .8, .25, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 6rem; }
body {
  margin: 0;
  color: var(--deep);
  background: var(--paper);
  font: 1rem/1.6 var(--body);
}
::selection { color: var(--deep); background: var(--mist); }
:focus-visible { outline: 2px solid var(--teal-text); outline-offset: 4px; }
a { color: inherit; }
button { font: inherit; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
h1, h2, h3 { font-family: var(--heading); font-weight: 800; }
img { display: block; max-width: 100%; }

.wrap { width: min(81rem, calc(100% - 5rem)); margin-inline: auto; }
.skip-link {
  position: fixed;
  top: .7rem;
  left: .7rem;
  z-index: 20;
  padding: .6rem 1rem;
  background: var(--white);
  transform: translateY(-180%);
}
.skip-link:focus { transform: none; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--paper) 93%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.header-inner {
  min-height: 4.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand { display: inline-flex; flex: none; }
.brand img { width: 7.3rem; height: auto; }
.main-nav, .footer-links { display: flex; flex-wrap: wrap; gap: clamp(1.1rem, 3vw, 2.5rem); }
.main-nav a, .footer-links a {
  font-size: .9rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}
.main-nav a:hover, .footer-links a:hover { color: var(--teal-text); }
.header-actions { display: flex; align-items: center; flex: none; gap: .6rem; }
.language-select {
  appearance: none;
  min-height: 2.65rem;
  max-width: 8rem;
  padding: .35rem 1.65rem .35rem .7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%230f3f58' stroke-width='1.5'/%3E%3C/svg%3E") right .65rem center / .66rem no-repeat;
  font: 700 .88rem/1.2 var(--body);
  cursor: pointer;
}
.language-select:hover { background-color: var(--mist); }

.button {
  display: inline-flex;
  min-height: 3.25rem;
  align-items: center;
  justify-content: center;
  padding: .6rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  transition: background .2s, color .2s, box-shadow .25s, transform .25s var(--ease);
}
.button-primary {
  background: var(--ink);
  color: var(--white);
  box-shadow: 0 .4rem 1rem rgba(15, 63, 88, .14);
}
.button-primary:hover { background: var(--deep); transform: translateY(-2px); }
.button-outline {
  min-height: 2.65rem;
  padding-inline: 1.1rem;
  border-color: var(--line);
  font-size: .9rem;
}
.button-outline:hover { background: var(--mist); }
.text-link {
  width: fit-content;
  font-weight: 700;
  text-underline-offset: .24em;
  text-decoration-color: var(--teal);
}
.text-link:hover { color: var(--teal-text); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  align-items: center;
  gap: clamp(1.75rem, 4vw, 4rem);
  padding-block: clamp(3rem, 6vw, 5.7rem);
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: 1.2rem;
  color: var(--teal-text);
  font-weight: 800;
  font-size: .86rem;
  letter-spacing: .085em;
  line-height: 1.4;
  text-transform: uppercase;
}
.spark { color: var(--teal-text); font-size: 1.2em; }
.hero h1 {
  font-size: clamp(3.35rem, 6.05vw, 6rem);
  line-height: .99;
  letter-spacing: -.085em;
}
.hero h1 em {
  display: block;
  width: fit-content;
  color: var(--teal-text);
  font-style: normal;
}
.hero-intro {
  max-width: 27rem;
  margin-top: 1.7rem;
  color: var(--muted);
  font-size: clamp(1.03rem, 1.35vw, 1.2rem);
}
.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 1.3rem;
  row-gap: .85rem;
  margin-top: 1.65rem;
}
.hero-actions .text-link { font-size: .94rem; }
.hero-actions .text-link span { margin-left: .15rem; color: var(--teal-text); }
.hero-note { margin-top: 1.25rem; color: var(--muted); font-size: .87rem; }

.demo-stage {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: end;
  justify-items: end;
  min-height: clamp(28rem, 43vw, 36rem);
  overflow: hidden;
  padding: 1.4rem;
  border: 1px solid #a9cbd0;
  border-radius: 1.8rem;
  background: #d3ebed;
  box-shadow: 0 1.6rem 3.5rem rgba(15, 63, 88, .13);
}
.demo-photo {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .45s var(--ease), transform .65s var(--ease);
}
.demo-photo-people { object-position: 36% 46%; }
.demo-photo-piece {
  object-position: center 43%;
  opacity: 0;
  transform: scale(1.065);
  visibility: hidden;
}
.showing-result .demo-photo-piece {
  opacity: 1;
  transform: scale(1);
  visibility: visible;
}
.demo-wash {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(147deg, rgba(247, 250, 251, .23), transparent 40%, rgba(15, 63, 88, .22));
  pointer-events: none;
}
.demo-wash::after {
  content: "";
  position: absolute;
  inset: -35%;
  background: linear-gradient(110deg, transparent 38%, rgba(255, 244, 220, .38) 50%, transparent 62%);
  transform: translateX(-80%);
}
.showing-result .demo-wash::after { animation: sunlight .85s var(--ease) both; }
@keyframes sunlight { to { transform: translateX(80%); } }
.demo-caption {
  position: absolute;
  inset: 1.4rem 1.4rem auto auto;
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .35rem .7rem;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: .84rem;
  font-weight: 800;
}
.demo-caption span { color: var(--teal-text); }
.photo-frame { position: absolute; inset: .95rem; pointer-events: none; }
.photo-frame i {
  position: absolute;
  width: 1.05rem;
  height: 1.05rem;
  border: 0 solid rgba(255, 255, 255, .86);
}
.photo-frame i:nth-child(1) { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.photo-frame i:nth-child(2) { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.photo-frame i:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.photo-frame i:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }
.demo-card {
  position: relative;
  width: min(100%, 17.65rem);
  padding: .85rem;
  border: 1px solid rgba(255, 255, 255, .92);
  border-radius: 1.25rem;
  background: rgba(247, 250, 251, .96);
  box-shadow: 0 .7rem 2.1rem rgba(11, 49, 69, .2);
  backdrop-filter: blur(10px);
}
.demo-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .18rem;
  padding: .2rem;
  margin-bottom: .85rem;
  border-radius: .65rem;
  background: #e4eff2;
}
.demo-controls button {
  min-height: 2.55rem;
  padding: .17rem .3rem;
  color: var(--ink);
  border: 0;
  border-radius: .48rem;
  background: transparent;
  font-size: .87rem;
  font-weight: 700;
  cursor: pointer;
}
.demo-controls button[aria-pressed="true"] {
  background: var(--white);
  box-shadow: 0 1px 5px rgba(11, 49, 69, .12);
}
.demo-view { padding: .05rem .3rem .15rem; }
.demo-view:not([hidden]) { animation: view-in .48s var(--ease) both; }
@keyframes view-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}
.demo-label { color: var(--teal-text); font-size: .83rem; font-weight: 800; }
.demo-view h2 { font-size: 1.25rem; letter-spacing: -.05em; line-height: 1.15; margin: .32rem 0 .55rem; }
.demo-description, .demo-tags, .piece-details, .demo-price, .copy-status { font-size: .875rem; line-height: 1.43; }
.demo-description, .demo-price span, .piece-details dt { color: var(--muted); }
.demo-tags { margin-top: .5rem; color: var(--teal-text); overflow-wrap: anywhere; }
.demo-price, .piece-details div { display: flex; justify-content: space-between; gap: .55rem; }
.demo-price { align-items: center; margin-top: .58rem; padding-top: .5rem; border-top: 1px solid var(--line); }
.demo-price strong { font-family: var(--heading); font-size: 1.12rem; }
.piece-details { margin-block: .7rem; }
.piece-details div { padding: .44rem 0; border-top: 1px solid var(--line); }
.piece-details dd { font-weight: 700; }
.demo-action {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .42rem;
  width: 100%;
  min-height: 2.75rem;
  margin-top: .6rem;
  border: 0;
  border-radius: .65rem;
  background: var(--ink);
  color: var(--white);
  font-size: .87rem;
  font-weight: 800;
  cursor: pointer;
}
.demo-action:hover { background: var(--deep); }
.demo-action span { color: var(--mist); }
.copy-status { margin-top: .55rem; color: var(--ink); }
.copy-status:empty { margin-top: 0; }

.ticker { overflow: hidden; background: var(--ink); color: var(--white); }
.ticker-track { display: flex; width: max-content; animation: marquee 26s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-group {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-around;
  min-width: max(45rem, 100vw);
  gap: 1.2rem;
  padding: .9rem 1.3rem;
  white-space: nowrap;
  font-size: .86rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.ticker-group b { color: var(--mist); }
@keyframes marquee { to { transform: translateX(-50%); } }

.how { padding-block: clamp(4.5rem, 8vw, 7.5rem); }
.split-heading h2, .feature h2, .privacy-band h2, .final-cta h2 {
  font-size: clamp(2.35rem, 4.4vw, 4.5rem);
  line-height: 1.03;
  letter-spacing: -.075em;
  text-wrap: balance;
}
.split-heading { margin-bottom: 2rem; }
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-block: 1px solid var(--line);
}
.step {
  padding: 1.3rem clamp(1rem, 2vw, 1.8rem) 1.55rem;
  transition: background .3s;
}
.step + .step { border-left: 1px solid var(--line); }
.step:hover { background: #e9f4f6; }
.step-number { display: block; color: var(--teal-text); font-family: var(--heading); font-size: 1.2rem; font-weight: 800; }
.step h3 { margin-top: 1.15rem; font-size: 1.18rem; letter-spacing: -.035em; line-height: 1.2; }
.step p { margin-top: .45rem; color: var(--muted); }

.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding-bottom: clamp(4.5rem, 7vw, 7rem);
}
.feature {
  display: grid;
  align-content: space-between;
  gap: 2rem;
  overflow: hidden;
  min-width: 0;
  border-radius: 1.5rem;
  background: #e6f4f6;
}
.feature-listing { background: var(--ink); color: var(--white); }
.feature-listing .eyebrow { color: var(--mist); }
.feature-copy { padding: clamp(1.5rem, 3.2vw, 3rem) clamp(1.5rem, 3.2vw, 3rem) 0; }
.feature h2 { max-width: 29rem; font-size: clamp(2.05rem, 3.5vw, 3.45rem); }
.feature p:not(.eyebrow) { margin-top: 1rem; max-width: 28rem; color: var(--muted); }
.feature-listing p:not(.eyebrow) { color: #d9e8ed; }
.feature-image {
  display: grid;
  justify-items: center;
  height: clamp(19rem, 30vw, 26rem);
  overflow: hidden;
  padding-inline: 1rem;
  background: radial-gradient(ellipse at 50% 100%, rgba(4, 143, 173, .41), transparent 68%);
}
.feature-image img {
  width: clamp(12.5rem, 25vw, 19.5rem);
  height: auto;
  border-radius: 1.15rem 1.15rem 0 0;
  box-shadow: 0 1rem 2.8rem rgba(11, 49, 69, .24);
  transform: translateY(.5rem) rotate(3deg);
  transition: transform .55s var(--ease);
}
.feature-drafts .feature-image img { transform: translateY(.5rem) rotate(-3deg); }
.feature:hover .feature-image img { transform: translateY(-.1rem) rotate(0); }

.privacy-band { background: #e8f1f4; }
.privacy-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .8fr);
  gap: 1.2rem clamp(2rem, 7vw, 7rem);
  align-items: end;
  padding-block: clamp(3.2rem, 6vw, 5rem);
}
.privacy-band h2 { font-size: clamp(2.25rem, 4vw, 3.8rem); }
.privacy-inner p:not(.eyebrow) { color: var(--muted); margin-bottom: .65rem; }
.final-cta { text-align: center; padding-block: clamp(4rem, 9vw, 8rem); }
.cta-spark { display: block; margin-bottom: .6rem; font-size: 1.75rem; }
.final-cta p { margin: .9rem 0 1.35rem; color: var(--muted); }

.footer { border-top: 1px solid var(--line); }
.footer-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .7rem 1.5rem;
  padding-block: 1.55rem;
}
.footer-main p { color: var(--muted); font-size: .88rem; }

.will-reveal { opacity: .01; transform: translateY(1.15rem); }
.will-reveal.is-visible { opacity: 1; transform: none; transition: opacity .65s var(--ease), transform .65s var(--ease); }

@media (max-width: 1050px) {
  .wrap { width: calc(100% - 3.5rem); }
  .hero { gap: 1.6rem; }
  .hero h1 { font-size: clamp(3.2rem, 6.4vw, 4.7rem); }
}

@media (max-width: 800px) {
  .main-nav { display: none; }
  .hero { grid-template-columns: 1fr; gap: 2.05rem; }
  .hero h1 { font-size: clamp(3.5rem, 10.1vw, 5.2rem); }
  .hero-intro { margin-top: 1.1rem; }
  .demo-stage { min-height: 32rem; }
  .steps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step:nth-child(3) { border-left: 0; }
  .step:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

@media (max-width: 560px) {
  .wrap { width: calc(100% - 2.1rem); }
  html { scroll-padding-top: 4.5rem; }
  .header-inner { min-height: 3.9rem; gap: .55rem; }
  .topbar .brand img { width: 6.4rem; }
  .header-actions { gap: .38rem; }
  .header-actions .button-outline { padding-inline: .62rem; font-size: .8rem; }
  .language-select { max-width: 6.8rem; padding-left: .55rem; padding-right: 1.25rem; background-position: right .43rem center; font-size: .8rem; }
  .hero { gap: 1.55rem; padding-top: 2.5rem; }
  .hero h1 { font-size: clamp(2.8rem, 12vw, 4.1rem); }
  .hero-actions { margin-top: 1.3rem; }
  .hero-note { margin-top: .9rem; }
  .demo-stage {
    min-height: 0;
    padding: clamp(12rem, 61vw, 18rem) .68rem .68rem;
    border-radius: 1.2rem;
  }
  .demo-photo { height: min(22rem, 100%); }
  .demo-photo-people { object-position: 36% 34%; }
  .demo-photo-piece { object-position: center 48%; }
  .demo-stage::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(transparent 10rem, #d3ebed 22rem);
  }
  .demo-wash { display: none; }
  .demo-caption { top: .75rem; right: .75rem; }
  .photo-frame { inset: .52rem; }
  .demo-card { width: 100%; }
  .step { padding-inline: .75rem; }
  .steps-grid .step p { font-size: .95rem; }
  .features, .privacy-inner { grid-template-columns: 1fr; }
  .feature-image { height: 19.5rem; }
  .feature-image img { width: 14.5rem; }
  .ticker-group { min-width: 40rem; }
  .footer-main p { order: 1; width: 100%; }
}

@media (max-width: 365px) {
  .topbar .brand img { width: 5.45rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .will-reveal { opacity: 1; transform: none; }
  .demo-photo-piece { transform: none; }
}

/* Ideia·App: botões «Em breve na Google Play» enquanto a app não está pública */
.button.is-soon { cursor: default; opacity: .78; box-shadow: none; }
.button-primary.is-soon:hover { background: var(--ink); transform: none; }
.button-outline.is-soon:hover { background: transparent; }

/* Ideia·App: rodapé igual ao das outras apps (marca, ligações legais, caixa Ideia·App, ©) */
.footer-brand { display: grid; gap: .45rem; }
.footer-brand p { margin: 0; color: var(--muted); font-size: .88rem; }
.footer-links { gap: .55rem 1.4rem; }
.footer-ideia {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .8rem 1.5rem;
  padding: 1.1rem 1.3rem; margin-bottom: 1.2rem;
  border: 1px solid var(--line); border-radius: 1.1rem; background: var(--white);
}
.footer-ideia p { margin: 0; color: var(--ink); font-size: .92rem; }
.footer-ideia-btn {
  display: inline-flex; align-items: center; gap: .45rem; padding: .55rem 1.05rem;
  border-radius: 999px; background: var(--ink); color: var(--white); font-weight: 700; font-size: .88rem; text-decoration: none;
}
.footer-ideia-btn:hover { background: var(--deep); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1.5rem;
  padding-bottom: 1.6rem; color: var(--muted); font-size: .82rem;
}
.footer-bottom a { color: inherit; }
@media (max-width: 1050px) { .footer-brand p { width: auto; } }

/* Cabeçalho: texto curto «Em breve» no telemóvel, para o botão caber */
.soon-short { display: none; }
@media (max-width: 560px) {
  .header-actions .soon-long { display: none; }
  .header-actions .soon-short { display: inline; }
}
@media (max-width: 365px) {
  .header-inner { gap: .4rem; }
  .header-actions { gap: .3rem; }
  .header-actions .button-outline.is-soon { padding-inline: .5rem; font-size: .74rem; }
  .language-select { max-width: 5.9rem; font-size: .76rem; }
}
