@font-face {
  font-family: "Instrument Sans";
  src: url("assets/fonts/InstrumentSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("assets/fonts/InstrumentSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #101411;
  --surface: #171d19;
  --surface-soft: #1d261e;
  --text: #f3f6ef;
  --muted: #a6b3a8;
  --line: #3d4b40;
  --accent: #c8ed91;
  --accent-hover: #d6f7a8;
  --on-accent: #172118;
  --error: #ffaaa0;
  --field: #141a16;
  --page-glow: radial-gradient(circle at 5% 0%, #1b261d 0, transparent 38%);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f6ef;
  --surface: #fffef8;
  --surface-soft: #eaf0e5;
  --text: #1b291d;
  --muted: #506252;
  --line: #c9d3c7;
  --accent: #336d3e;
  --accent-hover: #285934;
  --on-accent: #ffffff;
  --error: #a53531;
  --field: #fffef8;
  --page-glow: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page-glow), var(--bg);
  color: var(--text);
  font: 400 16px/1.6 "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  transition: background-color 240ms ease, color 240ms ease;
}
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
button, a, summary { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:disabled { cursor: wait; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.icon-definitions, .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.icon {
  width: 19px;
  height: 19px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.skip-link {
  position: fixed;
  z-index: 10;
  top: 12px;
  left: 12px;
  padding: 12px 16px;
  background: var(--accent);
  color: var(--on-accent);
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }

.site-header, .contact-layout, .site-footer {
  width: min(1280px, calc(100% - 96px));
  margin-inline: auto;
}
.site-header {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.04em;
}
.brand-sign { margin-right: 10px; color: var(--accent); font-size: 26px; font-weight: 400; }
.brand-period { color: var(--accent); }
.header-right { display: flex; align-items: center; gap: 26px; }
.current-page {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  transition: color 180ms ease;
}
.current-page:hover { color: var(--text); }
.current-page span { color: var(--accent); }
.theme-toggle {
  min-height: 44px;
  min-width: 130px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  transition: border-color 180ms ease, background-color 180ms ease;
}
.theme-toggle:hover { border-color: var(--accent); background: var(--surface-soft); }
.theme-toggle .icon { width: 17px; height: 17px; color: var(--accent); }
:root[data-theme="dark"] .theme-moon,
:root[data-theme="light"] .theme-sun { display: none; }

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(0, .97fr);
  gap: clamp(60px, 8vw, 120px);
  align-items: start;
  padding-block: clamp(68px, 7.5vw, 112px) 96px;
  min-height: calc(100svh - 160px);
}
.intro { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .19em;
}
.small-line { width: 27px; height: 1px; background: var(--accent); transform-origin: left; }
h1 {
  max-width: 670px;
  margin: 42px 0 26px;
  font-size: clamp(55px, 5.1vw, 78px);
  font-weight: 700;
  letter-spacing: -.069em;
  line-height: .98;
}
.title-line { display: block; }
h1 em { color: var(--accent); font-style: normal; font-weight: 700; }
.intro-description {
  max-width: 490px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}
.profile {
  width: 100%;
  max-width: 485px;
  margin-top: 62px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.profile-top { display: flex; align-items: center; gap: 14px; }
.monogram {
  width: 49px;
  height: 49px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}
.profile-name { margin: 0; color: var(--text); font-size: 15px; font-weight: 700; }
.profile-specialty { margin: 1px 0 0; color: var(--muted); font-size: 13px; }
.social-links { display: flex; flex-wrap: wrap; gap: 30px; margin-top: 20px; }
.social-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--accent);
  font-size: 13px;
  transition: color 180ms ease;
}
.social-link:hover { color: var(--accent); }
.social-link .icon { width: 14px; height: 14px; }
.social-link[aria-disabled="true"] { color: var(--muted); border-color: var(--line); cursor: default; }
.social-link[aria-disabled="true"] .icon { display: none; }
.social-link[aria-disabled="true"]::after { content: "Em breve"; font-size: 10px; }
.profile-hint { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.intro-footnote { margin: 53px 0 0; color: var(--muted); font-size: 12px; }
.intro-footnote span { margin-right: 8px; color: var(--accent); }

.form-panel { min-width: 0; scroll-margin-top: 20px; }
.form-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
h2 { margin: 0; font-size: 25px; font-weight: 700; letter-spacing: -.045em; line-height: 1.35; }
h2 > span { color: var(--accent); }
.section-number { color: var(--muted); font-size: 10px; letter-spacing: .11em; white-space: nowrap; }
.mode-notice {
  margin: 21px 0 18px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 0 5px 5px 0;
  background: var(--surface-soft);
}
.mode-label { color: var(--text); font-size: 12px; font-weight: 700; }
.mode-notice p { margin: 2px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.required-note { margin: 0 0 22px; color: var(--muted); font-size: 11px; }

fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { min-width: 0; margin-bottom: 19px; }
.field label { display: block; margin-bottom: 8px; color: var(--text); font-size: 13px; font-weight: 700; }
.field label > span:not(.optional) { color: var(--accent); }
.optional { color: var(--muted); font-size: 12px; font-weight: 400; }
.control-shell {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--field);
  transition: border-color 180ms ease, background-color 180ms ease;
}
.control-shell:hover { border-color: var(--muted); }
.control-shell:focus-within { border-color: var(--accent); }
.control-shell input, .control-shell select, .control-shell textarea {
  width: 100%;
  min-height: 49px;
  display: block;
  padding: 12px 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-size: 15px;
}
.control-shell select { padding-right: 32px; }
.control-shell option { background: var(--surface); color: var(--text); }
.control-shell textarea { min-height: 124px; line-height: 1.55; resize: vertical; }
::placeholder { color: var(--muted); opacity: 1; }
.control-shell :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.focus-line {
  position: absolute;
  z-index: 1;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}
.control-shell:focus-within .focus-line { transform: scaleX(1); }
.field.has-error .control-shell { border-color: var(--error); }
.field.has-error .focus-line { background: var(--error); }
.field-error { margin: 6px 0 0; color: var(--error); font-size: 12px; line-height: 1.4; }
.field-error:empty { margin: 0; }
.message-meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
#message-counter { margin-top: 7px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
fieldset:disabled .control-shell { opacity: .58; }
.submit-button {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  padding: 14px 20px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 15px;
  font-weight: 700;
  transition: background-color 180ms ease, transform 180ms ease;
}
.submit-button:hover { background: var(--accent-hover); }
.submit-button:active { transform: scale(.985); }
.button-symbol { width: 21px; height: 21px; display: grid; place-items: center; }
.button-symbol .icon, .spinner { grid-area: 1 / 1; }
.spinner { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-dasharray: 35 16; stroke-linecap: round; }
.demo-tools { margin-top: 15px; color: var(--muted); font-size: 12px; }
.demo-tools summary { min-height: 40px; width: fit-content; padding-block: 9px; }
.demo-tools label { display: block; margin: 10px 0 6px; color: var(--text); font-weight: 700; }
.demo-tools select { max-width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 5px; background: var(--field); color: var(--text); font-size: 13px; }
.demo-tools p { margin: 8px 0 0; }
.form-status { margin: 13px 0 0; font-size: 13px; line-height: 1.6; }
.form-status:empty { margin: 0; }
.form-status[data-state="error"], .form-status[data-state="invalid"] { padding: 10px 0; color: var(--error); }
.form-status[data-state="sending"] { color: var(--muted); }
.form-bottom { display: flex; align-items: center; gap: 8px; margin-top: 23px; padding-top: 17px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.tiny-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.no-script { color: var(--error); }

.result { min-height: 430px; padding: 30px 0 50px; }
.result-symbol { width: 56px; height: 56px; display: grid; place-items: center; margin-bottom: 26px; border-radius: 50%; background: var(--surface-soft); color: var(--accent); }
.result-symbol .icon { width: 26px; height: 26px; }
.result-kicker { margin: 0 0 13px; color: var(--accent); font-size: 11px; letter-spacing: .12em; }
.result h3 { margin: 0 0 14px; font-size: 38px; font-weight: 700; letter-spacing: -.05em; line-height: 1.12; }
.result > p:not(.result-kicker) { max-width: 400px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.75; }
.text-button { min-height: 44px; margin-top: 28px; padding: 9px 0; display: inline-flex; align-items: center; gap: 15px; border: 0; background: transparent; color: var(--accent); font-size: 14px; font-weight: 700; }
.site-footer { min-height: 77px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.site-footer a { min-height: 44px; display: inline-flex; align-items: center; gap: 10px; }

@media (max-width: 1180px) {
  .site-header, .contact-layout, .site-footer { width: calc(100% - 72px); }
  .contact-layout { gap: 54px; }
  h1 { font-size: clamp(54px, 5.6vw, 70px); }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .section-number { display: none; }
}
@media (max-width: 960px) {
  .site-header, .contact-layout, .site-footer { width: calc(100% - 56px); }
  .contact-layout { grid-template-columns: 1fr; gap: 58px; padding-block: 64px 68px; }
  .intro-description { max-width: 590px; }
  .profile { max-width: 590px; margin-top: 45px; }
  .intro-footnote { display: none; }
  .form-panel { max-width: 700px; width: 100%; padding-top: 36px; border-top: 1px solid var(--line); }
  .field-row { grid-template-columns: 1fr 1fr; gap: 16px; }
  .section-number { display: inline; }
}
@media (max-width: 580px) {
  .site-header, .contact-layout, .site-footer { width: calc(100% - 36px); }
  .site-header { min-height: 74px; }
  .wordmark { font-size: 16px; }
  .header-right { gap: 9px; }
  .current-page { font-size: 12px; }
  .theme-toggle { min-width: 44px; padding: 8px 10px; }
  .theme-toggle #theme-label { display: none; }
  .contact-layout { gap: 45px; padding-block: 52px 48px; }
  .eyebrow { font-size: 9px; letter-spacing: .13em; }
  h1 { margin-top: 31px; font-size: clamp(44px, 10.5vw, 62px); letter-spacing: -.065em; }
  .intro-description { font-size: 15px; }
  .profile { margin-top: 37px; }
  .form-panel { padding-top: 29px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .control-shell input, .control-shell select, .control-shell textarea { font-size: 16px; }
  .section-number { display: none; }
  h2 { font-size: 23px; }
}
@media (max-width: 360px) {
  .current-page { display: none; }
  h1 { font-size: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
