@charset "utf-8";

@layer reset, base, components, media-query, modified;

/* utility */
@layer base {
  html,
  body {
    height: 100%;
  }
  html {
    /* color */
    --main-color: #027373;
    --sub-color: #038c7f;
    --accent-color: #efec64;
    --text-color: #f2e7dc;
    /* font-size */
    --small-font-size: clamp(1.4rem, 1.327rem + 0.36vw, 1.6rem);
    --main-font-size: clamp(1.6rem, 1.527rem + 0.36vw, 1.8rem);
    --large-font-size: clamp(2.1rem, 1.991rem + 0.55vw, 2.4rem);
    --exl-font-size: clamp(3.6rem, 3.236rem + 1.82vw, 4.6rem);
    /* other root */
    --transition: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    /* other settings */
    font-size: 62.5%;
    scroll-behavior: smooth;
  }
  body {
    position: relative;
    font-size: var(--main-font-size);
    font-family: 'Hina Mincho', serif;
    line-height: 1.8;
    letter-spacing: 0.09em;
    color: var(--text-color);
    width: 100%;
    min-height: 100vh;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    background-color: #000;
    &::before {
      position: fixed;
      inset: 0;
      width: 100%;
      height: calc(var(--vh, 1vh) * 115);
      content: '';
      background-image: url(../img/main.jpg);
      background-size: cover;
      background-repeat: no-repeat;
      background-position: bottom left;
      z-index: -10;
    }
    &::after {
      position: fixed;
      inset: 0;
      width: 100%;
      height: calc(var(--vh, 1vh) * 115);
      content: '';
      background-image: linear-gradient(180deg, var(--main-color), var(--accent-color));
      z-index: -8;
      mix-blend-mode: multiply;
      -webkit-backdrop-filter: blur(8px);
      backdrop-filter: blur(8px);
      animation: bg-glitch 12s infinite linear;
      opacity: 1;
    }
  }
  @keyframes bg-glitch {
    0%,
    10%,
    20%,
    80%,
    90%,
    100% {
      opacity: 1;
    }
    80.1%,
    89.9%,
    10.1%,
    19.99% {
      opacity: 0.2;
    }
  }
  p {
    margin-bottom: 1em;
  }
  .section {
    position: relative;
    padding-top: 108px;
    padding-bottom: 108px;
    z-index: 0;
  }
  .inner {
    position: relative;
    max-width: 1200px;
    margin-inline: auto;
    padding-right: 24px;
    padding-left: 48px;
  }
  .section-title {
    font-family: 'Rock Salt', cursive;
    text-align: center;
    font-size: var(--large-font-size);
    margin-bottom: 3em;
  }
  .btn-wrapper {
    position: relative;
    display: grid;
    place-items: center;
    text-align: center;
    transform: rotate(-4deg);
    transform-origin: center;
  }
  a.btn {
    position: relative;
    font-size: var(--small-font-size);
    font-weight: bold;
    font-family: 'Rock Salt', cursive;
    text-decoration: none;
    &::after {
      position: relative;
      content: '->';
      margin-left: 0.6rem;
    }
  }
  .bold {
    font-weight: bold;
  }
  .mb-3em {
    margin-bottom: 3em;
  }
  a.text-link {
    font-weight: bold;
    text-decoration: underline;
    text-decoration-color: var(--accent-color);
    text-underline-offset: 0.25em;
  }
  .noise {
    --dx: 0.08em;
    --dy: 0.04em;
    text-shadow: calc(var(--dx) * -1) calc(var(--dy) * -1) 0 rgba(255, 0, 0, 0.65), /* 赤 */ var(--dx) var(--dy) 0 rgba(0, 255, 255, 0.65);
    filter: blur(0.15px);
  }
}

@layer components {
  /* header */
  .header {
    position: fixed;
    top: 0;
    left: 0;
    height: calc(100vh - 48px);
    width: 48px;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform var(--transition);
    &.on {
      transform: translateX(0);
    }
  }
  .nav-list {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    text-orientation: mixed;
    height: 100dvh;
  }
  .nav-content a {
    text-decoration: none;
    font-family: 'Rock Salt', cursive;
    font-size: var(--small-font-size);
    &.active {
      background-color: var(--accent-color);
      color: #000;
    }
  }
  /* footer */
  .footer {
    background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 1));
    padding: 144px 12px 36px 48px;
    text-align: center;
  }
  .copyright {
    font-family: 'Rock Salt', cursive;
  }
  .backtoTop {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 100vmax;
    content: '';
    background-color: var(--main-color);
    &::after {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      content: '<-';
      display: flex;
      justify-content: center;
      align-items: center;
      color: #fff;
      font-family: 'Rock Salt', cursive;
      font-size: 18px;
      letter-spacing: 0.02em;
      line-height: 1;
      writing-mode: vertical-rl;
    }
  }
  /* mv */
  .section#mv {
    width: 100%;
    height: calc(var(--vh, 1vh) * 115);
    z-index: 50;
    & .inner {
      display: grid;
      place-items: center;
      height: 100%;
    }
  }
  .mv-title {
    font-family: 'Rock Salt', cursive;
    text-align: center;
    font-size: calc(100vw / 20);
    white-space: nowrap;
    letter-spacing: 0.15em;
  }
  /* about */
  .section#about {
    background-color: rgba(0, 0, 0, 0.78);
    text-align: center;
  }
  /* pictures */
  .section#pictures {
    position: relative;
    background-image: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 1));
    padding-bottom: 0;
  }
  .pictures-img {
    position: relative;
    column-count: 3;
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
    &::after {
      position: absolute;
      bottom: 0;
      left: 0;
      width: 100%;
      height: 20vh;
      content: '';
      background-color: rgba(0, 0, 0, 1);
      z-index: 1;
    }
  }
  .img-wrapper {
    position: relative;
    display: block;
    margin-bottom: 24px;
    overflow: hidden;
    &::after {
      position: absolute;
      width: 100%;
      height: 100%;
      inset: 0;
      content: '';
      background-color: #fff;
      opacity: 0.12;
    }
    & img {
      width: 100%;
      object-fit: cover;
      break-inside: avoid;
      pointer-events: none;
    }
  }
  .bg-fixed-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 480px;
    clip-path: inset(0);
    z-index: -1;
  }
  .bg-fixed {
    position: fixed;
    top: 0;
    width: 100%;
    height: 100%;
    background-image: url(../img/section-img1.jpg);
    filter: blur(4px);
    background-size: cover;
    background-position: bottom center;
    z-index: -6;
    &::after {
      position: fixed;
      inset: 0;
      width: 100%;
      height: 100%;
      content: '';
      background-image: linear-gradient(var(--accent-color), var(--sub-color));
      mix-blend-mode: exclusion;
      -webkit-backdrop-filter: blur(8px);
      backdrop-filter: blur(8px);
      animation: bg-glitch 12s infinite linear;
      z-index: -5;
    }
    &.bg-2 {
      background-image: url(../img/picture-img1.jpg);
    }
  }
  /* contact */
  .section#contact {
    &::before {
      position: relative;
      top: -108px;
      display: block;
      width: 100%;
      height: 240px;
      content: '';
      background-color: rgba(0, 0, 0, 1);
      z-index: 1;
    }
  }
  .contact-wrapper {
    max-width: 480px;
    margin-inline: auto;
    padding: 48px 24px;
    background-color: rgba(0, 0, 0, 0.78);
    & p:first-child {
      font-size: var(--small-font-size);
    }
  }
  .form-group {
    margin-bottom: 1em;
  }
  input[type='text'],
  input[type='email'],
  textarea {
    width: 100%;
    color: #000;
    padding: 4px 8px;
  }
  textarea {
    margin-bottom: 3em;
  }
  .submit-btn {
    position: relative;
    display: block;
    font-size: var(--small-font-size);
    font-weight: bold;
    font-family: 'Rock Salt', cursive;
    text-decoration: none;
    margin-inline: auto;
    transform: rotate(-4deg);
    &::after {
      position: relative;
      content: '->';
      margin-left: 0.6rem;
    }
  }
  /* loading */
  .loading {
    position: fixed;
    inset: 0;
    background-color: #000;
    overflow: hidden;
    z-index: 9999;
  }
  .loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, #fff2 0%, transparent 60%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 1s ease-in-out infinite;
  }
  @keyframes pulse {
    0%,
    100% {
      opacity: 0.1;
    }
    50% {
      opacity: 1;
    }
  }
}

@layer media-query {
  /* tablet */
  @media (880px >= width) {
  }
  /* smartphone */
  @media (475px >= width) {
    .pictures-img {
      column-count: 2;
    }
  }
  /* hover */
  @media (hover: hover) {
    a {
      transition: opacity var(--transition);
      &:hover {
        opacity: 0.65;
        transition: opacity var(--transition);
      }
    }
    a.btn,
    .submit-btn {
      position: relative;
      transition: all var(--transition);
      opacity: 1;
      &:hover {
        opacity: 1;
        color: var(--accent-color);
        transition: all var(--transition);
      }
    }
    .backtoTop {
      transition: opacity var(--transition);
      &:hover {
        opacity: 0.65;
        transition: opacity var(--transition);
      }
    }
  }
}

@layer modified {
}

/* reset css */
@layer reset {
  *,
  *::before,
  *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  :where([hidden]:not([hidden='until-found'])) {
    display: none !important;
  }

  :where(html) {
    -webkit-text-size-adjust: none;
    tab-size: 2;
    scrollbar-gutter: stable;
    interpolate-size: allow-keywords;
    line-height: 1.5;
  }

  :where(html:has(dialog:modal[open])) {
    overflow: clip;
  }

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

  :where(body) {
    line-height: inherit;
    font-family: system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
  }

  :where(button) {
    all: unset;
  }

  :where(input, button, textarea, select) {
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
    word-spacing: inherit;
    font-feature-settings: inherit;
    font-variation-settings: inherit;
  }

  :where(textarea) {
    resize: vertical;
    resize: block;
  }

  :where(button, label, select, summary, [role='button'], [role='option']) {
    cursor: pointer;
  }

  :where(:disabled, label:has(> :disabled, + disabled)) {
    cursor: not-allowed;
  }

  :where(a) {
    color: inherit;
    text-underline-offset: 0.2ex;
  }

  :where(ul, ol) {
    list-style: none;
  }

  :where(img, svg, video, canvas, audio, iframe, embed, object) {
    display: block;
  }

  :where(img, picture, svg, video) {
    max-inline-size: 100%;
    block-size: auto;
  }

  :where(h1, h2, h3) {
    line-height: calc(1em + 0.5rem);
  }

  :where(hr) {
    border: none;
    border-block-start: 1px solid;
    color: inherit;
    block-size: 0;
    overflow: visible;
  }

  :where(dialog, [popover]) {
    border: none;
    background: none;
    color: inherit;
    inset: unset;
    max-width: unset;
    max-height: unset;
    overflow: unset;
  }

  :where(dialog:not([open], [popover]), [popover]:not(:popover-open)) {
    display: none !important;
  }

  :where(:focus-visible) {
    outline-offset: 1px;
  }

  :where(:focus-visible, :target) {
    scroll-margin-block: 8vh;
  }

  :where(.visually-hidden:not(:focus-within, :active)) {
    clip-path: inset(50%) !important;
    height: 1px !important;
    width: 1px !important;
    overflow: hidden !important;
    position: absolute !important;
    white-space: nowrap !important;
    border: 0 !important;
    user-select: none !important;
  }
}
