/* Deegy — We build what comes next. */

:root {
  --deegy-red: #E64232;
  --deegy-red-deep: #CC3A2B; /* hover: o mesmo vermelho, levemente escurecido */
  --charcoal: #202124;
  --warm-paper: #F7F5F0;
  --stone: #77736F;
  --rule: rgb(119 115 111 / 0.3);

  --serif: Georgia, "Times New Roman", serif;
  --sans: Arial, "Helvetica Neue", Helvetica, sans-serif;

  --gutter: clamp(24px, 6vw, 96px);
  --ease-build: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--warm-paper);
  color: var(--charcoal);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--charcoal);
  outline-offset: 4px;
  border-radius: 2px;
}

/* ---------- The fold ---------- */

.fold {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  min-height: 100svh;
  padding: 0 var(--gutter);
  overflow: hidden;
}

/* ---------- Header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: clamp(20px, 3.4vw, 40px);
  position: relative;
  z-index: 2;
}

/* Área de proteção do logo ≥ altura do "d" (~47% da altura do logo) */
.brand {
  display: block;
  padding: 16px 16px 16px 0;
  margin: -16px 0;
  line-height: 0;
}

.brand img {
  display: block;
  height: 26px;
  width: auto;
}

.contact {
  font-size: 13px;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 14px 0 14px 16px;
  margin: -14px 0;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-size: 0 1px;
  background-position: 100% 70%;
  transition: background-size 200ms var(--ease-build);
}

.contact:hover {
  background-size: calc(100% - 16px) 1px;
  background-position: 100% 70%;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: flex;
  align-items: flex-start;
  padding-top: clamp(40px, 15svh, 128px);
}

.hero-copy {
  position: relative;
  z-index: 1;
  font-size: clamp(2.75rem, 7.8vw, 7rem);
}

.headline {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1em;
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.support {
  margin: clamp(20px, 2.2vw, 32px) 0 0;
  max-width: 26em;
  font-size: clamp(16px, 0.9rem + 0.35vw, 20px);
  line-height: 1.45;
  color: var(--stone);
}

.cta {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-top: clamp(24px, 2.8vw, 40px);
  padding: 0 28px;
  border-radius: 5px;
  background: var(--deegy-red);
  color: #fff;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 150ms ease;
}

.cta:hover { background: var(--deegy-red-deep); }

/* ---------- Ascending planes ---------- */

.planes {
  position: absolute;
  z-index: 0;
  bottom: 0;
  right: calc(var(--gutter) * -1);
  width: min(40vw, (100svh - 190px) * 0.7);
  height: auto;
  overflow: visible;
  pointer-events: none;
}

.plane-layer { will-change: transform; }

.plane {
  fill: var(--deegy-red);
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

.plane-1 { fill-opacity: 0.35; }
.plane-2 { fill-opacity: 0.65; }
.plane-3 { fill-opacity: 1; }

/* ---------- Footer ---------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 24px;
  padding: 18px 0 clamp(18px, 2.4vw, 28px);
  border-top: 1px solid var(--rule);
  position: relative;
  z-index: 2;
  background: var(--warm-paper);
}

.site-footer p {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone);
}

/* ---------- Responsive ---------- */

@media (min-width: 768px) {
  .brand img { height: 32px; }

  .hero {
    align-items: center;
    padding-top: 0;
  }

  /* Ligeiramente abaixo do centro */
  .hero-copy { transform: translateY(6%); }
}

@media (min-width: 1280px) {
  .brand img { height: 34px; }
  .site-footer p { font-size: 13px; }
}

@media (max-width: 767px) {
  .planes {
    width: min(46vw, 240px);
  }
}

/* Telas baixas (landscape mobile): planos menores, sem disputar com o texto */
@media (max-height: 560px) and (min-width: 568px) {
  .hero-copy { font-size: clamp(2.75rem, 6svh + 2vw, 5rem); }
  .planes { width: min(28vw, 50svh); }
}

/* ---------- Entrance: the planes build, then the words arrive ---------- */

@keyframes build {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}

@keyframes arrive {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .plane { animation: build 700ms var(--ease-build) both; }
  .plane-2 { animation-delay: 150ms; }
  .plane-3 { animation-delay: 300ms; }

  .hero-copy > * { animation: arrive 700ms var(--ease-build) both; }
  .headline { animation-delay: 650ms; }
  .support  { animation-delay: 800ms; }
  .cta      { animation-delay: 950ms; }
}
