/*
  John and Amy Fisher.com — shared stylesheet

  Recreates the original Sitely design: brushed-aluminum background,
  slate header bar with the Sacramento script title, and white text.
  Desktop measurements follow the original 1200px layout; narrower
  windows reflow instead of shrinking the whole page.
*/

/* ---------- Fonts (self-hosted, SIL Open Font License) ---------- */

@font-face { font-family: "Sacramento"; src: url("../fonts/Sacramento-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("../fonts/OpenSans-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Kalam"; src: url("../fonts/Kalam-Light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Kameron"; src: url("../fonts/Kameron-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Lato"; src: url("../fonts/Lato-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("../fonts/EBGaramond-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }

/* ---------- Tokens ---------- */

:root {
  --page-width: 1200px;
  --gutter: 16px;
  --header-bg: #52646f;
  --page-bg: #677a85;
  --text: #fff;
  --photo-shadow: 10px 10px 4px rgba(0, 0, 0, 0.4);
  --portrait-shadow: 8px 8px 6px #808080;
  --body-font: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  color: var(--text);
  font-family: var(--body-font);
  /* Background pattern from Toptal Subtle Patterns (subtlepatterns.com) */
  background: var(--page-bg) url("../images/brushed-alu-dark.png") repeat center top;
  overflow-x: clip; /* entrance animations start off-screen */
}

h1, h2, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }
a:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.wrap {
  width: min(var(--page-width), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

/* ---------- Header bar ---------- */

.site-header {
  background: var(--header-bg);
  min-height: 75px;
  display: flex;
  align-items: center;
}

.site-title {
  font-family: "Sacramento", cursive;
  font-weight: 400;
  font-size: 38px;
  line-height: 1.6;
  white-space: nowrap;
}

.site-title a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

/* ---------- Home: family photo collage ---------- */

.family {
  display: grid;
  grid-template-columns: 435fr 435fr 310fr;
  gap: 10px;
  margin-block: 54px 60px;
}

.family-kids {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
}

.member {
  position: relative;
  display: block;
  box-shadow: var(--photo-shadow);
  text-decoration: none;
}

.member img { width: 100%; height: 100%; object-fit: cover; }

.family-kids .member { min-height: 0; }
/* Kids' photos fill their half of the column instead of setting its height */
.family-kids .member img { position: absolute; inset: 0; }

/* Name tab in the photo's top-right corner */
.member-name {
  position: absolute;
  top: 23px;
  right: -1px;
  min-width: 98px;
  height: 35px;
  padding: 0 10px 0 22px;
  border-radius: 18px 0 0 18px;
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 10px 10px 6px 3px rgba(0, 0, 0, 0.4);
  font-family: "Open Sans", var(--body-font);
  font-weight: 700;
  font-size: 23px;
  line-height: 35px;
  text-align: right;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  white-space: nowrap;
}

/* ---------- John / Amy profile pages ---------- */

.profile {
  display: grid;
  grid-template-columns: 364px 1fr;
  column-gap: 2px;
  align-items: start;
  padding-block: 20px 60px;
}

.profile-photo {
  width: 346px;
  margin-left: 9px;
  border-radius: 10px;
  box-shadow: var(--portrait-shadow);
}

.profile--amy .profile-photo { width: 354px; margin-left: 0; }

.profile-body { min-width: 0; }

.profile-name {
  font-size: 80px;
  font-weight: 400;
  line-height: 1.3;
  text-align: center;
}

.profile--john .profile-name { font-family: "Kalam", cursive; font-weight: 300; margin-top: -6px; }
.profile--amy .profile-name { font-family: "Kameron", Georgia, serif; margin-top: 4px; padding-left: 12px; }

.profile-tagline {
  font-size: 22px;
  line-height: 1.5;
  text-align: right;
  margin-top: -8px;
}

.profile-bio {
  max-width: 743px;
  margin: 64px 0 0 44px;
  font-size: 20px;
  line-height: 1.7;
}

.profile-links {
  margin: 30px 0 0 49px;
  display: grid;
  gap: 8px;
}

.profile-links a {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 17px;
  line-height: 1.65;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.profile-links .icon { flex: none; width: 59px; display: flex; justify-content: center; }
.profile--amy .profile-links { margin: 48px 0 0 94px; }
.profile--amy .profile-links .icon { width: 35px; }
.profile--amy .profile-links a { gap: 4px; }

/* ---------- Roll Call support page ---------- */

.rollcall {
  background: #fff;
  color: #000;
  font-family: "EB Garamond", Garamond, Georgia, serif;
}

.rollcall main {
  padding-block: 13px 60px;
  font-size: clamp(20px, 1rem + 1.75vw, 37px);
  line-height: 1.6;
}

.rollcall h1 { font-size: 1em; font-weight: 400; line-height: 1.5; }
.rollcall h2 { font-size: 1em; font-weight: 400; line-height: 1.55; margin-top: 1.4em; }
.rollcall a { color: inherit; text-underline-offset: 0.15em; text-decoration-thickness: 1px; }

/* ---------- Entrance animations (from the original site) ---------- */

.anim { animation-duration: 1s; animation-timing-function: ease; animation-fill-mode: both; }
.anim-pulse { animation-name: pulse; }
.anim-slide-in { animation-name: slide-in-right; animation-duration: 1.4s; }
.anim-fade-in { animation-name: fade-in; }
.anim-fade-in-down { animation-name: fade-in-down; animation-duration: 2s; animation-delay: 2s; }
.anim-zoom-in { animation-name: zoom-in; animation-duration: 2.5s; }
.anim-light-speed { animation-name: light-speed-in; animation-duration: 3s; animation-delay: 0.5s; }

@keyframes pulse { 50% { transform: scale(1.05); } }
@keyframes slide-in-right { from { opacity: 0; transform: translateX(2000px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-in-down { from { opacity: 0; transform: translateY(-100%); } to { opacity: 1; transform: none; } }
@keyframes zoom-in { from { opacity: 0; transform: scale(0.3); } 50% { opacity: 1; } to { opacity: 1; transform: none; } }
@keyframes light-speed-in {
  from { opacity: 0; transform: translateX(100%) skewX(-30deg); }
  60% { opacity: 1; transform: skewX(20deg); }
  80% { transform: skewX(-5deg); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .anim { animation: none; }
}

/* ---------- Narrower windows ---------- */

@media (max-width: 1199px) {
  .profile { grid-template-columns: minmax(0, 30%) 1fr; column-gap: 24px; }
  .profile-photo, .profile--amy .profile-photo { width: 100%; margin-left: 0; }
  .profile-name { font-size: clamp(44px, 6.6vw, 80px); }
  .profile-bio, .profile-links, .profile--amy .profile-links { margin-left: 24px; }
}

@media (max-width: 767px) {
  .site-title { font-size: 30px; }

  .profile { grid-template-columns: 1fr; padding-top: 24px; }
  .profile-photo, .profile--amy .profile-photo { width: min(280px, 75%); margin-inline: auto; }
  .profile-name { font-size: clamp(40px, 11vw, 64px); }
  .profile--john .profile-name, .profile--amy .profile-name { margin-top: 16px; padding-left: 0; }
  .profile-tagline { text-align: center; margin-top: 0; font-size: 19px; }
  .profile-bio { margin: 28px 0 0; font-size: 18px; }
  .profile-links, .profile--amy .profile-links { margin: 28px 0 0; }
  .profile-links a { font-size: 16px; }
}

@media (max-width: 639px) {
  .family { grid-template-columns: 1fr 1fr; margin-top: 28px; }
  .family-kids { grid-column: 1 / -1; grid-template-rows: none; grid-template-columns: 1fr 1fr; }
  .family-kids .member img { position: static; }
  .member-name { top: 14px; min-width: 0; height: 30px; padding-left: 16px; font-size: 18px; line-height: 30px; }
}
