/* =========================
   Base
========================= */
html, body {
  height: 100%;
  margin: 0;
}

body {
  background: #000;
  color: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* =========================
   Top (hero)
========================= */
.hero {
  min-height: 100svh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  text-align: center;
  position: relative;
  
}

/* ???????.hero???????????????????????? */
.logo-symbol {
  width: clamp(120px, 28vw, 180px);
  height: auto;
  position: relative; /* ?????????? */
  overflow: hidden;    /* ?????????????????? */
  display: block;
}

/* ??????????????? */
.logo-symbol::after {
  content: "";
  position: absolute;
  top: -100%; /* ????????????? */
  left: 0;
  width: 100%;
  height: 20%; /* ???? */
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(255, 255, 255, 0.5), /* ??? */
    transparent
  );
  pointer-events: none;
}

/* ????????????????? */
.logo-symbol:hover::after {
  animation: scan-move 0.8s ease-out forwards;
}

@keyframes scan-move {
  0% {
    top: -100%;
  }
  100% {
    top: 150%; /* ???????? */
  }
}


.brand {
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 28px;
  opacity: 0.92;
}

.tagline {
  font-size: 14px;
  letter-spacing: 0.08em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .8s ease-out, transform .8s ease-out;
}

.tagline.show {
  opacity: 0.7;
  transform: translateY(0);
}

.sent-message {
  margin-top: 18px;
  font-size: 13px;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

/* =========================
   Contact link (fixed)
========================= */
.contact-link {
  position: fixed;
  right: 28px;
  bottom: 30px;
  z-index: 5; /* ???? */

  color: #fff;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.08em;
  opacity: 0.65;

  transition: opacity .25s ease;
}

.contact-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width .25s ease;
}

.contact-link:hover { opacity: 1; }
.contact-link:hover::after { width: 100%; }

/* =========================
   Background Gear (right 2/3 visible)
========================= */
@keyframes gear-rotate {
  from { transform: translateY(-50%) rotate(0deg); }
  to   { transform: translateY(-50%) rotate(360deg); }
}

.bg-gear {
  position: fixed;
  top: 75%;
  right: -23%;    
  width: 120vh;
  height: 120vh;
  pointer-events: none;
  z-index: 0;
  /* ???????????pulse???????????????? */
  opacity: 0.06;

  /* ??(48s) ? ??(8s) ?????? */
  animation: 
    gear-rotate 48s linear infinite reverse,
    gear-pulse 8s ease-in-out infinite;
}

/* ?????????? */
@keyframes gear-rotate {
  from { transform: translateY(-50%) rotate(0deg); }
  to   { transform: translateY(-50%) rotate(360deg); }
}

/* ???????????8???????????? */
@keyframes gear-pulse {
  0%, 100% { opacity: 0.04; }
  50% { opacity: 0.12; } /* ?????????????? */
}

.bg-gear svg{
  width: 100%;
  height: 100%;
}

.bg-gear .gear-ring{
  fill: none;
  stroke: rgba(255,255,255,0.6);
  stroke-width: 6;
}

.bg-gear .gear-teeth rect{
  fill: rgba(255,255,255,0.9);
}

/* =========================
   Rotating Frame (center)
   - rotate-frame.svg ???
========================= */
@keyframes frame-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.rotate-layer {
  position: absolute;
  inset: 0;                
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 1;              

  animation: frame-rotate 24s linear infinite;
}

.rotate-layer img{
  width: min(85vw, 500px);
  height: auto;
  opacity: 0.25;
  filter: none;
}




/* =========================
   Contact page
========================= */
.contact {
  height: 100%;
  display: grid;
  place-content: center;
  gap: 36px;
  text-align: center;
}

.form {
  display: grid;
  gap: 18px;
  width: 340px;
}

.form input,
.form textarea {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  padding: 10px;
  font-size: 14px;
}

.form textarea {
  resize: none;
  height: 110px;
}

.form button {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.5);
  color: #fff;
  padding: 10px;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.form button:hover {
  border-color: #fff;
}

.line-link {
  font-size: 13px;
  opacity: 0.6;
  text-decoration: none;
  color: #fff;
  transition: opacity .25s ease;
}
.line-link:hover { opacity: 1; }

.back-link {
  font-size: 12px;
  opacity: 0.4;
  text-decoration: none;
  color: #fff;
}
.back-link:hover { opacity: 0.8; }

/* =========================
   Reduced motion
========================= */
@media (prefers-reduced-motion: reduce) {
  .tagline {
    transition: none;
    opacity: 0.7;
    transform: none;
  }
  .bg-gear,
  .rotate-layer {
    animation: none;
  }
  .contact-link,
  .contact-link::after,
  .line-link {
    transition: none;
  }
}

/* =========================
   Irregular Polygon
========================= */

@keyframes irregular-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.irregular-layer{
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 1;

  /* PC???? */
  transform: translate(-180px, -140px);
}

.irregular-spin{
  animation: irregular-rotate 31s linear infinite reverse;
}

.irregular-layer svg{
  width: min(95vw, 720px);
  height: auto;
  opacity: 0.15;
}

.irregular-shape{
  fill: none;
  stroke: rgba(255,255,255,0.7);
  stroke-width: 3;
}

/* =========================
   Mobile adjustment
========================= */

@media (max-width: 600px) {
  .irregular-layer{
    transform: translate(-150px, -110px);
  }

  .irregular-layer svg{
    opacity: 0.45;   /* ???????? */
  }
}

@media (max-width: 600px) {
  .bg-gear{
    opacity: 0.12;
  }
 .bg-gear{
  right: -160%; 
}

}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

@media (max-width: 600px) {
  .bg-gear {
    height: 100vh;
  }
}