/* upandup.tech
   One accent (teal), light and dark themes from the system setting.
   Radius rule: buttons and inputs 10px, cards and panels 14px. */

@font-face {
  font-family: "Geist";
  src: url("/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #f6f7f7;
  --surface: #fdfefe;
  --surface-tint: #e5f1ee;
  --text: #111716;
  --muted: #4a5553;
  --border: #dde3e1;
  --border-strong: #b9c3c0;
  --input-border: #86928f;
  --accent: #0d6e64;
  --accent-hover: #0a5a52;
  --on-accent: #f6fbfa;
  --glow: rgb(13 110 100 / 0.13);
  --ring: rgb(13 110 100 / 0.35);
  --success-bg: #e5f1ee;
  --success-border: #9ccdc4;
  --danger: #b42318;
  --danger-bg: #fdeceb;
  --danger-border: #f0b3ac;
  --radius: 14px;
  --radius-sm: 10px;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1110;
    --surface: #121a18;
    --surface-tint: #0f2521;
    --text: #e7eeec;
    --muted: #a2b0ac;
    --border: #22302d;
    --border-strong: #3a4b46;
    --input-border: #5d706a;
    --accent: #3cc9b5;
    --accent-hover: #66d9c8;
    --on-accent: #052a25;
    --glow: rgb(60 201 181 / 0.1);
    --ring: rgb(60 201 181 / 0.4);
    --success-bg: #0f2521;
    --success-border: #1f5d53;
    --danger: #ff8f80;
    --danger-bg: #2a1513;
    --danger-border: #6e2c25;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  text-wrap: balance;
}

p {
  margin: 0;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 10;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.375rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-size: 1rem;
  font-weight: 550;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.button:hover {
  background: var(--accent-hover);
}

.button:active {
  transform: translateY(1px);
}

.button:focus-visible,
.nav-link:focus-visible,
.wordmark:focus-visible,
a:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

.button[disabled] {
  opacity: 0.7;
  cursor: progress;
}

.button-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.button-ghost:hover {
  background: var(--surface);
  border-color: var(--muted);
}

.button-small {
  min-height: 40px;
  padding: 0 1rem;
  font-size: 0.9375rem;
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 68px;
}

.wordmark {
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 4px;
}

.wordmark span {
  color: var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  color: var(--muted);
  font-size: 0.9375rem;
  text-decoration: none;
  border-radius: 4px;
}

.nav-link:hover {
  color: var(--text);
}

@media (max-width: 420px) {
  .nav-link {
    display: none;
  }
}

/* Hero */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(4rem, 10vw, 6rem) 0 clamp(4rem, 9vw, 5.5rem);
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -35%;
  right: -12%;
  width: min(80vw, 820px);
  aspect-ratio: 1;
  background: radial-gradient(closest-side, var(--glow), transparent);
  pointer-events: none;
}

.hero h1 {
  max-width: 18ch;
  font-size: clamp(2.5rem, 1.5rem + 4.2vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.lede {
  max-width: 44ch;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: clamp(1.125rem, 1rem + 0.45vw, 1.3125rem);
  line-height: 1.55;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

/* Sections */

.section {
  padding: clamp(4rem, 8vw, 6rem) 0;
  scroll-margin-top: 1rem;
}

.section h2 {
  margin-bottom: 2rem;
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.section-services {
  border-top: 1px solid var(--border);
}

/* What we do: one larger card and two stacked ones */

.services {
  display: grid;
  gap: 1rem;
}

.service {
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.service .icon {
  display: block;
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.service h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1.1875rem;
  letter-spacing: -0.01em;
}

.service p {
  max-width: 46ch;
  color: var(--muted);
}

.service-feature {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  border-color: transparent;
  background: var(--surface-tint);
}

.service-feature .icon {
  width: 40px;
  height: 40px;
}

.service-feature h3 {
  margin-top: 0;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.service-feature p {
  color: var(--text);
  opacity: 0.85;
}

@media (min-width: 820px) {
  .services {
    grid-template-columns: 1.15fr 1fr;
  }

  .service-feature {
    grid-row: span 2;
    min-height: 300px;
    padding: 2.25rem;
  }
}

/* Contact */

.section-contact {
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.contact-grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: 5fr 7fr;
    gap: 4rem;
    align-items: start;
  }
}

.contact-intro h2 {
  margin-bottom: 1rem;
}

.contact-intro p {
  max-width: 40ch;
  color: var(--muted);
}

.contact-intro p + p {
  margin-top: 1rem;
}

.contact-form {
  display: grid;
  gap: 1.25rem;
}

.field-row {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 600px) {
  .field-row {
    grid-template-columns: 1fr 1fr;
  }
}

.field {
  display: grid;
  gap: 0.5rem;
  align-content: start;
}

label {
  font-size: 0.9375rem;
  font-weight: 550;
}

.optional {
  color: var(--muted);
  font-weight: 400;
}

input,
textarea {
  width: 100%;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  line-height: 1.5;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea {
  min-height: 160px;
  resize: vertical;
}

input:hover,
textarea:hover {
  border-color: var(--muted);
}

input:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--danger);
}

.field-error {
  color: var(--danger);
  font-size: 0.875rem;
}

.field-error:empty {
  display: none;
}

/* Honeypot: off screen, out of the tab order */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.form-note {
  flex: 1 1 16rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.form-note a {
  color: inherit;
  text-underline-offset: 2px;
}

.form-status,
.notice {
  padding: 0.875rem 1rem;
  border: 1px solid;
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.form-status:empty {
  display: none;
}

.form-status.is-success,
.notice-success {
  border-color: var(--success-border);
  background: var(--success-bg);
  color: var(--text);
}

.form-status.is-error,
.notice-error {
  border-color: var(--danger-border);
  background: var(--danger-bg);
  color: var(--text);
}

/* Shown only after a form post without JavaScript */
.notice {
  display: none;
}

.notice:target {
  display: block;
}

/* Footer */

.site-footer {
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
}

.legal {
  max-width: 80ch;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 0.75rem;
}

.site-footer a {
  color: var(--muted);
  text-underline-offset: 2px;
}

.site-footer a:hover {
  color: var(--text);
}

/* Privacy notice and other text pages */

.prose {
  max-width: 68ch;
  padding-block: clamp(3rem, 7vw, 5rem);
}

.prose h1 {
  font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.prose .updated {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.prose h2 {
  margin: 2.25rem 0 0.5rem;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.prose p + p {
  margin-top: 0.75rem;
}

.prose .intro {
  margin-top: 1.5rem;
}

.prose .back {
  margin-top: 2.5rem;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

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