/* Felicity OS: the one shared stylesheet. Colours and fonts come from DESIGN.md. */

:root {
  --cream: #FAF6EE;
  --ink: #1F1F1C;
  --ink-soft: #55554F;
  --olive: #4E5238;       /* the exact green from the logo */
  --olive-light: #E4E1D6; /* a soft tint of it, mixed with the cream, for section backgrounds */
  --olive-pale: #C9CBB0;  /* a pale version of it, for small words on dark backgrounds */
  --line: #E4DED2;
  --radius: 20px;
  --head: "Fraunces", Georgia, serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  /* keeps the footer at the bottom of the screen on short pages */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1; }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--head);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.4rem, 8vw, 4.5rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1em; }

a { color: var(--ink); }

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header: pinned to the top of the screen, so Kate's email, the name and
   the menu are always visible while scrolling. The same on every page. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}

/* The slim green strip with Kate's email */
.topline { background: var(--olive); }
.topline .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.15rem 1.5rem; /* space between the email and the phone number */
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}
.header-email {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--cream);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.header-email:hover, .header-email:focus {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* The bar with the name and the menu */
.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--head);
  font-size: 1.3rem;
  font-weight: 600;
  text-decoration: none;
}

/* The menu button on phones: three lines that turn into an X when open.
   js/site.js opens and closes the menu. If the script can't run, the
   button stays hidden and the links simply show in rows under the name. */
.menu-button {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  margin-right: -10px;
  background: none;
  border: 0;
  border-radius: 10px;
  color: var(--ink);
  cursor: pointer;
}
.js .menu-button { display: inline-flex; }
.menu-button:focus-visible { outline: 2px solid var(--olive); }
.menu-lines { position: relative; display: block; width: 24px; height: 16px; }
.menu-lines span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s, opacity 0.2s, top 0.2s;
}
.menu-lines span:nth-child(1) { top: 0; }
.menu-lines span:nth-child(2) { top: 7px; }
.menu-lines span:nth-child(3) { top: 14px; }
.menu-button[aria-expanded="true"] .menu-lines span:nth-child(1) { top: 7px; transform: rotate(45deg); }
.menu-button[aria-expanded="true"] .menu-lines span:nth-child(2) { opacity: 0; }
.menu-button[aria-expanded="true"] .menu-lines span:nth-child(3) { top: 7px; transform: rotate(-45deg); }

/* The page links */
.site-nav { width: 100%; }
.js .site-nav { display: none; }
.js .site-nav.open { display: block; }
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
}
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--olive);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
/* Phones, menu open: one page per line, easy to tap */
.js .site-nav ul { flex-direction: column; gap: 0; padding: 0.25rem 0 0.5rem; }
.js .site-nav li { border-top: 1px solid var(--line); }
.js .site-nav a { display: block; padding: 0.8rem 0; }

/* The "How it works" dropdown, with Magic Wand and Who it's for under it.
   js/site.js opens and closes it. If the script can't run, the three
   links simply show under "How it works". */
