/* AMA Mobile Notary */

@font-face {
  font-family: "Dream Orphans";
  src: url("../fonts/dream-orphans.woff2") format("woff2");
  font-display: swap;
}

:root {
  --maroon: #441820;
  --maroon-dark: #321117;
  --cream: #f7f3c6;
  --paper: #fbf8ec;
  --ink: #2b1d1f;
  --ink-soft: #5b4b4d;
  --rule: #e3d9c2;
  --gold: #a88a4f;          /* antique gold, used only for thin lines and ornaments */

  --display: "Dream Orphans", "Arial Narrow", sans-serif;
  --text: Georgia, "Times New Roman", serif;
  --numbers: "Segoe UI", system-ui, -apple-system, Arial, sans-serif; /* plain, easy-to-read digits for phone numbers */
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* faint paper grain, like heavy stationery */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .27 0 0 0 0 .1 0 0 0 0 .12 .07 0 0 0 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font: 1.1875rem/1.7 var(--text);
  color: var(--ink);
  background: var(--paper) var(--grain);
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--maroon); }
p { margin: 0 0 1em; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: normal;
  line-height: 1.05;
  letter-spacing: .02em;
  color: var(--maroon);
  margin: 0 0 .5em;
}
h2 { font-size: clamp(2.5rem, 6vw, 3.6rem); }

