/* Puzzle Tech Studios LLC — corporate website */

:root {
  --ink: #17191d;
  --ink-soft: #2c2f35;
  --graphite: #121417;
  --paper: #f7f3eb;
  --paper-deep: #efe8dc;
  --sand: #b8956a;
  --sand-deep: #9a7a52;
  --text-dark: #1c1e22;
  --text-muted: #5b5751;
  --text-light: #f4efe6;
  --text-light-soft: #c5bfb4;
  --line-dark: rgba(244, 239, 230, 0.14);
  --line-light: rgba(23, 25, 29, 0.1);
  --faith-bg: #f4ebe0;
  --roam-bg: #1a2428;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: "Avenir Next", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --wrap: 1120px;
  --header-h: 4.35rem;
  color-scheme: light dark;
}

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

html {
  background: var(--paper);
  scroll-padding-top: calc(var(--header-h) + 1.25rem);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--text-dark);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1;
}

main:focus {
  outline: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p,
ul,
ol,
address,
figure {
  margin: 0;
}

address {
  font-style: normal;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--sand-deep);
  outline-offset: 3px;
}

:focus:not(:focus-visible) {
  outline: none;
}

::selection {
  background: var(--sand);
  color: var(--ink);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 0;
  z-index: 100;
  transform: translateY(-120%);
  background: var(--paper);
  color: var(--ink);
  padding: 0.7rem 1rem;
  text-decoration: none;
  border-radius: 0 0 8px 8px;
  font-weight: 600;
}

.skip-link:focus {
  transform: none;
}

.wrap {
  width: min(var(--wrap), calc(100% - 2rem));
  margin-inline: auto;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding-top: env(safe-area-inset-top);
  background: rgba(18, 20, 23, 0.96);
  border-bottom: 1px solid var(--line-dark);
  color: var(--text-light);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 1.25rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 44px;
  text-decoration: none;
}

.brand-mark {
  width: 26px;
  height: 26px;
  flex: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  line-height: 1.15;
}

.brand-name {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand-llc {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sand);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.05rem;
  list-style: none;
  padding: 0;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.65rem;
  color: var(--text-light-soft);
  text-decoration: none;
  font-size: 0.92rem;
}

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

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: 4.25rem 0 0;
  background: var(--graphite);
  color: var(--text-light);
  /* Clean hard boundary into the paper apps section — no blurred shadow band */
  border-bottom: 1px solid rgba(244, 239, 230, 0.08);
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.hero-copy {
  padding-bottom: 3.5rem;
  padding-top: 0.5rem;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.35rem, 5.8vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
  max-width: 11em;
}

.hero-lede {
  margin-top: 1.35rem;
  max-width: 36rem;
  color: var(--text-light-soft);
  font-size: clamp(1.02rem, 1.6vw, 1.15rem);
  line-height: 1.65;
  text-wrap: pretty;
}

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

.hero-visual {
  display: none;
  position: relative;
  min-height: 0;
  justify-content: center;
  align-items: flex-end;
  gap: 0.85rem;
  padding: 1.5rem 1rem 2rem;
  overflow: visible;
}

.hero-phone {
  margin: 0;
  flex: 0 0 auto;
  width: min(41%, 204px);
  transform-origin: 50% 100%;
}

.hero-phone--faith {
  z-index: 1;
  transform: translateX(4%) rotate(-0.65deg);
}

.hero-phone--roam {
  z-index: 2;
  transform: translateX(-4%) rotate(0.5deg);
}

.iphone-frame {
  position: relative;
  width: 100%;
  border-radius: 2.05rem;
  overflow: hidden;
  background: #0b0c0e;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 12px 26px rgba(0, 0, 0, 0.26),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  padding: 0.72rem 0.5rem 0.78rem;
}

.iphone-island {
  position: absolute;
  top: 0.52rem;
  left: 50%;
  z-index: 2;
  width: 32%;
  max-width: 4.6rem;
  height: 0.7rem;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #050505;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

/* Identical screen mask for both devices */
.iphone-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 470 / 1024;
  border-radius: 1.2rem;
  overflow: hidden;
  background: #0b0c0e;
}