.has-sub { position: relative; }
.sub-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0;
  font: inherit;
  font-weight: 500;
  color: var(--ink);
  background: none;
  border: 0;
  cursor: pointer;
}
.sub-toggle:hover, .has-sub.is-current > .sub-toggle { color: var(--olive); }
.has-sub.is-current > .sub-toggle .sub-label {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
.sub-toggle:focus-visible { outline: 2px solid var(--olive); outline-offset: 4px; border-radius: 4px; }
/* The small arrow, which flips when the dropdown is open */
.caret {
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.2s;
}
.sub-toggle[aria-expanded="true"] .caret { transform: translateY(2px) rotate(-135deg); }
.site-nav .sub-menu { display: block; padding: 0 0 0 1rem; }
.js .site-nav .sub-menu { display: none; }
.js .site-nav .has-sub.open .sub-menu { display: block; }
/* Phones: the dropdown opens inside the menu, slightly indented */
.js .sub-toggle {
  display: flex;
  width: 100%;
  justify-content: space-between;
  padding: 0.8rem 0;
}
.js .site-nav .sub-menu { padding: 0 0 0.25rem 1rem; }
/* The logo picture has the flower, the name and the tagline in it.
   This small window shows only the flower: the picture is scaled down
   and shifted so the flower sits inside the box. The logo's background
   is the page's cream (#FAF6EE), so no box shows around it. */
.brand-mark {
  position: relative;
  display: block;
  flex: none;
  width: 31px;
  height: 30px;
  overflow: hidden;
}
.brand-mark img {
  position: absolute;
  max-width: none;
  width: 173.2px;
  height: auto;
  left: -71px;
  top: -23.5px;
}

/* Buttons */
.button {
  display: inline-block;
  background: var(--ink);
  color: var(--cream);
  text-decoration: none;
  font-weight: 500;
  padding: 0.8em 1.6em;
  border-radius: 999px;
  transition: background 0.2s;
}
.button:hover, .button:focus { background: var(--olive); }
.button.small { padding: 0.55em 1.2em; font-size: 0.95rem; }
/* Two buttons side by side, like "Email me" and "Call 207-281-5969", wrapping onto two lines on a narrow phone */
.buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

/* Sections */
section { padding: 4rem 0; }
.section-intro { max-width: 40rem; color: var(--ink-soft); }
.soft { background: var(--olive-light); }

.label {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: 0.75rem;
}

/* Inner pages: a heading at the top, then the content */
.page { padding-top: 3rem; }
.page-title { font-size: clamp(2.2rem, 6vw, 3.4rem); }
.next { margin: 2.5rem 0 0; }

/* "Next" links at the bottom of each page */
.next a {
  color: var(--olive);
  font-weight: 600;
  text-decoration: none;
}
.next a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* "Learn more" buttons: a rounded outline that fills with green when pointed at */
.more {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.55em 1.4em;
  border: 1.5px solid var(--olive);
  border-radius: 999px;
  color: var(--olive);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.more:hover, .more:focus, .card:hover .more, .card:focus .more {
  background: var(--olive);
  color: var(--cream);
}
/* On the dark Magic Wand box */
.wand .more { border-color: var(--olive-pale); color: var(--olive-pale); }
.wand .more:hover, .wand .more:focus { background: var(--cream); border-color: var(--cream); color: var(--ink); }

/* Home page cards */
.cards {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}
.card {
  display: block;
  height: 100%;
  background: #FFFDF8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.2s;
}
.card:hover, .card:focus { border-color: var(--olive); }
.card h3 { margin-bottom: 0.35rem; }
.card p { color: var(--ink-soft); margin-bottom: 0.75rem; }
.card .more { margin-top: 0; }

/* Top of the home page: the photo fills the section and the words sit on top of it */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 82vh;
  padding: 4.5rem 0 4rem;
  text-align: center;
  color: var(--cream);
  background: var(--ink);
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
/* A soft dark tint over the photo so the words are easy to read */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(31, 31, 28, 0.5), rgba(31, 31, 28, 0.68));
}
.hero .wrap { position: relative; z-index: 1; }
.hero .label { color: var(--olive-pale); }
.hero h1 { max-width: 14ch; margin-left: auto; margin-right: auto; }
.hero .lead {
  max-width: 34rem;
  margin: 0 auto 2rem;
  color: #EDE8DD;
  font-size: 1.15rem;
}
.hero .button { background: var(--cream); color: var(--ink); }
.hero .button:hover, .hero .button:focus { background: var(--olive-light); }

