:root {
  --accent: #1f4fd8;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --text: #14171c;
  --muted: #5b6573;
  --line: #e4e7ec;
  --radius: 16px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #171a20;
    --text: #f1f3f6;
    --muted: #9aa3b0;
    --line: #262b33;
  }
}

/* Accent used for text/icons: lightened in dark mode for contrast */
:root { --accent-ui: var(--accent); }
@media (prefers-color-scheme: dark) {
  :root { --accent-ui: color-mix(in srgb, var(--accent) 60%, #ffffff); }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.card {
  max-width: 480px;
  margin: 0 auto;
  padding: 32px 16px calc(32px + env(safe-area-inset-bottom));
}

.loading { text-align: center; color: var(--muted); }

/* Header */
.header { text-align: center; padding: 8px 8px 24px; }

.logo {
  width: 96px; height: 96px;
  border-radius: 24px;
  object-fit: contain;
  background: var(--surface);
  border: 1px solid var(--line);
  display: block;
  margin: 0 auto 20px;
}

.initials {
  width: 96px; height: 96px;
  border-radius: 24px;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 600; letter-spacing: 1px;
  margin: 0 auto 20px;
}

h1 { margin: 0; font-size: 24px; font-weight: 650; letter-spacing: -0.01em; }
.person { margin: 6px 0 0; font-size: 15px; color: var(--text); }
.tagline { margin: 6px 0 0; font-size: 15px; color: var(--muted); }

/* Primary button */
.save {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 16px;
  border: 0; border-radius: 12px;
  background: var(--accent); color: #fff;
  font: inherit; font-weight: 600; font-size: 16px;
  cursor: pointer;
  margin-bottom: 20px;
}
.save:focus-visible, .row:focus-visible, .pill:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}
.save:active { opacity: .9; }

/* Contact rows */
.list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0 0 20px; padding: 0; list-style: none;
}

.row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  color: inherit; text-decoration: none;
  border-top: 1px solid var(--line);
  min-height: 56px;
}
.list li:first-child .row { border-top: 0; }
.row:active { background: var(--bg); }

.icon {
  flex: none;
  width: 36px; height: 36px; border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent-ui);
  display: flex; align-items: center; justify-content: center;
}
.icon svg { width: 18px; height: 18px; }

.row-text { min-width: 0; }
.row-label { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.row-value { display: block; font-size: 15px; overflow-wrap: anywhere; }

/* Sections */
.section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px;
  margin-bottom: 20px;
}
.section h2 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.section p { margin: 0; font-size: 15px; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text); text-decoration: none; font-size: 14px;
}

.footer { text-align: center; font-size: 12px; color: var(--muted); margin-top: 28px; }

/* Hover only on devices that have it (computers) */
@media (hover: hover) {
  .save { transition: filter .15s; }
  .save:hover { filter: brightness(1.08); }
  .row:hover { background: var(--bg); }
  .pill:hover { border-color: var(--accent-ui); color: var(--accent-ui); }
}

/* Tablet: roomier single column */
@media (min-width: 600px) {
  .card { max-width: 560px; padding-top: 56px; }
}

/* Computer: two columns, identity on the left, details on the right */
@media (min-width: 960px) {
  .card {
    max-width: 1040px;
    display: grid;
    grid-template-columns: 340px 1fr;
    column-gap: 56px;
    align-items: start;
    padding: 88px 32px 48px;
  }
  .side { position: sticky; top: 88px; }
  .header { padding-bottom: 28px; }
  .logo, .initials { width: 120px; height: 120px; border-radius: 28px; }
  h1 { font-size: 28px; }
  .footer { grid-column: 1 / -1; margin-top: 56px; }
  .row { padding: 16px 20px; }
  .section { padding: 22px 20px; }
}

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

/* ===== Al Tamam brand layer (matches altamamff.ae) ===== */
:root {
  --navy: #0B1B2B;
  --navy-2: #16202C;
  --gold: #C9A227;
  --bg: #f4f5f7;
  --font: Inter, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --display: Poppins, Inter, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #08131f; --surface: #0f1d2c; --line: #1d2d3f; --muted: #9aa6b4; }
}

/* Navy band behind the identity, like the site's hero */
.header {
  color: #fff;
  background: linear-gradient(180deg, var(--navy), var(--navy-2));
  margin: -32px -16px 24px;
  padding: 40px 20px 32px;
  border-radius: 0 0 28px 28px;
}
.header h1 { font-family: var(--display); font-weight: 700; line-height: 1.25; }
.header .tagline { color: rgba(255,255,255,.72); }
.logo { width: 112px; height: 104px; padding: 6px; background: #fff; border: 0; box-shadow: 0 8px 24px rgba(0,0,0,.35); }

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 14px 0 0; padding: 6px 12px;
  border: 1px solid rgba(201,162,39,.55); border-radius: 999px;
  color: #fff; font-size: 12.5px; font-weight: 500;
  background: rgba(255,255,255,.05);
}
.badge::before { content: "★"; color: var(--gold); }

.save { background: var(--accent); box-shadow: 0 6px 18px rgba(216,35,42,.3); }
.section h2 { color: var(--accent-ui); }

.services { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.services li { position: relative; padding-left: 20px; font-size: 15px; }
.services li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 8px; height: 8px; border-radius: 2px; background: var(--accent);
}

/* Computer: navy panel on the left column */
@media (min-width: 960px) {
  .header { background: none; margin: 0; padding: 8px 8px 28px; border-radius: 0; }
  .side {
    background: linear-gradient(160deg, var(--navy), var(--navy-2));
    border-radius: 24px; padding: 32px 24px 24px;
    box-shadow: 0 20px 40px rgba(11,27,43,.18);
  }
  .logo { width: 132px; height: 120px; }
  .header h1 { font-size: 24px; }
  .side .save { margin-bottom: 0; }
  .services { grid-template-columns: 1fr 1fr; gap: 12px 24px; }
}