.iphone-screen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.btn--primary {
  background: var(--paper);
  color: var(--ink);
}

.btn--primary:hover {
  background: #fff;
}

.btn--ghost {
  border: 1px solid rgba(244, 239, 230, 0.28);
  color: var(--text-light);
}

.btn--ghost:hover {
  border-color: rgba(244, 239, 230, 0.55);
  background: rgba(244, 239, 230, 0.05);
}

.btn--store {
  background: var(--ink);
  color: var(--text-light);
}

.btn--store:hover {
  background: var(--ink-soft);
}

.app-card--roam .btn--store {
  background: #0f1618;
  border: 1px solid rgba(126, 176, 173, 0.35);
}

.app-card--roam .btn--store:hover {
  background: #152022;
}

.app-card--faith .btn--store {
  background: #2a241c;
}

/* Sections */

.section {
  padding: 4.5rem 0;
}

.section--paper {
  background: var(--paper);
  color: var(--text-dark);
  border-top: 0;
}

.section--soft {
  background: var(--paper-deep);
  color: var(--text-dark);
  border-top: 1px solid var(--line-light);
  border-bottom: 1px solid var(--line-light);
}

.section--ink {
  background: var(--graphite);
  color: var(--text-light);
}

.section-head {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 2.25rem;
  max-width: 42rem;
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sand-deep);
}

.section--ink .eyebrow {
  color: var(--sand);
}

.section-head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 3.5vw, 2.85rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.section-intro {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  text-wrap: pretty;
}

.section--ink .section-intro {
  color: var(--text-light-soft);
}

/* Apps */

.app-grid {
  display: grid;
  gap: 1.35rem;
}

.app-card {
  display: grid;
  gap: 1.25rem;
  padding: 1.2rem;
  border-radius: 22px;
  border: 1px solid transparent;
  overflow: hidden;
  min-height: 100%;
}

.app-card--faith {
  background: linear-gradient(165deg, #fffaf4 0%, var(--faith-bg) 100%);
  border-color: rgba(184, 149, 106, 0.28);
  color: #2a241c;
}

.app-card--roam {
  background: linear-gradient(160deg, #152024 0%, var(--roam-bg) 100%);
  border-color: rgba(126, 176, 173, 0.22);
  color: #eef5f4;
}

.app-media {
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding: 0;
  border-radius: 14px;
  overflow: hidden;
  background: transparent;
}

.app-card--faith .app-media {
  background: linear-gradient(180deg, rgba(235, 225, 210, 0.55) 0%, rgba(223, 209, 188, 0.35) 100%);
}

.app-card--roam .app-media {
  background: linear-gradient(180deg, rgba(16, 24, 27, 0.55) 0%, rgba(28, 43, 48, 0.4) 100%);
}

/* Promo assets already include device framing — preserve aspect ratio */
.app-shot {
  display: block;
  width: 100%;
  height: auto;
  max-width: 280px;
  object-fit: contain;
  object-position: center bottom;
}

.app-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0 0.15rem 0.2rem;
}

.app-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.app-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  flex: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.app-kicker {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.app-card--faith .app-kicker {
  color: var(--sand-deep);
}

.app-card--roam .app-kicker {
  color: #7eb0ad;
}

.app-card h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.55rem, 2.4vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.app-copy {
  font-size: 1.01rem;
  line-height: 1.6;
}

.app-card--faith .app-copy {
  color: #4d453a;
}

.app-card--roam .app-copy {
  color: #c5d4d3;
}

.feature-list {
  display: grid;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin-top: 0.2rem;
}

.feature-list li {
  display: flex;
  gap: 0.7rem;
  align-items: baseline;
  font-size: 0.95rem;
}

.feature-list li::before {
  content: "";
  width: 0.38rem;
  height: 0.38rem;
  margin-top: 0.45rem;
  border-radius: 50%;
  flex: none;
}

.app-card--faith .feature-list li::before {
  background: var(--sand-deep);
}

.app-card--roam .feature-list li::before {
  background: #7eb0ad;
}

.app-card--faith .feature-list {
  color: #433b31;
}

.app-card--roam .feature-list {
  color: #d5e2e1;
}

.app-actions {
  margin-top: auto;
  padding-top: 1rem;
}

/* About */

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

.about-lead {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.015em;
  text-wrap: pretty;
  max-width: 40rem;
}

.about-body {
  margin-top: 1.1rem;
  color: var(--text-muted);
  max-width: 40rem;
}

.about-body + .about-body {
  margin-top: 0.9rem;
}

.activity-title {
  margin-top: 2.1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sand-deep);
}

.activity-list {
  list-style: none;
  margin-top: 0.85rem;
  padding: 0;
  border-top: 1px solid var(--line-light);
  max-width: 34rem;
}

.activity-list li {
  display: grid;
  grid-template-columns: 2.1rem 1fr;
  gap: 0.85rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line-light);
  align-items: baseline;
}