/* What it takes off your plate */
.plate {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
.plate li {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  font-weight: 500;
}
/* The three most important (emails, calendar, tasks): bigger, in the logo green */
.plate-main { grid-template-columns: 1fr; }
.plate-main li {
  background: var(--olive);
  border-color: var(--olive);
  color: var(--cream);
  font-family: var(--head);
  font-size: 1.5rem;
  padding: 1.4rem 1.5rem;
  border-radius: var(--radius);
}
.plate-also {
  margin: 2rem 0 0;
  color: var(--ink-soft);
  font-weight: 500;
}
.plate-more { margin-top: 0.75rem; }

/* How it works */
.steps {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  gap: 1rem;
}
.steps li {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: #FFFDF8;
}
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--olive);
  color: var(--cream);
  font-weight: 600;
  margin-bottom: 1rem;
}
.steps p { color: var(--ink-soft); margin: 0; }
/* "You pay half..." tags on the Steps page */
.steps .pay-tag {
  display: inline-block;
  margin: 0 0 0.85rem;
  padding: 0.3em 0.9em;
  border-radius: 999px;
  background: var(--olive-light);
  color: var(--olive);
  font-size: 0.85rem;
  font-weight: 600;
}
.steps p + .pay-tag { margin: 0.85rem 0 0; }
.steps h3:last-child { margin-bottom: 0; }

/* Magic Wand */
.wand {
  background: var(--ink);
  color: var(--cream);
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
}
.wand .label { color: var(--olive-pale); }
/* The Magic Wand box's words are centered, on the home page and the Magic Wand page */
.wand { text-align: center; }
.wand p { color: #DAD6CC; max-width: 38rem; margin-left: auto; margin-right: auto; }
.wand p:last-of-type { margin-bottom: 0; }

/* Reviews (hidden until there is a real one) and the quote */
.reviews blockquote,
.quote blockquote { margin: 0; }
/* The quote sits over a blurred photo with a dark tint, like the top of the home page */
.quote {
  position: relative;
  overflow: hidden;
  text-align: center;
  color: var(--cream);
  background: var(--ink);
  padding: 6rem 0;
}
.quote-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center; /* the window and the desk in the middle of the photo */
  filter: blur(8px);
  transform: scale(1.12); /* hides the soft edges the blur makes */
}
.quote::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(31, 31, 28, 0.55);
}
.quote .wrap { position: relative; z-index: 1; }
.quote blockquote p {
  font-family: var(--head);
  font-size: clamp(1.7rem, 5vw, 2.6rem);
  line-height: 1.25;
  max-width: 36rem;
  margin: 0 auto 1.25rem;
}
.quote cite {
  font-style: normal;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--olive-pale);
}

/* Longer writing, like the "Is This for You?" page: a comfortable line length */
.prose p { max-width: 40rem; }

/* A quote within a page, like Helen Keller's at the end of the About page */
.page-quote {
  margin: 2.5rem auto 0;
  max-width: 36rem;
  text-align: center;
}
.page-quote p {
  font-family: var(--head);
  font-size: clamp(1.3rem, 3.5vw, 1.7rem);
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.page-quote cite {
  font-style: normal;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--olive);
}

/* About page: Kate's photo above the words on phones, beside them on computers */
.about-grid { display: grid; gap: 2rem; }
.about-photo { margin: 0; max-width: 22rem; }
.about-photo img {
  width: 100%;
  border-radius: var(--radius);
}

/* "Let's talk about your business": the olive band at the bottom of every page */
.talk {
  background: var(--olive);
  color: var(--cream);
  text-align: center;
}
.talk .label { color: var(--olive-pale); }
.talk h2 { color: var(--cream); }
.talk p {
  max-width: 38rem;
  margin: 0 auto 1.75rem;
  color: #E9E6D6;
}
.talk .button { background: var(--cream); color: var(--ink); }
.talk .button:hover, .talk .button:focus { background: var(--olive-light); }
/* The cream version, used only on the home page */
.talk-light { background: var(--cream); color: var(--ink); }
.talk-light .label { color: var(--olive); }
.talk-light h2 { color: var(--ink); }
.talk-light p { color: var(--ink-soft); }
.talk-light .button { background: var(--ink); color: var(--cream); }
.talk-light .button:hover, .talk-light .button:focus { background: var(--olive); }
/* A section that sits close under the one above it */
section.tight-top { padding-top: 0; }

