@font-face { font-family: Archivo; font-style: normal; font-weight: 400 800; font-display: swap; src: url("/assets/fonts/archivo-latin.woff2") format("woff2"); }
@font-face { font-family: "Archivo Black"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/archivo-black-latin.woff2") format("woff2"); }

:root { --orange: #e8621f; --orange-deep: #b8410e; --ink: #111111; --sand: #f7f4f0; --white: #ffffff; --muted: #6b6660; --line: #ddd5cc; --error: #9e2409; }
* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { overflow-x: hidden; background: var(--sand); color: var(--ink); font-family: Archivo, Arial, sans-serif; }
button, input { font: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:where(a, button, input):focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }

.skip-link { position: fixed; z-index: 10; top: 12px; left: 12px; transform: translateY(-180%); padding: 10px 14px; background: var(--white); border: 2px solid var(--ink); color: var(--ink); font-weight: 800; }
.skip-link:focus { transform: none; }
.photo-page { width: min(calc(100% - 48px), 1100px); margin: clamp(24px, 7vw, 82px) auto; }
.photo-experience, .result { position: relative; border: 3px solid var(--ink); background: var(--white); box-shadow: 14px 14px 0 var(--orange); }
.photo-experience { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(300px, .86fr); gap: clamp(34px, 7vw, 88px); align-items: center; min-height: 690px; padding: clamp(36px, 6.4vw, 68px); }
.photo-experience::before { position: absolute; top: -3px; left: -3px; width: 35%; height: 10px; content: ""; background: #ffc400; }
.experience-copy { max-width: 530px; }
.eyebrow { display: flex; align-items: center; gap: 11px; margin: 0 0 24px; color: var(--orange-deep); font-size: .7rem; font-weight: 800; letter-spacing: .16em; line-height: 1.25; text-transform: uppercase; }
.eyebrow span { display: block; width: 36px; height: 6px; background: var(--orange); }
h1, h2 { margin: 0; font-family: "Archivo Black", Impact, sans-serif; font-weight: 400; letter-spacing: -.045em; line-height: .93; text-transform: uppercase; }
h1 { font-size: clamp(3rem, 5.65vw, 5.8rem); }
.lead { max-width: 540px; margin: 28px 0 0; color: var(--muted); font-size: clamp(.98rem, 1.35vw, 1.1rem); line-height: 1.6; }
.photo-controls { display: grid; gap: 20px; margin-top: 36px; }

.step-button, .download-step { display: flex; min-height: 57px; align-items: center; justify-content: center; width: 100%; border: 2px solid var(--ink); background: var(--white); color: var(--ink); cursor: pointer; font-size: .78rem; font-weight: 900; letter-spacing: .08em; text-align: center; text-decoration: none; text-transform: uppercase; transition: transform .18s, background .18s, color .18s; }
.step-button:hover, .download-step:hover:not(:disabled) { background: var(--ink); color: var(--white); transform: translateY(-2px); }
.step-button input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; overflow: hidden; }
.zoom-control { display: grid; gap: 13px; border: 1px solid var(--line); background: var(--sand); padding: 21px 20px; color: var(--ink); }
.zoom-control > span { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: .72rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.zoom-control output { color: var(--orange-deep); }
.zoom-control input { width: 100%; accent-color: var(--orange); }
.zoom-control input:disabled { opacity: .44; }
.zoom-control small { color: var(--muted); font-size: .77rem; line-height: 1.4; }
.download-step { border-color: var(--orange); background: var(--orange); color: var(--white); }
.download-step:hover:not(:disabled) { background: var(--ink); border-color: var(--ink); }
.download-step:disabled { cursor: not-allowed; opacity: .48; }
.download-step[aria-busy="true"] { background: var(--ink); border-color: var(--ink); opacity: 1; }
.button-spinner { display: inline-block; width: 17px; height: 17px; margin-left: 10px; border: 2px solid rgba(255,255,255,.4); border-top-color: var(--white); border-radius: 50%; animation: button-spin .75s linear infinite; }
.photo-actions-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.change-photo { justify-self: start; border: 0; border-bottom: 2px solid currentColor; padding: 0 0 3px; background: none; color: var(--ink); cursor: pointer; font-size: .78rem; font-weight: 800; }
.change-photo:hover { color: var(--orange-deep); }
.creation-status { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.4; text-align: center; }
.message { margin: 0; padding: 13px 14px; border-left: 5px solid var(--error); background: #fff0eb; color: #792216; font-size: .86rem; font-weight: 700; line-height: 1.45; }

.experience-preview { position: relative; width: 100%; }
.template-preview, .preview-wrap { position: relative; overflow: hidden; border: 1px solid rgba(17,17,17,.2); background: radial-gradient(circle at 50% 25%, #ffffff, #f3ebe3 74%); box-shadow: 0 5px 18px rgba(89,42,11,.12); aspect-ratio: 1; }
.template-preview::before { position: absolute; z-index: 0; inset: 8% 8% auto; content: ""; border: 1px dashed rgba(184,65,14,.28); border-radius: 50%; aspect-ratio: 1; }
.template-preview img, .preview-wrap canvas { position: relative; z-index: 1; display: block; width: 100%; height: 100%; }
.template-preview img { object-fit: cover; }
.preview-wrap canvas { background: var(--white); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.preview-wrap.is-dragging canvas { cursor: grabbing; }
.drag-hint { margin: 10px 0 0; color: var(--muted); font-size: .75rem; font-weight: 700; text-align: center; letter-spacing: .02em; }

.result { width: min(calc(100% - 48px), 650px); margin: clamp(24px, 7vw, 82px) auto; padding: clamp(30px, 5vw, 54px); text-align: center; }
.result .eyebrow { justify-content: center; }
.result h2 { font-size: clamp(2.3rem, 4.8vw, 4.2rem); }
.result-image-frame { margin-top: 28px; border: 2px solid var(--ink); background: var(--sand); box-shadow: 8px 8px 0 var(--orange); }
.result-image-frame img { width: 100%; display: block; }
.result-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.result .download-step { margin-top: 0; }
.download-step.outline-step { background: transparent; color: var(--ink); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.download-step.outline-step:hover { background: var(--sand); border-color: var(--ink); }
.save-instructions { margin-top: 24px; padding: 18px 20px; border: 2px solid rgba(17,17,17,.15); background: var(--sand); text-align: left; font-size: .84rem; line-height: 1.5; color: var(--ink); }
.instructions-tip { margin: 0 0 10px; }
.instructions-whatsapp { margin: 0; padding-top: 10px; border-top: 1px dashed rgba(17,17,17,.2); color: var(--ink); }
.result .change-photo { margin-top: 24px; }

#fotoForm.is-creating .step-button, #fotoForm.is-creating .zoom-control, #fotoForm.is-creating .change-photo { pointer-events: none; opacity: .72; }
@keyframes button-spin { to { transform: rotate(360deg); } }

@media (max-width: 800px) {
  .photo-page { width: min(calc(100% - 32px), 600px); margin-block: 22px; }
  .photo-experience { grid-template-columns: 1fr; gap: 38px; min-height: 0; padding: 32px 24px; }
  .experience-copy { max-width: none; }
  .experience-preview { width: min(100%, 420px); margin-inline: auto; }
  .result { width: min(calc(100% - 32px), 600px); }
}

@media (max-width: 480px) {
  .photo-experience { padding: 28px 20px; box-shadow: 8px 8px 0 var(--orange); }
  h1 { font-size: clamp(2.75rem, 16vw, 4.2rem); }
  .lead { margin-top: 22px; font-size: .98rem; }
  .photo-controls { margin-top: 28px; }
  .step-button, .download-step { min-height: 55px; font-size: .69rem; }
  .zoom-control { padding: 18px 16px; }
  .zoom-control > span { font-size: .65rem; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }
