/*! HTML5 Boilerplate v9.0.1 | MIT License | https://html5boilerplate.com/ */

/* main.css 3.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */
@import url(https://fonts.bunny.net/css?family=assistant:400);

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
  color: #222;
  font-size: 1.3em;
  line-height: 1.4;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden,
[hidden] {
  display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

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

/*
 * Extends the .visually-hidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
  visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * The use of `table` rather than `block` is only necessary if using
 * `::before` to contain the top-margins of child elements.
 */

.clearfix::before,
.clearfix::after {
  content: "";
  display: table;
}

.clearfix::after {
  clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
  /* Style adjustments for viewports that meet the condition */
}

@media print,
(-webkit-min-device-pixel-ratio: 1.25),
(min-resolution: 1.25dppx),
(min-resolution: 120dpi) {
  /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    /* Black prints faster */
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  /*
   * Don't show links that are fragment identifiers,
   * or use the `javascript:` pseudo protocol
   */
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}

:root {
  --background: rgba(235, 236, 238, 1); /* #ebecee */
}

/* Full-page brick wall background */
body {
  font-family: 'Assistant', sans-serif;
  margin: 0;
  position: relative;

  &::before {
    background-image: url("https://cdn.mycdnaccount.us/cdn/barbershopchor.us/brick_wall.jpg");
    background-repeat: repeat;
    background-size: 2000px auto; /* TODO: increase value to zoom in more */
    content: "";
    filter: brightness(0.9) contrast(0.8) saturate(0.7); /* TODO: tweak until subtle */
    inset: 0;
    position: fixed; /* ← important: scrolls with page */
    z-index: -1;
  }
}

.paper {
  background-color: rgba(235, 236, 238, 255);
  box-shadow: -18px 0 30px rgba(0, 0, 0, 0.16),  inset 0 0 18px rgba(0, 0, 0, 0.06);
  margin: 120px auto;
  max-width: 900px;
  padding: 0 48px 48px;
  position: relative;

  &::before {
    background-image: url("https://cdn.mycdnaccount.us/cdn/barbershopchor.us/paper-edge.png");
    background-repeat: repeat-x;
    background-size: auto 100%;
    content: "";
    height: 60px;
    left: 0;
    pointer-events: none;
    position: absolute;
    right: 0;
    top: -40px; /* anchored to top of paper */
    z-index: 2;
  }

  &::after {
    background-image: url("https://cdn.mycdnaccount.us/cdn/barbershopchor.us/paper-edge.png");
    background-repeat: repeat-x;
    background-size: auto 100%;
    bottom: -40px; /* mirrors your top offset */
    content: "";
    height: 60px;
    left: 0;
    pointer-events: none;
    position: absolute;
    right: 0;
    transform-origin: center;
    transform: rotate(180deg);
    z-index: 2;
  }
}

.tape {
  background: linear-gradient(
    135deg,
    rgba(255,255,210,0.5),
    rgba(230,230,180,0.3)
  );
  border-radius: 2px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18),
    inset 0 0 4px rgba(0, 0, 0, 0.05);
  filter: blur(0.1px);
  height: 68px; /* short side will match all pieces */
  opacity: 0.75;
  position: absolute;
  transform: rotate(-6deg) skewX(-2deg);
  z-index: 3;

  &::after {
    content: "";
    position: absolute;

    width: 40%;
    height: 60%;

    bottom: -2px;
    right: -2px;

    pointer-events: none;

    /* shadow of the lifted corner */
    box-shadow: 6px 6px 10px rgba(0,0,0,0.25);

    transform: rotate(8deg);
    border-radius: 50%;
  }

  &::before {
    background: linear-gradient(
      120deg,
      transparent 0%,
      rgba(255, 255, 255, 0.35) 45%,
      transparent 70%
    );
    content: "";
    inset: 0;
    mix-blend-mode: screen;
    opacity: 0.6;
    position: absolute;
  }

  &.tape--tl {
    top: -10px;
    left: -42px;
    transform: rotate(-42deg);
    opacity: 0.70;
    width: 180px;
  }

  &.tape--tr {
    top: 16px;
    right: -57px;
    transform: rotate(52deg);
    opacity: 0.78;
    width: 201px;
  }

  &.tape--bl {
    bottom: -18px;
    left: -50px;
    transform: rotate(59deg);
    opacity: 0.65;
    width: 161px;
  }

  &.tape--br {
    bottom: -22px;
    right: -62px;
    transform: rotate(-48deg);
    opacity: 0.72;
    width: 151px;
  }
}

.swiper {
  height: 400px;
  width: 600px;
}

.swiper-slide {
  border-radius: 2px;
  height: 320px;
  overflow: hidden;
}

.swiper-slide img {
  display: block;
  filter: contrast(0.95) brightness(0.98);
  height: 100%;
  object-fit: cover; /* key line */
  object-position: center;
  width: 100%;
}
.slide-media {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* overlay text */
.slide-caption {
  position: absolute;
  bottom: 20px;
  left: 20px;

  background: rgba(245, 241, 232, 0.85);
  color: #222;

  padding: 8px 10px;
  transform: rotate(-1deg);
  box-shadow: 2px 2px 0 rgba(0,0,0,0.2);
}

section {
  padding-top: 4em;
}


.closing {
  text-align: center;
  margin-top: 80px;
  opacity: 0.9;
}

.closing .logo {
  width: 120px;
  margin: 20px auto;
  opacity: 0.8;
  filter: grayscale(100%) contrast(0.8);
}

.small-link {
  font-size: 0.9rem;
  opacity: 0.7;
}

.paper-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;

  opacity: 0.08;
  mix-blend-mode: multiply;

  background-image: url("https://cdn.mycdnaccount.us/cdn/barbershopchor.us/paper-noise.png"); /* or CSS fallback */
  background-repeat: repeat;

  z-index: 0;
}

/* ensure content is above grain */
.paper > section {
  position: relative;
  z-index: 1;
}
