/* Exceed Coding: studio home. Plain CSS, no build step. */

:root {
  color-scheme: light;
  --bg: #faf8f5;          /* off-white page */
  --surface: #ffffff;     /* card body */
  --text: #17171a;        /* near-black, 16.9:1 on --bg */
  --muted: #55555c;       /* secondary text, 7.0:1 on --bg, 7.5:1 on --surface */
  --accent: #b93a0b;      /* logo orange, darkened for text: links and focus, 5.4:1 on --bg */
  --line: #e4e0d8;        /* hairlines (decorative) */
  --radius: 18px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;

  /* Each app's colours, used only for the decorative band at the top of its card. */
  --dawnmark-band: linear-gradient(120deg, #ff5c7c 0%, #ff8a5c 42%, #6540ff 100%);
  /* Hami brand colours from hami.exceedcoding.app (--butter, --sand, --teal). */
  --hami-band: linear-gradient(120deg, #FFD46B 0%, #FBE7C9 55%, #1F6F70 100%);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--text);
  color: #ffffff;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}

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

.wrap {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */

.site-header {
  padding: 1.5rem 0 0;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.wordmark img {
  width: auto;
  height: 34px;
  /* logo.svg carries its own clear space (40 units); pull it back to the page edge. */
  margin-left: -6px;
}

/* Intro */

.intro {
  padding: 3.5rem 0 2.5rem;
}

.intro h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(2.1rem, 1.5rem + 3vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.lead {
  margin: 0;
  max-width: 34rem;
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.35rem);
  color: var(--muted);
}

/* Apps */

.apps {
  padding-bottom: 4rem;
}

.section-title {
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.app-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 46rem) {
  .app-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
  }
}

.app-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.app-band {
  height: 5.5rem;
  background: var(--band);
}

.app-card--hami {
  --band: var(--hami-band);
}

.app-card--dawnmark {
  --band: var(--dawnmark-band);
}

.app-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0 1.5rem 1.5rem;
}

.app-icon {
  display: block;
  width: 88px;
  height: 88px;
  margin-top: -44px;
  border-radius: 22.5%; /* close to the iOS icon shape */
  background: #ececec;
  box-shadow: 0 0 0 4px var(--surface), 0 6px 18px rgb(23 23 26 / 0.12);
}

.app-card h3 {
  margin: 1rem 0 0.35rem;
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.app-card p {
  margin: 0 0 0.75rem;
}

.app-meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.app-social {
  color: var(--muted);
  font-size: 0.95rem;
}

.app-social a {
  white-space: nowrap;
}

.app-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: auto;
  padding-top: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-size: 0.975rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.btn--primary {
  background: var(--text);
  color: #ffffff;
  border: 1px solid var(--text);
}

.btn--primary:hover {
  background: #33333a;
}

.btn--secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid #8a8a90; /* 3.4:1 against white, visible control edge */
}

.btn--secondary:hover {
  border-color: var(--text);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: #f1eee8;
  color: var(--muted);
  font-size: 0.975rem;
  font-weight: 600;
  line-height: 1.2;
}

/* Plain text pages (privacy, 404) */

.prose {
  max-width: 40rem;
  padding: 3rem 0 4rem;
}

.prose h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.9rem, 1.5rem + 2vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.prose h2 {
  margin: 2rem 0 0.5rem;
  font-size: 1.2rem;
}

.prose p,
.prose ul {
  margin: 0 0 1rem;
}

.prose li + li {
  margin-top: 0.35rem;
}

.updated {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Footer */

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

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: space-between;
}

.site-footer p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: no-preference) {
  .btn {
    transition: background-color 120ms ease, border-color 120ms ease;
  }
}
