/*
  Flowing Motion AR. Styled to match flowingmotion.com (Radcliffe 2 theme).
  To retune the look, change the values in :root. Nothing else needs to move.
*/
:root {
  --paper: #fff;
  --ink: #222;
  --muted: #666;
  --faint: #707070;
  --rule: #ddd;
  --wash: #f1f1f1;
  --red: #ca2017;
  --red-bright: #e43a31;
  --serif: Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Times, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Oxygen-Sans", Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --text: 740px;
  --wide: 1040px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.8;
}

a { color: var(--red); text-decoration: none; transition: color .15s ease-in-out, background-color .15s ease-in-out; }
a:hover { color: var(--red-bright); text-decoration: underline; }

a:focus-visible, button:focus-visible, canvas:focus-visible, summary:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

h1, h2, h3, p { margin: 0; }

.skip-link { position: absolute; left: -999em; }
.skip-link:focus { left: 8px; top: 8px; z-index: 10; padding: 12px 18px; background: var(--wash); border-radius: 3px; font: 700 14px/1 var(--sans); color: var(--ink); }

/* ---------- Masthead ---------- */

.site-header {
  width: var(--wide);
  max-width: 92%;
  margin: 0 auto;
  padding: 36px 0 20px;
  text-align: center;
}

.site-logo { display: block; margin: 0 auto 18px; width: 200px; max-width: 46vw; }
.site-logo img { display: block; width: 100%; height: auto; }

.site-title { font-size: 40px; font-weight: 600; line-height: 1; }
.site-title a { color: var(--ink); }
.site-title a:hover { color: var(--red); text-decoration: none; }

.site-description { font-style: italic; line-height: 2; }

.main-navigation { margin-top: 18px; }
.main-navigation ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.main-navigation a {
  display: block;
  padding: 9px 15px;
  border-radius: 3px;
  color: var(--ink);
  font: 700 15px/1.2 var(--sans);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.main-navigation a:hover,
.main-navigation a[aria-current="page"] { background: var(--red); color: #fff; text-decoration: none; }

/* ---------- Shared section rhythm ---------- */

main { display: block; }

main > section,
main > details {
  width: var(--wide);
  max-width: 92%;
  margin: 0 auto;
  border-top: 1px solid var(--rule);
  text-align: center;
}

main > section { padding: 54px 0; }

h1 {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 600;
  line-height: 1.2;
  text-wrap: balance;
}

h2 { font: 700 26px/1.2 var(--sans); }

h3 { font: 700 18px/1.4 var(--sans); }

.tagline { font-style: italic; color: var(--muted); margin-top: 9px; text-wrap: balance; }

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

.intro { max-width: var(--text); margin: 0 auto; }

.intro hr { width: 80px; height: 2px; margin: 27px auto; border: 0; background: var(--rule); }

.description { max-width: 34em; margin: 0 auto; }

#enterar {
  margin-top: 27px;
  min-height: 56px;
  padding: 14px 32px;
  border: 0;
  border-radius: 3px;
  background: var(--red);
  color: #fff;
  font: 700 16px/1.2 var(--sans);
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .15s ease-in-out;
}
#enterar span { display: none; }
#enterar:hover:not(:disabled) { background: var(--red-bright); }

button:disabled { opacity: .55; cursor: default; }

#status { min-height: 1.8em; margin-top: 12px; font-size: 16px; font-style: italic; color: var(--muted); }

#error {
  max-width: 34em;
  margin: 12px auto 0;
  padding: 12px 18px;
  border-left: 3px solid var(--red);
  background: #fbefee;
  color: #8a1610;
  font-size: 16px;
  line-height: 1.6;
  text-align: left;
}
#error[hidden] { display: none; }

.features {
  margin-top: 18px;
  color: var(--muted);
  font: 600 12px/1.5 var(--sans);
  letter-spacing: 1px;
  text-transform: uppercase;
  text-wrap: balance;
}
.features i { margin: 0 .5em; font-style: normal; color: rgba(0, 0, 0, .25); }

/* ---------- Live preview ---------- */

.preview {
  position: relative;
  height: 360px;
  margin-top: 36px;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--wash);
}

#unity-canvas { display: block; width: 100%; height: 100%; touch-action: none; }

