@import url('/assets/fonts/fonts.css');

:root {
  color: #17243a;
  background: #faf9f5;
  font: 16px/1.55 'DM Sans', system-ui, sans-serif;
  --navy: #101d30;
  --teal: #216b61;
  --line: #dce5df;
  --muted: #4a596c;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
.container { width: min(calc(100% - 2rem), 1120px); margin-inline: auto; }
a { color: var(--teal); }
:focus-visible { outline: 3px solid #ad7518; outline-offset: 4px; }
header { background: white; }
.top { background: var(--navy); color: white; }
.top .container { display: flex; min-height: 4rem; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { color: white; font: 700 1.4rem 'Space Grotesk', system-ui, sans-serif; text-decoration: none; }
.mark { display: inline-grid; width: 35px; height: 35px; margin-right: .5rem; place-items: center; color: var(--navy); background: #f5a623; border-radius: 9px; }
.languages { display: flex; gap: .9rem; }
.languages a { color: white; }
.languages [aria-current="page"] { color: #ffcb6e; font-weight: 700; }
.intro { padding: 2.5rem 0 1.75rem; }
.badge { display: inline-block; margin: 0 0 .7rem; padding: .25rem .65rem; border-radius: 6px; background: #e7f3ed; color: #17574f; font-size: .85rem; font-weight: 800; letter-spacing: .045em; }
h1, h2 { font-family: 'Space Grotesk', system-ui, sans-serif; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -.04em; }
h2 { font-size: 1.25rem; }
.intro p:last-child { max-width: 66ch; color: var(--muted); margin-bottom: 0; }
.workspace { display: grid; grid-template-columns: minmax(275px, 1fr) minmax(0, 1.65fr); border: 1px solid var(--line); border-radius: 14px; background: white; overflow: hidden; }
.controls, .viewer { padding: 1.25rem; min-width: 0; }
.controls { border-right: 1px solid var(--line); background: #f6faf7; }
.upload { display: grid; gap: .25rem; margin-bottom: 1.25rem; padding: 1rem; border: 1px dashed #78a59b; border-radius: 9px; text-align: center; background: white; cursor: pointer; overflow-wrap: anywhere; }
.upload:focus-within { outline: 3px solid #ad7518; outline-offset: 3px; }
.upload input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.upload span, .hint { color: var(--muted); font-size: .875rem; }
form, fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.preset, .actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0; }
button, .button, select, input[type="number"] { font: inherit; }
button, .button, select, input[type="number"] { border: 1px solid #a6bbb2; border-radius: 7px; color: var(--navy); background: white; padding: .45rem .65rem; }
button, .button, select { cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
.primary { display: inline-block; background: var(--teal); color: white; border-color: var(--teal); font-weight: 700; text-decoration: none; }
.primary:hover:not(:disabled) { background: #194f48; }
.sliders { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin: 1rem 0; }
.sliders label { display: grid; font-size: .875rem; font-weight: 650; }
output { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; margin-inline: 0; }
input, progress { accent-color: var(--teal); }
.choices { display: grid; gap: .6rem; }
.choices label { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .4rem; }
.choices .ai { justify-content: flex-start; }
.hint { margin: .5rem 0; }
.viewer { display: flex; flex-direction: column; gap: 1rem; }
.empty-preview {
  display: grid;
  align-content: start;
  justify-items: start;
  align-self: stretch;
  gap: 1rem;
  flex: 1;
  padding: clamp(1rem, 3vw, 2.25rem);
  border: 1px dashed #a9c3ba;
  border-radius: 12px;
  background: linear-gradient(150deg, #fff 18%, #f2f8f5);
}
.empty-preview > p { margin: -.25rem 0 0; color: var(--muted); }
.empty-preview-frames {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(.75rem, 2vw, 1.25rem);
  width: 100%;
  margin-block: .25rem .5rem;
}
.empty-preview-frames figure {
  padding: .6rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}
.empty-preview-frames figcaption { margin: 0 0 .5rem; overflow-wrap: anywhere; }
.preview-placeholder {
  --sky: #273c52;
  --glow: #788d92;
  --ridge: #3d5b63;
  --foreground: #233e47;
  --sun: #b1c4bd;
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  isolation: isolate;
  overflow: hidden;
  border-radius: 7px;
  background:
    radial-gradient(circle at 76% 34%, var(--sun) 0 6%, transparent 6.5%),
    linear-gradient(155deg, var(--sky), var(--glow));
}
.preview-placeholder--enhanced {
  --sky: #388493;
  --glow: #e9c898;
  --ridge: #6c9e8a;
  --foreground: #366b63;
  --sun: #ffdfa2;
}
.placeholder-mountain, .preview-placeholder::after {
  position: absolute;
  inset: 28% 0 0;
  background: var(--ridge);
  clip-path: polygon(0 63%, 22% 37%, 37% 55%, 60% 9%, 80% 48%, 100% 30%, 100% 100%, 0 100%);
}
.preview-placeholder::after {
  content: '';
  inset-block-start: 62%;
  background: var(--foreground);
  clip-path: polygon(0 41%, 19% 12%, 42% 47%, 66% 33%, 83% 58%, 100% 24%, 100% 100%, 0 100%);
}
.placeholder-play {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid #fffd;
  border-radius: 50%;
  background: #101d306b;
}
.placeholder-play::before {
  content: '';
  margin-left: 2px;
  border: 6px solid transparent;
  border-right: 0;
  border-left: 9px solid white;
}
.placeholder-timeline {
  height: 4px;
  margin-top: .65rem;
  border-radius: 5px;
  background: linear-gradient(90deg, #90b4aa 26%, #e5ece8 26%);
}
.screens { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
figure { margin: 0; min-width: 0; }
figcaption { margin-bottom: .35rem; color: var(--muted); font-weight: 650; font-size: .875rem; }
video, canvas { display: block; max-height: 430px; width: 100%; background: var(--navy); border-radius: 8px; object-fit: contain; }
.screens video, .screens canvas { aspect-ratio: 16 / 9; }
.status { margin: 0; }
.status.error { color: #a1261b; }
progress { width: 100%; }
.result { padding-top: 1rem; border-top: 1px solid var(--line); }
.result video { margin: .75rem 0; }
.result .button { margin-right: .5rem; }
footer { padding: 1.25rem 0 2rem; }
footer nav { display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; }
footer p { color: var(--muted); max-width: 77ch; }
@media (max-width: 760px) {
  .workspace { grid-template-columns: 1fr; }
  .controls { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 420px) {
  .screens { grid-template-columns: 1fr; }
  .intro { padding-top: 1.75rem; }
}