.activity-list span {
  color: var(--sand-deep);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}

.identity {
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--line-light);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.42);
}

.identity h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 0.85rem;
}

.identity dl {
  display: grid;
  gap: 0;
  margin: 0;
}

.identity div {
  display: grid;
  gap: 0.15rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line-light);
}

.identity div:first-child {
  padding-top: 0;
}

.identity div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.identity dt {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.identity dd {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.4;
}

.identity a {
  text-decoration: underline;
  text-decoration-color: var(--sand-deep);
  text-underline-offset: 0.16em;
}

/* Contact */

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 40rem;
  border-top: 1px solid var(--line-dark);
}

.contact-list li {
  display: grid;
  gap: 0.25rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--line-dark);
}

.contact-list span {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sand);
}

.contact-list a {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.4vw, 1.6rem);
  letter-spacing: -0.02em;
  text-decoration: underline;
  text-decoration-color: var(--sand);
  text-underline-offset: 0.14em;
  overflow-wrap: anywhere;
}

/* Footer */

.site-footer {
  background: var(--ink);
  color: var(--text-light-soft);
  padding: 2.5rem 0 calc(2rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line-dark);
}

.footer-top {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1.5rem;
}

.footer-brand {
  color: var(--text-light);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.footer-tag,
.footer-place {
  font-size: 0.95rem;
}

.footer-email {
  margin-top: 0.35rem;
}

.footer-email a {
  color: var(--text-light);
  text-decoration: underline;
  text-decoration-color: var(--sand);
  text-underline-offset: 0.16em;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.15rem;
  margin-bottom: 1.5rem;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-light);
  text-decoration: underline;
  text-decoration-color: var(--sand);
  text-underline-offset: 0.18em;
  font-size: 0.94rem;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line-dark);
  font-size: 0.9rem;
}

/* Legal pages */

.page {
  padding: 4.25rem 0 5rem;
  background: var(--paper);
  color: var(--text-dark);
}

.page-intro h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.3rem, 4.8vw, 3.5rem);
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.updated {
  margin-top: 0.85rem;
  color: var(--text-muted);
}

.draft-note {
  margin-top: 1.2rem;
  max-width: 40rem;
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--sand);
  background: rgba(184, 149, 106, 0.12);
  color: var(--text-muted);
  font-size: 0.95rem;
}

.prose {
  max-width: 40rem;
  margin-top: 2.15rem;
}

.prose h2 {
  margin-top: 2.25rem;
  margin-bottom: 0.7rem;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.prose p + p,
.prose ul + p {
  margin-top: 1rem;
}

.prose ul {
  margin: 0.85rem 0 0;
  padding-left: 1.2rem;
}

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

.prose a {
  text-decoration: underline;
  text-decoration-color: var(--sand-deep);
  text-underline-offset: 0.18em;
}

/* Layout */

@media (min-width: 760px) {
  .wrap {
    width: min(var(--wrap), calc(100% - 4rem));
  }

  .brand-text {
    flex-direction: row;
    align-items: baseline;
    gap: 0.45rem;
  }

  .brand-llc {
    font-size: 0.72rem;
  }

  .hero {
    padding-top: 5.5rem;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(18rem, 1fr);
    gap: 1.5rem 2.25rem;
    align-items: center;
  }

  .hero-copy {
    padding-bottom: 3.75rem;
  }

  .hero-visual {
    display: flex;
    min-height: 28rem;
  }

  .section {
    padding: 5.5rem 0;
  }

  .app-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.35rem;
    align-items: stretch;
  }

  .app-card {
    grid-template-columns: minmax(13rem, 1fr) minmax(0, 1.05fr);
    grid-template-rows: auto;
    align-items: start;
    gap: 1.1rem;
    padding: 1rem;
  }

  .app-media {
    min-height: 0;
    width: 100%;
    padding: 0.4rem 0.3rem 0;
  }

  .app-shot {
    max-width: none;
    width: 100%;
  }

  .about-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(15rem, 0.75fr);
    gap: 2.5rem;
    align-items: start;
  }

  .identity div {
    grid-template-columns: 7.5rem minmax(0, 1fr);
    column-gap: 0.85rem;
    align-items: baseline;
  }

  .page {
    padding: 5.75rem 0 6.5rem;
  }
}