.preview-label {
  position: absolute;
  top: 18px;
  left: 20px;
  color: var(--faint);
  font: 600 12px/1.5 var(--sans);
  letter-spacing: 1px;
  text-transform: uppercase;
  pointer-events: none;
}

.preview-footer {
  position: absolute;
  right: 20px;
  bottom: 18px;
  left: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 15px;
  font-style: italic;
  line-height: 1.4;
  text-align: left;
  pointer-events: none;
}

#reset {
  flex-shrink: 0;
  padding: 9px 18px;
  border: 0;
  border-radius: 3px;
  background: var(--red);
  color: #fff;
  font: 700 14px/1.29 var(--sans);
  font-style: normal;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  pointer-events: auto;
  transition: background-color .15s ease-in-out;
}
#reset:hover:not(:disabled) { background: var(--red-bright); }

#loading {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: clamp(140px, 28%, 220px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  pointer-events: none;
  padding: 8px;
  border-radius: 4px;
  background: var(--wash);
  font-size: 13px;
  text-align: center;
  font-style: italic;
  color: var(--muted);
}
#loading[hidden] { display: none; }
.loading-art { position: relative; width: 100%; aspect-ratio: 720 / 560; }
.loading-art canvas, .loading-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
#loading-figure { visibility: hidden; }
.loading-line { width: 100px; height: 2px; background: #b4a78e; position: relative; overflow: hidden; margin: 4px 0; }
.loading-line::after { content: ''; position: absolute; width: 35px; height: 2px; background: #493f2f; animation: loading-travel 2s ease-in-out infinite; }
@keyframes loading-travel { from { left: -35px; } to { left: 100px; } }
@media (prefers-reduced-motion: reduce) { .loading-line::after { animation: none; left: 32px; } }

/* ---------- Collection ---------- */

.cards { display: grid; grid-template-columns: 1fr; gap: 36px; max-width: var(--text); margin: 36px auto 0; }

.cards i {
  display: block;
  width: 44px;
  height: 44px;
  margin: 0 auto 14px;
  box-shadow: inset -6px -6px 11px rgba(0, 0, 0, .14);
}
.cards .stone { background: #80aaa1; border-radius: 50%; }
.cards .cube { background: #d3a06a; border-radius: 4px; transform: rotate(-14deg); }
.cards .capsule { width: 30px; background: #aaaccd; border-radius: 16px; }

.cards p { margin-top: 4px; color: var(--muted); font-style: italic; text-wrap: balance; }

/* ---------- Guide ---------- */

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  text-align: left;
}

.steps li { counter-increment: step; padding-top: 14px; border-top: 2px solid var(--rule); }

.steps li::before {
  content: counter(step);
  display: block;
  color: var(--red);
  font-size: 40px;
  font-weight: 600;
  line-height: 1.2;
}

.steps h3 { margin: 4px 0 8px; }

.steps p { font-size: 17px; line-height: 1.7; }

/* ---------- Troubleshooting ---------- */

main > details { padding: 22px 0; text-align: left; }

summary {
  width: fit-content;
  color: var(--muted);
  font: 700 14px/1.5 var(--sans);
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
}
summary:hover { color: var(--red); }

#diagnostics {
  margin: 18px 0 0;
  padding: 1.6em;
  overflow: auto;
  background: #eee;
  font: 15px/1.6 "Courier 10 Pitch", Courier, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

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

.site-footer {
  padding: 36px 4%;
  border-top: 1px solid var(--rule);
  color: var(--faint);
  font: 600 14px/2.2 var(--sans);
  text-align: center;
  text-transform: uppercase;
}
.site-footer a { color: var(--faint); }
.site-footer a:hover { color: var(--red); text-decoration: none; }

/* ---------- Larger screens ---------- */

@media (min-width: 600px) {
  body { font-size: 20px; }
  .site-header { padding: 45px 0 36px; }
  .site-logo { width: 280px; }
  .site-title { font-size: 50px; }
  h1 { font-size: 50px; }
  h2 { font-size: 30px; }
  h3 { font-size: 20px; }
  main > section { padding: 72px 0; }
  .intro hr { width: 108px; margin: 36px auto; }
  #enterar { font-size: 18px; padding: 16px 40px; }
  .preview { height: 440px; margin-top: 54px; }
  .cards { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}

@media (min-width: 768px) {
  .site-title { font-size: 60px; }
  h1 { font-size: 60px; }
  .preview { height: 520px; }
  .steps { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
