/* The sdex.dev home, contact and 404 pages, on top of /iap/styles.css (colors, type, buttons, fields). */
:root { --ease: cubic-bezier(.22, 1, .36, 1); }  /* --mono (IBM Plex Mono) comes from /iap/styles.css */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; -webkit-tap-highlight-color: transparent; }
main, .footer { width: min(560px, calc(100% - 40px - env(safe-area-inset-left) - env(safe-area-inset-right))); }
main { flex: 1 0 auto; }

/* Who: photo, name, role and profiles, aligned left like the /id and /iap heroes */
.profile { padding-top: clamp(48px, 10vh, 96px); }
.photo { display: block; width: 64px; height: 64px; margin-bottom: 24px; border-radius: 50%; object-fit: cover; background: var(--line); }
.profile .code { margin-bottom: 16px; color: var(--muted); font: 500 .875rem/1.4 var(--mono); }
.profile h1 { font-size: clamp(2.25rem, 8vw, 2.75rem); font-weight: 600; line-height: 1.08; letter-spacing: -.02em; }
.profile .lede { max-width: 32rem; margin-top: 8px; font-size: 1.125rem; }
.social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.social a {
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid var(--line); border-radius: 50%;
  color: var(--muted); font-size: 1.125rem; text-decoration: none;
  transition: color .15s var(--ease), border-color .15s var(--ease), background-color .15s var(--ease);
}

/* The apps: their own icons are the only color on the page, and each shows its package name like adb does */
.section-label { margin: 48px 0 12px; color: var(--muted); font-size: .875rem; font-weight: 500; letter-spacing: 0; line-height: 1.4; }
.apps { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.apps-first { margin-top: 40px; }
.app {
  display: flex; align-items: center; gap: 16px; padding: 16px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--surface);
  text-decoration: none;
  transition: border-color .15s var(--ease), transform .15s var(--ease);
}
.app img { flex: none; width: 56px; height: 56px; }
.app div { flex: 1; min-width: 0; }
.app h3 { font-size: 1.0625rem; font-weight: 500; line-height: 1.4; }
.app p { color: var(--muted); font-size: .9375rem; line-height: 1.4; }
.app .pkg { margin-top: 4px; font: 400 .75rem/1.33 var(--mono); overflow-wrap: anywhere; }
.app .go { flex: none; color: var(--muted); transition: transform .15s var(--ease), color .15s var(--ease); }
/* Instant Apply hangs off Device ID Changer: it is that app's plugin, not an app of its own */
.plugin { position: relative; margin-left: 44px; }
.plugin::before {
  content: ""; position: absolute; top: -9px; left: -16px; width: 15px; height: calc(50% + 9px);
  border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); border-bottom-left-radius: 8px;
}

.more-links { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 16px; }
.more-links-after { margin-top: 32px; }
.more-links a { padding: 8px 0; color: var(--accent); font-weight: 500; text-decoration: none; }
.footer { padding: 48px 0 calc(32px + env(safe-area-inset-bottom)); }

.app:active { transform: scale(.98); }
.social a:active { background: var(--surface); }
@media (hover: hover) {
  .social a:hover { color: var(--ink); border-color: var(--muted); background: var(--surface); }
  .app:hover { border-color: var(--muted); }
  .app:hover .go { color: var(--ink); transform: translateX(4px); }
  .more-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
}
@media (max-width: 400px) {
  .app { gap: 12px; padding: 12px; }
  .app img { width: 48px; height: 48px; }
  .plugin { margin-left: 32px; }
  .plugin::before { left: -12px; width: 11px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .profile { padding-top: 32px; }
  .section-label { margin-top: 32px; }
}

/* Contact form */
.contact { margin-top: 40px; }
.contact form { display: grid; gap: 20px; }
.contact form[hidden], .contact .sent[hidden] { display: none; }
.field input { background: var(--surface); font-size: 16px; }
.field textarea {
  width: 100%; min-height: 160px; padding: 12px 16px;
  border: 1px solid var(--line); border-radius: 12px;
  color: var(--ink); background: var(--surface);
  font: inherit; font-size: 16px; line-height: 1.5; resize: vertical;
}
.field input { border-radius: 12px; padding: 0 16px; }
.field textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.field .count { justify-self: end; color: var(--muted); font: 400 .75rem/1.33 var(--mono); }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact .turnstile { min-height: 0; }
.contact .button { width: 100%; }
.contact .note { color: var(--muted); font-size: .875rem; }
.sent { padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.sent .tick { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 16px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 1.125rem; font-weight: 600; }
.sent h2 { margin-bottom: 4px; font-size: 1.25rem; font-weight: 600; }
.sent p { color: var(--muted); }
.sent strong { color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) {
  .app, .app .go, .social a { transition: none; }
  .app:active, .app:hover .go { transform: none; }
}