:focus-visible { outline: 3px solid #c98a2b; outline-offset: 3px; }

.wrap { width: min(1080px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(760px, 100% - 2.5rem); }

.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 100; background: var(--cream); padding: .5rem 1rem; }
.skip-link:focus { top: 1rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 56px; padding: .9rem 2rem;
  font: 600 .95rem/1 var(--numbers); letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none; border: 1px solid var(--cream); border-radius: 0;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
.btn-cream { background: var(--cream); color: var(--maroon); }
.btn-cream:hover { background: transparent; color: var(--cream); }
.btn-line { color: var(--cream); background: transparent; }
.btn-line:hover { background: var(--cream); color: var(--maroon); }

/* The thin cream border from his business card */
.card-frame { position: relative; border: 2px solid var(--cream); }
.card-frame::after {
  content: ""; position: absolute; inset: 7px; pointer-events: none;
  border: 1px solid rgba(247, 243, 198, .3);
}

/* Small diamond divider between sections */
.ornament { display: flex; align-items: center; justify-content: center; gap: 1rem; color: var(--gold); }
.ornament::before, .ornament::after { content: ""; width: min(120px, 25vw); border-top: 1px solid currentColor; }
.ornament span { width: 7px; height: 7px; background: currentColor; transform: rotate(45deg); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--maroon); color: var(--cream);
  transition: box-shadow .3s;
}
.site-header.scrolled { box-shadow: 0 2px 14px rgba(0, 0, 0, .3); }
.header-inner { display: flex; align-items: center; gap: 2rem; min-height: 74px; }
.brand img { height: 50px; width: auto; }
.main-nav { display: flex; gap: 1.6rem; margin-left: auto; }
.main-nav a {
  color: var(--cream); text-decoration: none;
  font: 500 .85rem/1.6 var(--numbers); letter-spacing: .16em; text-transform: uppercase;
  background: linear-gradient(var(--cream), var(--cream)) left bottom / 0 1px no-repeat;
  transition: background-size .25s var(--ease);
}
.main-nav a:hover { background-size: 100% 1px; }
.header-phone {
  display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1;
  color: var(--cream); text-decoration: none;
  padding-left: 1.6rem; border-left: 1px solid rgba(247, 243, 198, .3);
}
.header-phone-label { font: 500 .7rem/1.4 var(--numbers); letter-spacing: .18em; text-transform: uppercase; opacity: .75; }
.header-phone-num { font: 600 1.35rem/1.2 var(--numbers); }

/* Hero */
.hero { background: var(--maroon); padding: 1.25rem; }
.hero-frame {
  min-height: min(78vh, 680px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 3.5rem 1.5rem;
  color: var(--cream);
}
.foil { position: relative; display: block; width: min(440px, 78vw); margin-bottom: 2.25rem; }
.hero-logo { width: 100%; }
/* Gold-foil shine: a band of light sweeps across the logo once, only where the letters are */
.foil::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: linear-gradient(105deg, transparent 36%, #fff 50%, transparent 64%) 100% 0 / 300% 100% no-repeat;
  -webkit-mask: url("../images/logo-cream.png") center / 100% 100% no-repeat;
  mask: url("../images/logo-cream.png") center / 100% 100% no-repeat;
}
.js .foil::after { animation: shine 1.8s 1.5s ease-in-out both; }
@keyframes shine { from { opacity: 1; background-position: 100% 0; } to { opacity: 1; background-position: 0 0; } }
.hero-line { font-size: 1.3rem; font-style: italic; max-width: 30em; margin-bottom: 2.25rem; }
.hero-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }

/* Hero opening: frame draws itself in, then the logo rises */
.js .hero-frame { animation: draw 1.1s var(--ease) both; }
.js .foil { animation: rise .9s .5s var(--ease) both; }
@keyframes draw { from { clip-path: inset(0 50% 0 50%); } to { clip-path: inset(0 0 0 0); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* About */
.about { padding: 6.5rem 0 5.5rem; }
.about-inner { display: grid; grid-template-columns: 1fr 1.6fr; gap: 3rem; align-items: start; }
.about h2 { font-size: clamp(3rem, 7vw, 4.6rem); }
.about-head .seal { width: 150px; margin-top: 1.5rem; }

/* Round AMA emblem */
.seal { display: block; color: var(--gold); overflow: visible; }
.seal-line, .seal-line-thick { fill: none; stroke: currentColor; stroke-width: .75; }
.seal-line-thick { stroke-width: 2; }
.seal-text { fill: currentColor; font: 600 14px var(--numbers); letter-spacing: 5.8px; } /* spacing sized so the words wrap the full circle */
.seal-mono { fill: var(--maroon); font: 54px var(--display); }
.seal-ring { transform-origin: 100px 100px; animation: spin 120s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Services */
.services { padding: 4.5rem 0 6rem; }
.service-list {
  display: grid; grid-template-columns: 1fr 1fr; column-gap: 3.5rem; margin: 2rem 0 0;
  border-top: 1px solid var(--gold);
}
.service-list > div { padding: 1.25rem 0; border-bottom: 1px solid var(--rule); }
.service-list dt { font-weight: bold; color: var(--maroon); font-size: 1.2rem; }
.service-list dd { margin: .2rem 0 0; color: var(--ink-soft); }
.services-note { margin: 2rem 0 0; font-style: italic; color: var(--ink-soft); }

/* Hours & area */
.area { background: var(--maroon); padding: 1.25rem; }
.area-frame {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 3rem;
  padding: clamp(2.5rem, 6vw, 4.5rem);
  color: var(--cream);
}
.area h2 { color: var(--cream); font-size: clamp(2.2rem, 5vw, 3rem); }
.area strong { color: #fff; }
.hours { margin: 0; }
.hours div { display: flex; justify-content: space-between; gap: 1rem; padding: .65rem 0; border-bottom: 1px solid rgba(247, 243, 198, .25); }
.hours dt { font: 500 .85rem/1.9 var(--numbers); letter-spacing: .12em; text-transform: uppercase; }
.hours div { align-items: baseline; }
.hours dd { margin: 0; text-align: right; font: 1.05rem/1.6 var(--numbers); }

/* Before the visit */
.ready { padding: 6rem 0; }
.ready-list { list-style: none; counter-reset: ready; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
.ready-list li { counter-increment: ready; }
.ready-list li::before {
  content: counter(ready); display: block;
  font-family: var(--display); font-size: 4.5rem; line-height: 1; color: var(--maroon);
  border-bottom: 1px solid var(--gold); padding-bottom: .5rem; margin-bottom: 1rem;
}
.ready-list strong { display: block; color: var(--maroon); margin-bottom: .3rem; }

/* FAQ */
.faq-section { padding: 5.5rem 0 6rem; background: #f4eed8 var(--grain); border-top: 1px solid var(--rule); }
.faq { border-top: 1px solid var(--gold); margin-top: 1.5rem; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 1.15rem 3rem 1.15rem 0; font-weight: bold; font-size: 1.15rem; color: var(--maroon);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: .25rem; top: 50%; translate: 0 -50%;
  font-family: var(--display); font-size: 2.2rem; line-height: 1;
  transition: transform .3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-soft); margin: 0; padding: 0 0 1.25rem; }
.faq details[open] p { animation: open .35s var(--ease); }
@keyframes open { from { opacity: 0; transform: translateY(-6px); } }

/* Contact */
.contact { background: var(--maroon); padding: 1.25rem; }
.contact-frame { padding: clamp(3.5rem, 8vw, 5.5rem) 1.5rem; text-align: center; color: var(--cream); }
.contact h2 { color: var(--cream); margin-bottom: .3em; }
.contact-phone {
  display: inline-block; font: 600 clamp(2.4rem, 9vw, 4rem)/1.2 var(--numbers);
  color: var(--cream); text-decoration: none; margin-bottom: 1rem;
  background: linear-gradient(var(--cream), var(--cream)) center bottom / 0 2px no-repeat;
  transition: background-size .3s var(--ease);
}
.contact-phone:hover { background-size: 100% 2px; }
.contact p { max-width: 32em; margin-inline: auto; color: rgba(247, 243, 198, .85); }
.contact-email a { color: var(--cream); overflow-wrap: anywhere; }

/* Footer */
.site-footer { background: var(--maroon-dark); color: rgba(247, 243, 198, .75); padding: 2.5rem 0; text-align: center; font-size: .95rem; }
.site-footer .seal { width: 96px; margin: 0 auto 1.5rem; color: rgba(247, 243, 198, .55); }
.site-footer .seal-mono { fill: var(--cream); }
.notary-name { color: var(--cream); margin-bottom: .5rem; }
.disclaimer { max-width: 44em; margin: 0 auto .75rem; }
.copyright { margin: 0; opacity: .7; }

.mobile-bar { display: none; }

/* Fade things in as you scroll (only when JavaScript is running) */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Tablets */
@media (max-width: 900px) {
  .main-nav { display: none; }
  .header-phone { margin-left: auto; }
  .about-inner, .area-frame { grid-template-columns: 1fr; gap: 1.5rem; }
  .about { padding-top: 4.5rem; }
  .ready-list { grid-template-columns: 1fr; gap: 2rem; }
}

/* Phones */
@media (max-width: 640px) {
  body { font-size: 1.125rem; padding-bottom: 82px; }
  .header-inner { min-height: 64px; }
  .brand img { height: 42px; }
  .header-phone { border: 0; padding: 0; }
  .header-phone-num { font-size: 1.2rem; }
  .hero, .area, .contact { padding: .75rem; }
  .btn { padding-inline: 1.25rem; letter-spacing: .1em; }
  .hero-frame { min-height: 0; padding: 3rem 1.25rem; }
  .hero-buttons { flex-direction: column; width: 100%; }
  .service-list { grid-template-columns: 1fr; }
  .about-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
  .about-head .seal { width: 92px; flex: none; margin: 0; }

  .mobile-bar {
    display: grid; grid-template-columns: 1fr 1fr; gap: .75rem;
    position: fixed; inset: auto 0 0 0; z-index: 60;
    padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom));
    background: var(--maroon); box-shadow: 0 -4px 16px rgba(0, 0, 0, .25);
  }
}

/* People who turn off motion in their phone/computer settings get no animations */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
