/* Dona Cevada — Coming Soon v3
   Kit: #10090b · #ffffff · #cc2229
   Type: Fraunces + Source Sans 3
   Motion: marketing entrance + spring parallax (Emil / Apple restraint)
*/

:root {
  --bg: #10090b;
  --ink: #ffffff;
  --ink-soft: rgba(255, 255, 255, 0.78);
  --ink-mute: rgba(255, 255, 255, 0.48);
  --accent: #cc2229;
  --accent-hot: #e02830;
  --accent-soft: rgba(204, 34, 41, 0.2);
  --panel: #1a1012;
  --hairline: rgba(255, 255, 255, 0.1);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --font-display: 'Fraunces', 'Times New Roman', Georgia, serif;
  --font-body: 'Source Sans 3', 'Acumin Pro', system-ui, sans-serif;
  --radius: 6px;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100dvh;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  perspective: 1200px;
}

body.is-booting .reveal {
  opacity: 0;
}

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

a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* —— Atmosphere —— */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(165deg, #1a0e12 0%, var(--bg) 38%, #080506 100%);
  overflow: hidden;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
}

.glow-a {
  width: min(58vw, 480px);
  height: min(58vw, 480px);
  top: 6%;
  left: 18%;
  background: var(--accent-soft);
  opacity: 0.55;
}

.glow-b {
  width: min(42vw, 320px);
  height: min(42vw, 320px);
  right: -4%;
  bottom: 4%;
  background: rgba(204, 34, 41, 0.12);
  opacity: 0.7;
}

body.is-ready .glow-a {
  animation: pulse 10s var(--ease-in-out) infinite alternate;
}

body.is-ready .glow-b {
  animation: pulse 14s var(--ease-in-out) infinite alternate-reverse;
}

.vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 80% 70% at 50% 45%,
    transparent 20%,
    rgba(0, 0, 0, 0.55) 100%
  );
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.085;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* —— Top chrome —— */
.top {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1.25rem, 4vw, 2.75rem);
  border-bottom: 1px solid var(--hairline);
  background: rgba(16, 9, 11, 0.55);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .top {
    background: rgba(16, 9, 11, 0.92);
  }
}

.place {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 600;
}

.ig {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0 0.15rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition:
    color 200ms var(--ease-out),
    transform 200ms var(--ease-out);
  cursor: pointer;
}

.ig:hover {
  color: var(--ink);
  transform: translateY(-1px);
}

.ig:active {
  transform: scale(0.97);
  transition-duration: 100ms;
}

.ig span {
  display: none;
}

@media (min-width: 640px) {
  .ig span {
    display: inline;
  }
}

/* —— Stage —— */
.stage {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100dvh - 8rem);
  padding: clamp(1.5rem, 4vh, 3rem) clamp(1.25rem, 5vw, 3rem) 2.5rem;
}

.composition {
  width: min(1080px, 100%);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 3.5vw, 2.5rem);
  align-items: center;
  justify-items: center;
}

@media (min-width: 900px) {
  .composition {
    grid-template-columns: minmax(280px, 0.9fr) minmax(300px, 1.1fr);
    gap: clamp(2rem, 5vw, 4rem);
    justify-items: stretch;
    align-items: center;
  }

  .visual {
    justify-self: center;
  }

  .copy {
    text-align: left;
    align-items: flex-start;
  }

  .actions {
    justify-content: flex-start;
  }

  .footnote {
    justify-content: flex-start;
  }

  .barley {
    margin-left: 0;
    margin-right: auto;
  }
}

/* —— Visual / seal ——
   Motion fica no .seal-stage (centro do logo).
   .visual só ancora a coluna — sem translate que desalinha. */
.visual {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: min(70vw, 340px);
}

.seal-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  margin: 0 auto;
  transform-style: preserve-3d;
  transform-origin: 50% 50%;
  perspective: 900px;
  will-change: transform;
}

.seal-orbit {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  transform-origin: 50% 50%;
}

.seal-ring {
  position: absolute;
  inset: -6%;
  margin: auto;
  border-radius: 50%;
  border: 1px solid rgba(204, 34, 41, 0.28);
  box-shadow:
    0 0 0 12px rgba(204, 34, 41, 0.05),
    0 0 80px rgba(204, 34, 41, 0.18);
  transform-origin: 50% 50%;
}

.seal-ring-outer {
  inset: -14%;
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: none;
  opacity: 0.7;
}

body.is-ready .seal-ring {
  animation: ringPulse 8s var(--ease-in-out) infinite alternate;
}

body.is-ready .seal-ring-outer {
  animation: ringSpin 28s linear infinite;
}

.seal {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  display: block;
  margin: 0;
  transform-origin: 50% 50%;
  transform-style: preserve-3d;
  will-change: transform;
  filter: drop-shadow(0 28px 56px rgba(0, 0, 0, 0.6));
  user-select: none;
}

body.is-ready .seal-stage {
  animation: float 7.5s var(--ease-in-out) infinite;
  animation-delay: 1.1s;
}

@media (min-width: 900px) {
  .visual {
    max-width: min(34vw, 380px);
  }
}