/* A page whose words sit in a centered column, like "Is This for You?".
   The label and heading are centered; long paragraphs stay lined up on the left
   so they are easy to read. */
.centered .wrap { max-width: 44rem; }
.centered .label, .centered .page-title, .centered .next { text-align: center; }
.centered .label { display: block; }

/* Prices */
.price-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  gap: 1rem;
}
.price-card {
  background: #FFFDF8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.price-card h3 { margin-bottom: 0.5rem; }
.package-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: 0.35rem;
}
/* "All three packages": the green card that stands out */
.price-bundle {
  margin-top: 1rem;
  background: var(--olive);
  border-color: var(--olive);
  color: var(--cream);
}
/* ".price-card.price-bundle" is more specific than the general price and
   paragraph rules further down, so these light colours always win on the green */
.price-card.price-bundle .package-label { color: var(--olive-pale); }
.price-card.price-bundle h3 { color: var(--cream); }
.price-card.price-bundle p { margin-bottom: 0; color: #E9E6D6; }
.price-card.price-bundle .price { color: var(--cream); margin-bottom: 0.75rem; }
/* "a month" after a monthly price, smaller than the number */
.price .per {
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-soft);
}
/* "You pay half at the start..." */
.pay-note { margin: 1.5rem 0 0; color: var(--ink-soft); font-weight: 500; }
/* "After the setup" heading on the Prices page */
.after-title { margin-top: 4rem; }

/* What each package includes, with small green dots */
.includes {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}
.includes li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.6rem;
  color: var(--ink-soft);
}
.includes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--olive);
}
.price-card .price {
  font-family: var(--head);
  font-size: 2.4rem;
  line-height: 1.1;
  color: var(--olive);
  margin-bottom: 0.75rem;
}

/* About, prices and contact */
.about p, .contact p, .prices p { max-width: 38rem; }
.contact { text-align: center; }
.contact p { margin-left: auto; margin-right: auto; color: var(--ink-soft); }
.prices p { color: var(--ink-soft); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.site-footer p { margin: 0; }

/* Wider screens */
@media (min-width: 720px) {
  section { padding: 5.5rem 0; }
  .hero { padding: 6.5rem 0 5.5rem; }
  .plate { grid-template-columns: repeat(3, 1fr); }
  .plate-main li { font-size: 1.75rem; padding: 1.75rem; }
  .plate-more { grid-template-columns: repeat(4, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .wand { padding: 3.5rem; }
  .page { padding-top: 4rem; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  /* As many package cards in a row as fit, each at least 15rem wide */
  .price-list { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
  .brand { font-size: 1.4rem; }
}

/* Wide enough for the About photo to sit beside the words, on the right */
@media (min-width: 860px) {
  .about-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 3.5rem;
    align-items: start;
  }
  .about-photo { order: 2; max-width: none; margin-top: 0.5rem; }
}

/* Computers: the page links sit in one row next to the name,
   and the email sits on the right of the green strip */
@media (min-width: 1000px) {
  .topline .wrap { justify-content: flex-end; }
  .header-email { font-size: 0.9rem; }
  .bar { flex-wrap: nowrap; padding-top: 0.9rem; padding-bottom: 0.9rem; }
  .site-nav, .js .site-nav { display: block; width: auto; }
  .js .menu-button { display: none; }
  .js .site-nav ul { flex-direction: row; gap: 0.4rem 1.5rem; padding: 0; }
  .js .site-nav li { border-top: 0; }
  .js .site-nav a { display: inline; padding: 0; }
  /* Computers: the dropdown is a small panel under "How it works" */
  .js .sub-toggle { display: inline-flex; width: auto; padding: 0; }
  .js .site-nav .sub-menu {
    position: absolute;
    top: calc(100% + 0.9rem);
    left: -1rem;
    z-index: 20;
    min-width: 13rem;
    padding: 0.5rem 0;
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(31, 31, 28, 0.12);
  }
  .js .site-nav .sub-menu a { display: block; padding: 0.55rem 1rem; }
}
