/*
 * Shared stylesheet for both the maker-page template and the home page
 * (requirements Section 5.6, 6; design DESIGN.md Section 3).
 *
 * A maker's chosen color scheme/font (5.7, 5.8) are resolved server-side
 * (render Lambda) into these CSS custom properties, set inline on <html>
 * per request — swapping a scheme or font is a single attribute change,
 * not a rule rewrite. Defaults here are the warm-neutral scheme so the
 * home page (which has no maker theme) still renders correctly.
 */

:root {
  --color-background: #F3EDE4;
  --color-text: #2E3A46;
  --color-button: #FFFFFF;
  --color-button-text: #2E3A46;
  --font-family: Inter, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-family);
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

.page {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  text-align: center;
}

.hero-image {
  display: block;
  width: 100%;
  max-width: 480px;
  height: 160px;
  object-fit: cover;
  margin: 0 auto;
  /* Same treatment as .logo below, for a consistent look between the two
     theme-colored image borders. */
  border: 5px solid var(--color-button);
  border-radius: 12px;
}

.logo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  /* Matches each color scheme's accent (--color-button is a real accent for
     earthy-clay/sage-cool/citrus-pop, and already white for warm-neutral/
     bold-contrast and the home page's :root default) -- one property gets
     both "match the theme" and "default to white" for free. */
  border: 5px solid var(--color-button);
  background: var(--color-background);
  margin-top: -48px;
}

.title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 12px 0 4px;
}

.tagline {
  font-style: italic;
  opacity: 0.8;
  margin: 0 0 12px;
}

.description {
  font-size: 0.95rem;
  margin: 0 0 24px;
}

.buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--color-button);
  color: var(--color-button-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 20px;
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/*
 * Icon recoloring (requirements 5.4, 5.7): one monochrome SVG file,
 * recolored per maker via CSS mask rather than needing a separately
 * -colored image for every color scheme. `currentColor` picks up the
 * inherited `color` from .button, so no extra custom property is needed
 * just for this. Icon URL is set per-instance via the --icon-url custom
 * property (inline style on each .icon element, render Lambda).
 */
.icon {
  /* Pinned to the button's left edge (not inline with the label) so the
     label stays centered regardless of icon presence — the label span is
     the only element left in .button's flex row once this is taken out
     of flow. */
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask-image: var(--icon-url);
  mask-image: var(--icon-url);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
}

.save-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--color-button);
  color: var(--color-button-text);
  border: none;
  border-radius: 999px;
  padding: 14px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
}

.save-contact-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Home page (5.2) reuses .page/.title but has no maker theme applied —
   relies entirely on the :root defaults above. */
.home-content {
  text-align: left;
}

.home-content h1 {
  text-align: center;
}