/* —— Copy —— */
.copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.85rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.status-mark {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

body.is-ready .status-mark {
  animation: blink 2.4s ease-in-out infinite;
}

.brand-name {
  margin: 0;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: clamp(3.25rem, 10.5vw, 5.5rem);
  font-weight: 500;
  font-variation-settings: 'SOFT' 40, 'WONK' 0.4;
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.brand-line {
  display: block;
  overflow: hidden;
}

.brand-word {
  display: inline-block;
}

.char {
  display: inline-block;
  opacity: 0;
  transform: translateY(110%) rotate(4deg);
}

body.is-ready .char {
  animation: charIn 720ms var(--ease-out) both;
  animation-delay: calc(280ms + var(--i) * 38ms);
}

.headline {
  margin: 1rem 0 0;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: clamp(1.25rem, 2.8vw, 1.625rem);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
}

.barley {
  width: 120px;
  height: 16px;
  margin: 1.15rem auto 0;
  color: var(--accent);
  opacity: 0.9;
  overflow: visible;
}

.barley-path {
  --path-len: 140;
  stroke-dasharray: var(--path-len);
  stroke-dashoffset: var(--path-len);
}

body.is-ready .barley-path {
  animation: drawPath 1.1s var(--ease-out) 0.75s both;
}

.barley-seed {
  opacity: 0;
  transform-origin: center;
  transform-box: fill-box;
}

body.is-ready .barley-seed {
  animation: seedPop 420ms var(--ease-out) 1.35s both;
}

.lede {
  margin: 1.25rem 0 0;
  max-width: 34rem;
  font-size: clamp(1.0625rem, 2vw, 1.1875rem);
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink-soft);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.85rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    background-color 200ms ease,
    color 200ms ease,
    border-color 200ms ease,
    box-shadow 220ms var(--ease-out),
    transform 160ms var(--ease-out);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: scale(0.97);
  transition-duration: 100ms;
}

.btn-primary {
  background: var(--accent);
  color: var(--ink);
  border: 1px solid transparent;
  box-shadow: 0 0 0 0 var(--accent-soft);
}

.btn-primary:hover {
  background: var(--accent-hot);
  box-shadow: 0 0 32px var(--accent-soft);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--hairline);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.04);
}

.footnote {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin: 2rem 0 0;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
}

.dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.9;
}

.foot {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem 0.65rem;
  padding: 0 1.25rem 1.35rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
}

.foot-sep {
  opacity: 0.55;
}

/* —— Reveal choreography —— */
.reveal {
  opacity: 0;
  transform: translateY(18px);
}

body.is-ready .reveal {
  animation: rise 780ms var(--ease-out) both;
  animation-delay: calc(var(--reveal-i, 0) * 70ms);
}

.reveal[data-reveal='0'] {
  --reveal-i: 0;
}
.reveal[data-reveal='1'] {
  --reveal-i: 1;
}
.reveal[data-reveal='2'] {
  --reveal-i: 3;
}
.reveal[data-reveal='3'] {
  --reveal-i: 4;
}
.reveal[data-reveal='4'] {
  --reveal-i: 4.4;
}
.reveal[data-reveal='5'] {
  --reveal-i: 6;
}
.reveal[data-reveal='6'] {
  --reveal-i: 6.5;
}
.reveal[data-reveal='7'] {
  --reveal-i: 7.2;
}
.reveal[data-reveal='8'] {
  --reveal-i: 8;
}
.reveal[data-reveal='9'] {
  --reveal-i: 8.8;
}
.reveal[data-reveal='10'] {
  --reveal-i: 9.4;
}

body.is-ready .visual.reveal {
  animation-name: sealIn;
  animation-duration: 1000ms;
  animation-timing-function: var(--ease-drawer);
  transform-origin: 50% 50%;
}

/* —— Keyframes —— */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sealIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes charIn {
  from {
    opacity: 0;
    transform: translateY(110%) rotate(4deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }
}

@keyframes drawPath {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes seedPop {
  from {
    opacity: 0;
    transform: scale(0.4);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -8px;
  }
}

@keyframes pulse {
  from {
    opacity: 0.32;
    scale: 0.94;
  }
  to {
    opacity: 0.68;
    scale: 1.05;
  }
}

@keyframes ringPulse {
  from {
    opacity: 0.45;
    scale: 0.98;
  }
  to {
    opacity: 0.9;
    scale: 1.02;
  }
}

@keyframes ringSpin {
  to {
    rotate: 360deg;
  }
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

/* —— Reduced motion —— */
@media (prefers-reduced-motion: reduce) {
  body.is-static .reveal,
  body.is-booting .reveal {
    opacity: 1;
    transform: none;
    animation: none !important;
  }

  .char {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  .barley-path {
    stroke-dashoffset: 0 !important;
    animation: none !important;
  }

  .barley-seed {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  .seal,
  .seal-stage,
  .seal-ring,
  .seal-ring-outer,
  .glow-a,
  .glow-b,
  .status-mark,
  .visual {
    animation: none !important;
  }

  .seal,
  .seal-stage,
  .visual,
  .glow-a,
  .glow-b {
    transform: none !important;
    translate: none !important;
  }

  .btn:hover,
  .btn:active,
  .ig:hover,
  .ig:active {
    transform: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .top {
    background: var(--panel);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (hover: none) {
  .btn:hover {
    transform: none;
  }
}