@media (min-width: 980px) {
  .hero-phone {
    width: 208px;
  }

  .iphone-frame {
    border-radius: 2.15rem;
    padding: 0.7rem 0.55rem 0.75rem;
  }

  .iphone-screen {
    border-radius: 1.25rem;
  }

  .app-card {
    grid-template-columns: minmax(14.5rem, 1.05fr) minmax(0, 1fr);
    gap: 1.2rem;
    padding: 1.1rem;
  }

  .app-media {
    padding: 0.45rem 0.35rem 0;
  }
}

/* Tablet hero pair */
@media (min-width: 760px) and (max-width: 979px) {
  .hero-phone {
    width: min(40%, 176px);
  }

  .hero-visual {
    gap: 0.55rem;
    padding-bottom: 1.5rem;
  }
}

/* Compact phones: overlapping pair under the copy */
@media (max-width: 759px) {
  .hero {
    padding-top: 4rem;
  }

  .hero-visual {
    display: flex;
    margin-top: 0.35rem;
    justify-content: center;
    max-width: 20rem;
    margin-inline: auto;
    gap: 0.45rem;
    padding: 0.5rem 0.25rem 1.25rem;
  }

  .hero-phone {
    width: min(44%, 132px);
  }

  .iphone-frame {
    border-radius: 1.5rem;
    padding: 0.45rem 0.35rem 0.5rem;
  }

  .iphone-island {
    top: 0.38rem;
    height: 0.55rem;
  }

  .iphone-screen {
    border-radius: 0.95rem;
  }

  .hero-phone--faith {
    transform: translateX(3%) rotate(-0.6deg);
  }

  .hero-phone--roam {
    transform: translateX(-3%) rotate(0.5deg);
  }

  .hero-copy {
    padding-bottom: 0.75rem;
    padding-top: 0.15rem;
  }

  .hero h1 {
    font-size: clamp(2.1rem, 9vw, 2.6rem);
  }

  .hero-lede {
    margin-top: 1rem;
    font-size: 0.98rem;
  }

  .hero-actions {
    margin-top: 1.5rem;
  }

  .app-media {
    padding: 0.55rem 0.55rem 0;
  }

  .app-shot {
    max-width: 220px;
  }
}

@media (max-width: 360px) {
  .hero-visual {
    max-width: 17.5rem;
    gap: 0.35rem;
  }

  .hero-phone {
    width: min(45%, 118px);
  }

  .app-shot {
    max-width: 200px;
  }
}

@media (max-width: 640px) {
  .footer-meta {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

  .hero-copy {
    animation: fade-rise 0.7s ease both;
  }

  .hero-visual {
    animation: fade-rise 0.85s ease 0.08s both;
  }

  .btn,
  .app-card {
    transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
  }

  .app-card:hover {
    transform: translateY(-2px);
  }
}

@keyframes fade-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (forced-colors: active) {
  .app-card,
  .identity,
  .site-header,
  .site-footer,
  .iphone-frame {
    border: 1px solid CanvasText;
  }
}

@media print {
  .site-header,
  .hero,
  .section--ink,
  .site-footer {
    background: #fff !important;
    color: #161616 !important;
  }

  .btn {
    border: 1px solid #161616;
  }

  a {
    text-decoration: underline;
  }
}
