/* Layout: cream sky, a sun-circle photo that rises behind a green ridge, then the lake
   carries down into the contest. Brand shapes are the section edges. Light only, by choice. */
:root {
  --cream: #FBF3E4;
  --paper: #FFFBF3;
  --ink: #1C2B33;
  --ink-soft: #46555C;
  --sun: #F39A2E;
  --sun-light: #F9C77F;
  --ridge: #2E5A4C;
  --lake: #1D6F7A;
  --lake-deep: #155760;
  --foam: #BFE3E0;
  --error: #A3261B;
  --display: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.2rem + 1.4vw, 2rem);
  --step-3: clamp(2.1rem, 1.5rem + 3vw, 3.4rem);
  --step-4: clamp(2.8rem, 1.6rem + 6vw, 6rem);
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --wrap: 72rem;
  --radius: 6px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 var(--step-0)/1.6 var(--body); }
img { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.02; letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--cream); padding: 10px 14px; z-index: 20; border-radius: var(--radius); }
.skip:focus { left: var(--gutter); }
[id] { scroll-margin-top: 16px; }

/* preview build only */
.preview-strip { background: var(--ink); color: var(--cream); font-size: 0.85rem; text-align: center; padding-block: 6px; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.ph { text-decoration: underline dotted 2px; text-decoration-color: var(--sun); text-underline-offset: 4px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border: 0; border-radius: var(--radius); font: 700 1rem/1 var(--body); text-decoration: none; cursor: pointer; transition: transform .15s ease, background-color .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-sun { background: var(--sun); color: var(--ink); }
.btn-sun:hover { background: #F6AB4E; }
.btn-ink { background: var(--ink); color: var(--cream); }
.btn-ink:hover { background: #2B3E48; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* header */
.top { padding-block: 14px; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 800 1.45rem/1 var(--display); letter-spacing: -0.02em; }
.brand svg { width: 44px; height: 44px; flex: none; }
.top .btn { min-height: 44px; padding: 0 16px; font-size: .95rem; }

/* hero */
.hero { position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; align-items: end; gap: 24px; padding-top: clamp(16px, 4vw, 48px); }
.hero-copy { padding-bottom: clamp(96px, 12vw, 150px); position: relative; z-index: 2; min-width: 0; }
.hero h1 { font-size: var(--step-4); }
.hero h1 em { font-style: normal; color: var(--lake); }
.hero-lede { margin-top: 18px; font-size: var(--step-1); max-width: 34ch; color: var(--ink-soft); }
.hero-actions { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-actions .tag { font-weight: 700; color: var(--lake); }
.sun { position: relative; justify-self: center; width: min(100%, 520px); aspect-ratio: 1; margin-bottom: -18%; border-radius: 50%; background: var(--sun); padding: 4%; z-index: 0; }
.sun-inner { position: relative; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: var(--sun); }
.sun-inner svg, .sun-inner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ridge { position: relative; z-index: 1; display: block; width: 100%; height: clamp(70px, 9vw, 120px); margin-top: -1px; }

/* lake section: contest */
.lake { background: var(--lake); color: var(--cream); padding-block: 8px clamp(56px, 8vw, 96px); position: relative; }
.waves { display: block; width: 100%; height: 34px; }
.contest-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px 40px; margin-top: 28px; }
.contest-head h2 { font-size: var(--step-3); }
.contest-dates { font-weight: 700; font-size: var(--step-1); }
.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: s; }
.steps li { counter-increment: s; border-top: 2px solid var(--foam); padding-top: 14px; min-width: 0; }
.steps li::before { content: counter(s); display: block; font: 800 clamp(3rem, 6vw, 4.5rem)/1 var(--display); color: var(--sun-light); margin-bottom: 8px; }
.steps h3 { font-size: var(--step-1); margin-bottom: 6px; letter-spacing: -0.01em; }
.steps p { color: #E3F1EF; }
.prize { margin-top: 44px; display: grid; grid-template-columns: auto 1fr; gap: 6px 24px; align-items: baseline; border: 2px solid var(--foam); border-radius: var(--radius); padding: 20px 22px; }
.prize dt { font-weight: 700; color: #E3F1EF; }
.prize dd { margin: 0; font-size: var(--step-1); font-weight: 700; }

/* entry form */
.entry { padding-block: clamp(56px, 8vw, 96px); background: var(--paper); }
.entry-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.entry h2 { font-size: var(--step-3); }
.entry-side p { margin-top: 16px; max-width: 36ch; color: var(--ink-soft); }
.entry-side .alt { margin-top: 24px; padding-top: 16px; border-top: 1px solid #E4D8C3; }
form { display: grid; gap: 18px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 6px; min-width: 0; }
label, .label { font-weight: 700; font-size: .98rem; }
.opt { font-weight: 400; color: var(--ink-soft); }
input[type=text], input[type=email], select { width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; color: var(--ink); background: #fff; border: 2px solid #CDBFA8; border-radius: var(--radius); }
input:focus-visible, select:focus-visible { outline: 3px solid var(--sun); outline-offset: 1px; border-color: var(--ink); }
.field.bad input, .field.bad select, .drop.bad { border-color: var(--error); }
.err { color: var(--error); font-size: .92rem; font-weight: 600; }
.err:empty { display: none; }
.drop { position: relative; display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: center; padding: 14px; border: 2px dashed #CDBFA8; border-radius: var(--radius); background: #fff; cursor: pointer; }
.drop:hover, .drop:focus-within { border-color: var(--ink); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.thumb { width: 96px; height: 96px; border-radius: 50%; background: var(--cream); overflow: hidden; display: grid; place-items: center; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb svg { width: 56px; height: 56px; }
.drop strong { display: block; }
.drop span { color: var(--ink-soft); font-size: .92rem; }
.check { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; font-weight: 400; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--lake); }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.status { border-radius: var(--radius); padding: 14px 16px; font-weight: 600; }
.status:empty { display: none; }
.status.ok { background: #E1F0EC; color: #17463A; }
.status.fail { background: #F8E3E0; color: var(--error); }
.status.note { background: var(--cream); color: var(--ink); }

/* newsletter */
.news { background: var(--ink); color: var(--cream); padding-block: clamp(48px, 7vw, 80px); }
.news-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.news h2 { font-size: var(--step-3); }
.news p { margin-top: 12px; color: #D5DDE0; max-width: 40ch; }
.news form { grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.news .field { grid-column: 1 / -1; }
.news .inline { display: flex; gap: 10px; }
.news .inline input { flex: 1; min-width: 0; border-color: #5E6F77; }
.news .small { grid-column: 1 / -1; font-size: .9rem; color: #B8C4C8; }
.news .status.ok { background: #24443C; color: #DDF2EC; }
.news .status.fail { background: #4A2522; color: #FFD9D4; }
.news .status.note { background: #2B3E48; color: var(--cream); }

/* footer */
.foot { padding-block: 48px 40px; background: var(--cream); }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; }
.foot h3 { font-size: 1rem; font-family: var(--body); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 10px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot .pedro { max-width: 38ch; color: var(--ink-soft); margin-top: 12px; }
.foot .legal { margin-top: 40px; padding-top: 16px; border-top: 1px solid #E4D8C3; font-size: .9rem; color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: 8px 20px; }
.sponsor-slot { border: 2px dashed #CDBFA8; border-radius: var(--radius); padding: 14px; color: var(--ink-soft); }

/* text pages */
.doc { padding-block: 32px 72px; }
.doc .wrap { max-width: 46rem; }
.doc h1 { font-size: var(--step-3); margin-bottom: 8px; }
.doc h2 { font-size: var(--step-1); margin: 32px 0 8px; letter-spacing: -0.01em; }
.doc p, .doc li { color: var(--ink); }
.doc p + p { margin-top: 12px; }
.doc ul, .doc ol { padding-left: 1.2em; display: grid; gap: 6px; }
.doc .meta { color: var(--ink-soft); }
.doc .draft { background: #FFF1DC; border-left: 4px solid var(--sun); padding: 12px 14px; margin: 16px 0 8px; border-radius: 2px; }

/* phones */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 8px; }
  .sun { width: min(78%, 400px); margin-top: 8px; margin-bottom: -22%; }
  .steps { grid-template-columns: 1fr; gap: 22px; }
  .steps li::before { font-size: 3rem; }
  .entry-grid, .news-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .row2 { grid-template-columns: 1fr; }
  .prize { grid-template-columns: 1fr; }
  .brand span { font-size: 1.25rem; }
  .top .btn { padding: 0 12px; }
  .news .inline { flex-direction: column; }
}

/* private admin page */
.admin .wrap.wide { max-width: 72rem; }
.admin h1 { margin-top: 20px; }
.admin-grid { margin-top: 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 20px; }
.entry-card { background: var(--paper); border: 1px solid #E4D8C3; border-radius: var(--radius); overflow: hidden; display: grid; }
.entry-card img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--cream); }
.entry-card .body { padding: 14px; display: grid; gap: 6px; }
.entry-card h2 { font-size: var(--step-1); margin: 0; }
.entry-card .who { color: var(--ink-soft); font-size: .95rem; overflow-wrap: anywhere; }
.entry-card .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.entry-card .btn { min-height: 44px; padding: 0 14px; font-size: .92rem; }
.news .btn-ink { background: transparent; color: var(--cream); box-shadow: inset 0 0 0 2px var(--foam); }
.news .btn-ink:hover { background: #2B3E48; }
